-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
189 lines (181 loc) · 7.76 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<html>
<head>
<title>Web Audio Demo Synth</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/piano-keyboard.css">
<link rel="stylesheet" type="text/css" href="css/piano-keyboard-custom.css">
</head>
<body>
<h3>Web Audio Demo Synth</h3>
<p class="tagline">Horrible, hacked together proof that Web Audio API is awesome. Use on-screen keyboard or plug in midi keyboard.</p>
<div>
<div>
<label>Level</label>
<input id="gain" type="range" value="1.0" min="0.0" max="1.0" step="0.01" />
</div>
<div>
<label>Waveform</label>
<select id="waveform">
<option value='sine'>sine</option>
<option value='square'>square</option>
<option value='sawtooth'>sawtooth</option>
<option value='triangle'>triangle</option>
</select>
</div>
<div>
<label>Filter cutoff frequency</label>
<input id="cutoff" type="range" value="24000" min="16" max="24000" step="10" />
</div>
<div>
<label>Filter resonance</label>
<input id="q" type="range" value="1.0" min="0.0001" max="1000" step="0.1" />
</div>
</div>
<div>
<div style="width:33.3%; float:right;">
<div class="canvas">
<canvas id="spectrumCanvas"></canvas>
</div>
<div>
<div>
<label>x axis: </label>
<input type="radio" name="s_xaxis" value="logarithmic" checked /> logarithmic
<input type="radio" name="s_xaxis" value="linear"/> linear
</div>
<div>
<label>grid: </label>
<input type="radio" name="s_grid" value="visible" checked /> visible
<input type="radio" name="s_grid" value="invisible"/> invisible
</div>
<div>
<label for="s_x1">x1: </label>
<input type="range" id="s_x1" min="1" max="20000" step="0.1" value="20" />
<span id="s_x1_val">20</span>
<span>Hz</span>
</div>
<div>
<label for="s_x2">x2: </label>
<input type="range" id="s_x2" min="1" max="20000" step="0.1" value="20000" />
<span id="s_x2_val">20000</span>
<span>Hz</span>
</div>
<div>
<label for="s_y1">y1: </label>
<input type="range" id="s_y1" min="-200" max="0" step="1" value="-100" />
<span id="s_y1_val">-100</span>
<span>dB</span>
</div>
<div>
<label for="s_y2">y2: </label>
<input type="range" id="s_y2" min="-200" max="0" step="1" value="0" />
<span id="s_y2_val">0</span>
<span>dB</span>
</div>
<div>
<label>interpolation: </label>
<input type="radio" name="s_interpolation" value="linear" checked /> linear
<input type="radio" name="s_interpolation" value="off"/> off
</div>
<div>
<label for="s_points">points: </label>
<input type="range" id="s_points" min="2" max="2000" step="1" value="1000" />
<span id="s_points_val">1000</span>
<span></span>
</div>
</div>
</div>
<div style="width: 33.3%; float:right;">
<div class="canvas">
<canvas id="oscopeCanvas"></canvas>
</div>
<div>
<div>
<label>grid: </label>
<input type="radio" name="grid" value="visible" checked /> visible
<input type="radio" name="grid" value="invisible"/> invisible
</div>
<div>
<label for="time">time: </label>
<input type="range" id="time" min="0.1" max="100" step="0.1" value="50" />
<span id="time_val">50</span>
<span>ms</span>
</div>
<div>
<label for="y1">y1: </label>
<input type="range" id="y1" min="-1" max="1" step="0.001" value="-1" />
<span id="y1_val">-1</span>
<span></span>
</div>
<div>
<label for="y2">y2: </label>
<input type="range" id="y2" min="-1" max="1" step="0.001" value="1" />
<span id="y2_val">1</span>
<span></span>
</div>
<div>
<label>trigger: </label>
<input type="radio" name="trigger" value="off" /> off
<input type="radio" name="trigger" value="up" checked /> up
<input type="radio" name="trigger" value="down"/> down
</div>
<div>
<label for="triggerLevel">trigger level: </label>
<input type="range" id="triggerLevel" min="-1" max="1" step="0.001" value="0" />
<span id="triggerLevel_val">0</span>
<span></span>
</div>
<div>
<label>resampler: </label>
<input type="radio" name="resampler" value="off" /> off
<input type="radio" name="resampler" value="linear" checked /> linear
</div>
<div>
<label for="points">points: </label>
<input type="range" id="points" min="2" max="2000" step="1" value="1000" />
<span id="points_val">1000</span>
<span></span>
</div>
</div>
</div>
<div style="width: 33.3%;">
<div class="canvas">
<canvas id="envCanvas" width="630" height="460"></canvas>
</div>
</div>
</div>
<div class="keyboard"></div>
<script src="lib/canvasPlot.js/canvasPlot.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/mapLinear.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/mapSemiLogX.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/curveDrawerLinear.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simplePlot.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/super.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/frameOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoFixedLinearEquispaced.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoFixedLinearEquispacedOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoLinear.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoSemiLogX.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoLinearOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/gridAutoSemiLogXOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simplePlotOffscreen.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/canvasStretch.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/scopeSignal.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simpleScope.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simpleScopeWidget.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/resampler.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/resamplerLinear.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/spectrumAnalyserSignal.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simpleSpectrumAnalyser.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/simpleSpectrumAnalyserWidget.js" type="text/javascript"></script>
<script src="lib/canvasPlot.js/interpolateLinear.js" type="text/javascript"></script>
<script src="oscilloscope.js"></script>
<script src="spectrumanalyzer.js"></script>
<script type="text/javascript" src="https://cdn.polyfill.io/v1/polyfill.js?features=default,Set,Element.prototype.matches"></script>
<script src="lib/piano-keyboard-bundle.js"></script>
<script src="piano-keyboard.js"></script>
<script src="index.js"></script>
<script src="midi.js"></script>
<script src="envelopevis.js"></script>
</body>
</html>