-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·241 lines (230 loc) · 8.57 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Comet</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" sizes="any" type="image/svg+xml" href="img/comet_icon_white.svg">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="splash">
<img src="img/comet_icon_white.svg" alt="COMET" title="COMET" style="width: 160px; max-width: 11vw">
<img src="img/comet_title.svg" alt="COMET" title="COMET" style="max-width: 50vw">
</div>
<canvas id="surface" touch-action="none"></canvas>
<aside class="aside right">
<button data-module="osc" class="button red">OSC</button>
<button data-module="filter" class="button orange">FIL</button>
<button data-module="compressor" class="button yellow">COM</button>
<button data-module="waveshaper" class="button green">WAV</button>
<button data-module="envelope" class="button teal">ENV</button>
<button data-module="convolver" class="button blue">CON</button>
<button data-module="analyser" class="button purple">ANA</button>
<div style="flex: 1"></div>
<button data-module="info" class="button info">?</button>
</aside>
<!-- INFO -->
<div id="module-info" class="module">
<img src="img/comet_title.svg" alt="COMET" title="COMET" style="height: 3rem">
<p class="p">by <a href="https://venerons.github.io" target="_blank" class="link">Daniele Veneroni</a></p>
<div style="position: absolute; top: 0.6rem; right: 0.6rem; opacity: 0.5">2.0.0</div>
<p class="p">Comet is an awesome synth built on top of the finest web technologies.</p>
<p class="p">You can control the synth using:</p>
<ul class="ul">
<li>Mouse</li>
<li>Touch</li>
<li>Keyboard</li>
<li>MIDI</li>
</ul>
</div>
<!-- OSCILLATOR -->
<div id="module-osc" class="module red" style="display: none">
<h2 class="h2">OSCILLATOR 1</h2>
<div class="form-field">
<label>Waveform</label>
<select id="osc1-type" class="select">
<optgroup label="Fundamentals">
<option value="sine">Sine</option>
<option value="sawtooth">Sawtooth</option>
<option value="square">Square</option>
<option value="triangle">Triangle</option>
</optgroup>
<optgroup label="Periodic Waves"></optgroup>
</select>
</div>
<div class="form-field">
<label>Detune</label>
<input id="osc1-detune" type="range" min="-1200" max="1200" step="1" class="range">
</div>
<div class="form-field">
<label>Mix</label>
<input id="osc1-mix" type="range" min="0" max="1" step="0.01" class="range">
</div>
<h2 class="h2">OSCILLATOR 2</h2>
<div class="form-field">
<label>Waveform</label>
<select id="osc2-type" class="select">
<option value="none">none</option>
<optgroup label="Fundamentals">
<option value="sine">Sine</option>
<option value="sawtooth">Sawtooth</option>
<option value="square">Square</option>
<option value="triangle">Triangle</option>
</optgroup>
<optgroup label="Periodic Waves"></optgroup>
</select>
</div>
<div class="form-field">
<label>Detune</label>
<input id="osc2-detune" type="range" min="-1200" max="1200" step="1" class="range">
</div>
<div class="form-field">
<label>Mix</label>
<input id="osc2-mix" type="range" min="0" max="1" step="0.01" class="range">
</div>
</div>
<!-- FILTER -->
<div id="module-filter" class="module orange" style="display: none">
<h2 class="h2">BIQUAD FILTER</h2>
<div class="form-field">
<label>Type</label>
<select id="filter-type" class="select">
<option value="lowpass">Low Pass</option>
<option value="highpass">High Pass</option>
<option value="bandpass">Band Pass</option>
<option value="lowshelf">Low Shelf</option>
<option value="highshelf">High Shelf</option>
<option value="peaking">Peaking</option>
<option value="notch">Notch</option>
<option value="allpass">All Pass</option>
</select>
</div>
<div class="form-field">
<label>Q</label>
<input id="filter-quality" type="range" min="0" max="30" step="0.03" class="range">
<!-- min: 0.0001 - max: 1000 - step: 0.0001 -->
</div>
<div class="form-field">
<label>Detune</label>
<input id="filter-detune" type="range" min="-1200" max="1200" step="1" class="range">
</div>
<div class="form-field">
<label>Frequency</label>
<input id="filter-frequency" type="range" min="40" max="24000" step="1" class="range">
</div>
<div class="form-field">
<label>Gain</label>
<input id="filter-gain" type="range" min="-40" max="40" step="1" class="range">
</div>
</div>
<!-- COMPRESSOR -->
<div id="module-compressor" class="module yellow" style="display: none">
<h2 class="h2">DYNAMICS COMPRESSOR</h2>
<div class="form-field">
<label>Threshold</label>
<input id="compressor-threshold" type="range" min="-100" max="0" step="0.1" class="range">
</div>
<div class="form-field">
<label>Knee</label>
<input id="compressor-knee" type="range" min="0" max="40" step="0.1" class="range">
</div>
<div class="form-field">
<label>Ratio</label>
<input id="compressor-ratio" type="range" min="1" max="20" step="1" class="range">
</div>
<div class="form-field">
<label>Attack</label>
<input id="compressor-attack" type="range" min="0" max="1" step="0.001" class="range">
</div>
<div class="form-field">
<label>Release</label>
<input id="compressor-release" type="range" min="0" max="1" step="0.001" class="range">
</div>
</div>
<!-- WAVESHAPER -->
<div id="module-waveshaper" class="module green" style="display: none">
<h2 class="h2">WAVESHAPER</h2>
<div class="form-field">
<label>Curve</label>
<select id="waveshaper-curve" class="select">
<option value="none">none</option>
<option value="distorsion">Distorsion</option>
</select>
</div>
<div class="form-field">
<label>Oversample</label>
<select id="waveshaper-oversample" class="select">
<option value="none">none</option>
<option value="2x">2x</option>
<option value="4x">4x</option>
</select>
</div>
</div>
<!-- ENVELOPE -->
<div id="module-envelope" class="module teal" style="display: none">
<h2 class="h2">ENVELOPE</h2>
<div class="form-field">
<label>Attack</label>
<input id="envelope-attack" type="range" min="0" max="1" step="0.1" class="range">
</div>
<div class="form-field">
<label>Release</label>
<input id="envelope-release" type="range" min="0" max="1" step="0.1" class="range">
</div>
</div>
<!-- CONVOLVER -->
<div id="module-convolver" class="module blue" style="display: none">
<h2 class="h2">CONVOLVER</h2>
<div class="form-field">
<label>Type</label>
<select id="convolver-type" class="select">
<option value="none">none</option>
</select>
</div>
</div>
<!-- ANALYSER -->
<div id="module-analyser" class="module purple" style="display: none">
<h2 class="h2">ANALYSER</h2>
<div class="form-field">
<label>Type</label>
<select id="analyser-type" class="select">
<option value="none">none</option>
<option value="spectrum_1">Spectrum 1</option>
<option value="spectrum_2">Spectrum 2</option>
<option value="spectrum_3">Spectrum 3</option>
<option value="waveshape_1">Waveshape 1</option>
<option value="waveshape_2">Waveshape 2</option>
<option value="pointers">Pointers</option>
</select>
</div>
<div class="form-field">
<label>FFT Size</label>
<select id="analyser-fftSize" class="select">
<option value="32">32</option>
<option value="64">64</option>
<option value="128">128</option>
<option value="256">256</option>
<option value="512">512</option>
<option value="1024">1024</option>
<option value="2048">2048</option>
</select>
</div>
<div class="form-field">
<label>Smoothing Time Constant</label>
<input id="analyser-smoothingTimeConstant" type="range" min="0" max="1" step="0.1" class="range">
</div>
<div class="form-field">
<label>Min Decibels</label>
<input id="analyser-minDecibels" type="range" min="-100" max="-30" step="1" class="range">
</div>
<div class="form-field">
<label>Max Decibels</label>
<input id="analyser-maxDecibels" type="range" min="-30" max="100" step="1" class="range">
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/Venerons/palette.js@3/palette.min.js"></script>
<script type="module" src="main.mjs"></script>
</body>
</html>