-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (51 loc) · 2.15 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
<!DOCTYPE html>
<html>
<head>
<title>Building A Synthesizer with the Web Audio API</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="wrapper">
<div class="power control">
<div id="powerButton"></div>
</div>
<div class="oscillator control">
<!-- Oscillator -->
<h4>Oscillator</h4>
<div id="oscType" class="toggleButton"></div>
</div>
<div class="filter control">
<!-- Filter -->
<h4>Filter Cutoff</h4>
<input type="range" id="filterCutoff" min="20" max="20000" value="20" step="20">
</div>
<div class="envelope control">
<!-- Volume Envelope -->
<h4>Volume Envelope</h4>
<input type="range" id="attack" class="adsr" min="0.1" max="1" value="0.1" step="0.1">
<input type="range" id="decay" class="adsr" min="0.1" max="1" value="0.1" step="0.1">
<input type="range" id="sustain" class="adsr" min="0.1" max="1" value="0.1" step="0.1">
<input type="range" id="release" class="adsr" min="0.1" max="1" value="0.1" step="0.1">
</div>
<div class="lfo control">
<!-- LFO -->
<h4>LFO</h4>
<input type="range" id="lfoFreq" min="0" max="20" value="0" step="1">
</div>
<!-- Controller -->
<div id="controller">
<div id="c4" class="key" data-freq="261.63"></div>
<div id="d4" class="key" data-freq="293.66"></div>
<div id="e4" class="key" data-freq="329.63"></div>
<div id="g4" class="key" data-freq="392"></div>
<div id="a4" class="key" data-freq="440"></div>
<div id="c5" class="key" data-freq="523.25"></div>
<div id="d5" class="key" data-freq="587.33"></div>
<div id="e5" class="key" data-freq="659.25"></div>
<div id="g5" class="key" data-freq="783.99"></div>
</div>
</div>
<script type="text/javascript" src="synth.js"></script>
</body>
</html>