-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (59 loc) · 1.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Oscillators Play-Ground</title>
<style type="text/css">
.midi-keyboard {
display: flex;
flex-direction: row;
margin-top: 20px;
}
.midi-keyboard .piano-key {
padding: 20px 10px 0 10px;
margin: 0 1px;
border: 1px solid gray;
border-top: none;
user-select: none;
}
.midi-keyboard .piano-key.black {
background-color: black;
color: white;
padding: 20px 5px 0 5px;
transform: scaleY(.8);
transform-origin: top;
}
.midi-keyboard .piano-key.pressed {
background-color: red;
}
.midi-keyboard .piano-key:active {
background-color: red;
}
</style>
</head>
<body onload="initialize()">
<p>wave type:</p>
<form>
<label>
<input name="wavetype" type="radio" value="sine" onchange="changeFrequencyType(this)" checked />
sine
</label>
<label>
<input name="wavetype" type="radio" value="square" onchange="changeFrequencyType(this)" />
square
</label>
<label>
<input name="wavetype" type="radio" value="triangle" onchange="changeFrequencyType(this)" />
triangle
</label>
<label>
<input name="wavetype" type="radio" value="sawtooth" onchange="changeFrequencyType(this)" />
sawtooth
</label>
</form>
<div id="midi-keyboard" class="midi-keyboard"></div>
<script src="osc.js" type="text/javascript"></script>
</body>
</html>