-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
194 lines (167 loc) · 10.2 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
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Web Synthesizer From Space 👽</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
<link rel=stylesheet href=/styles/main.css>
</head>
<body lang=en>
<div class="permission">
<div class="permission-content">
<h2>Permission</h2>
<p>For the synthesizer to emit sounds we need your permission to play audio on this page</p>
<button class="allow-audio-btn">Allow</button>
</div>
</div>
<div class="container">
<div class="synth-container">
<div class="top-panel"></div>
<div class="synth-board">
<div class="left-panel"></div>
<div class="control-panel">
<h1 class="synth-brand">Web Synthesizer From Space 👽</h1>
<form>
<div class="control-group">
<fieldset>
<legend>OSC1</legend>
<label for="gain1">Gain</label>
<input type="range" name="gain1" id="gain1" min="0" max="10" step="0.1" value="10"/>
<label for="octave1">Octave</label>
<input type="range" name="octave1" id="octave1" min="-3" max="3" value="-1"/>
<label for="coarse1">Coarse</label>
<input type="range" name="coarse1" id="coarse1" min="0" max="220" value="0"/>
<div class="waveforms">
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M89.2 60.8c-4.5 0-6.6-5.3-8.6-10.4-1.8-4.5-3.6-9-6.8-9s-5 4.5-6.8 9c-2 5-4 10.4-8.6 10.4s-6.6-5.3-8.6-10.4c-1.8-4.5-3.6-9-6.8-9s-5 4.5-6.8 9c-2 5-4 10.4-8.6 10.4-4.5 0-6.6-5.3-8.6-10.4-1.8-4.5-3.6-9-6.8-9-.6 0-1-.5-1-1s.4-1 1-1c4.5 0 6.6 5.2 8.6 10.3 1.8 4.5 3.6 9 6.8 9 3.2 0 5-4.5 6.8-9 2-5 4-10.4 8.6-10.4s6.6 5.3 8.6 10.4c1.8 4.5 3.6 9 6.8 9 3.2 0 5-4.5 6.8-9 2-5 4-10.4 8.6-10.4s6.6 5.3 8.6 10.4c1.8 4.5 3.6 9 6.8 9 .6 0 1 .5 1 1s-.4 1-1 1z"/>
</svg>
<input type="radio" name="wave1" value="sine"/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M95 61H79V41H66v20H49V41H36v20H19V41H5v-2h16v20h13V39h17v20h13V39h17v20h14"/>
</svg>
<input type="radio" name="wave1" value="square"/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M64 62V42L34 62V42L5.6 60.7l-1.2-1.6 31.6-21v20l30-20v20l28.4-19 1.2 1.6"/>
</svg>
<input type="radio" name="wave1" value="sawtooth" checked/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M57.5 61.7l-15-20-15 20-15.8-21 1.6-1.3 14.2 19 15-20 15 20 15-20 15.8 21-1.6 1.2-14.2-19"/>
</svg>
<input type="radio" name="wave1" value="triangle"/>
</label>
</div>
</fieldset>
</div>
<div class="control-group">
<fieldset>
<legend>OSC2</legend>
<label for="gain2">Gain</label>
<input type="range" name="gain2" id="gain2" min="0" max="10" step="0.1" value="10"/>
<label for="octave2">Octave</label>
<input type="range" name="octave2" id="octave2" min="-3" max="3" value="-1"/>
<label for="coarse2">Coarse</label>
<input type="range" name="coarse2" id="coarse2" min="0" max="220" value="0"/>
<div class="waveforms">
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M89.2 60.8c-4.5 0-6.6-5.3-8.6-10.4-1.8-4.5-3.6-9-6.8-9s-5 4.5-6.8 9c-2 5-4 10.4-8.6 10.4s-6.6-5.3-8.6-10.4c-1.8-4.5-3.6-9-6.8-9s-5 4.5-6.8 9c-2 5-4 10.4-8.6 10.4-4.5 0-6.6-5.3-8.6-10.4-1.8-4.5-3.6-9-6.8-9-.6 0-1-.5-1-1s.4-1 1-1c4.5 0 6.6 5.2 8.6 10.3 1.8 4.5 3.6 9 6.8 9 3.2 0 5-4.5 6.8-9 2-5 4-10.4 8.6-10.4s6.6 5.3 8.6 10.4c1.8 4.5 3.6 9 6.8 9 3.2 0 5-4.5 6.8-9 2-5 4-10.4 8.6-10.4s6.6 5.3 8.6 10.4c1.8 4.5 3.6 9 6.8 9 .6 0 1 .5 1 1s-.4 1-1 1z"/>
</svg>
<input type="radio" name="wave2" value="sine"/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M95 61H79V41H66v20H49V41H36v20H19V41H5v-2h16v20h13V39h17v20h13V39h17v20h14"/>
</svg>
<input type="radio" name="wave2" value="square"/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M64 62V42L34 62V42L5.6 60.7l-1.2-1.6 31.6-21v20l30-20v20l28.4-19 1.2 1.6"/>
</svg>
<input type="radio" name="wave2" value="sawtooth" checked/>
</label>
<label>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 125">
<path d="M57.5 61.7l-15-20-15 20-15.8-21 1.6-1.3 14.2 19 15-20 15 20 15-20 15.8 21-1.6 1.2-14.2-19"/>
</svg>
<input type="radio" name="wave2" value="triangle"/>
</label>
</div>
</fieldset>
</div>
<div class="control-group">
<fieldset>
<legend>FILTER</legend>
<label for="cutoff">Cutoff</label>
<input type="range" name="cutoff" id="cutoff" min="20" max="20000" step="10" value="20000"/>
<label for="resonance">Resonance</label>
<input type="range" name="resonance" id="resonance" min="0" max="30" step="1" value="0"/>
</fieldset>
<fieldset>
<legend>GLIDE</legend>
<label for="glideOn"><input type="checkbox" id="glideOn" name="glideOn"/> Active</label>
<input type="range" name="glide" id="glide" min="0" max="15" step="1" value="5"/>
</fieldset>
</div>
<div class="control-group">
<fieldset>
<legend>ENVELOPE</legend>
<label for="attack">Attack</label>
<input type="range" name="attack" id="attack" min="0" max="30" step="1" value="0"/>
<label for="decay">Decay</label>
<input type="range" name="decay" id="decay" min="0" max="40" step="1" value="0"/>
<label for="sustain">Sustain</label>
<input type="range" name="sustain" id="sustain" min="0" max="10" step="1" value="10"/>
<label for="release">Release</label>
<input type="range" name="release" id="release" min="0" max="60" step="1" value="0"/>
</fieldset>
</div>
</form>
<div class="keyboard">
<ul class="keys">
<li class="white c" data-note="c"></li>
<li class="black cs" data-note="cs"></li>
<li class="white d" data-note="d"></li>
<li class="black ds" data-note="ds"></li>
<li class="white e" data-note="e"></li>
<li class="white f" data-note="f"></li>
<li class="black fs" data-note="fs"></li>
<li class="white g" data-note="g"></li>
<li class="black gs" data-note="gs"></li>
<li class="white a" data-note="a"></li>
<li class="black as" data-note="as"></li>
<li class="white b" data-note="b"></li>
</ul>
<div class="notice">
MIDI or use computer keys a,s,d, ...
</div>
</div>
<canvas id="oscilloscope"></canvas>
<!--END CONTROL-PANEL-->
</div>
<div class="right-panel"></div>
<!--END CONTAINER-->
</div>
<div class="bottom-panel"></div>
</div>
</div>
<div class="container">
<footer>
<div class="footer-links">
<a href="https://github.com/teebot/websynth">GitHub</a> • <a href="https://twitter.com/teebot">Twitter</a>
</div>
<div>Waveform icons by Aurélien Lemesre from the Noun Project</div>
</footer>
</div>
<script src=src/index.ts></script>
</body>
</html>