-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
212 lines (198 loc) · 9.91 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Audio Composer</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<style>
html {
height: 100%;
background-color: #434343;
background-image:linear-gradient(#434343, #282828)
}
body {
margin: 0;
overflow: hidden;
height: 100%;
font-family: 'Open Sans', sans-serif;
}
h1 {
margin: 0;
text-align: center;
font-weight: bold;
font-size: 18pt;
font-family: 'Oswald', sans-serif;
}
h2 {
font-size: 12pt;
font-weight: bold;
}
a:link, a:visited {
color: black;
}
div#workspace {
width: auto;
margin-right: 250px;
height: 100%;
/* CSS Background Grid Lines by Jason Delia
http://codepen.io/jasonadelia/pen/DnrAe/ */
background-color: transparent;
background-image: linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
background-size: 50px 50px;
}
div#inspector {
padding-top: 10px;
float: right;
width: 250px;
height: 100%;
background-image: linear-gradient(#888, #666);
overflow: scroll;
font-size: 9pt;
}
footer {
width: 230px;
position: absolute;
bottom: 10px;
right: 10px;
}
address {
font-style: normal;
text-align: right;
}
div.paramPane {
margin-top: 10px;
margin-bottom: 80px;
padding-left: 10px;
display: none;
}
</style>
</head>
<body>
<div id="inspector">
<h1>Web Audio Composer</h1>
<div id="mediaParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaElementAudioSourceNode">MediaElementAudioSourceNode</a></h2>
Music: <a href="http://www.xlr8r.com/mp3/2014/09/mind-wave">"Mind wave" Rhythm Operator</a>
</div>
<div id="microphoneParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceNode">MediaStreamAudioSourceNode</a></h2>
</div>
<div id="oscillatorParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode">OscillatorNode</a></h2>
<h3>type</h3>
<label><input type="radio" name="type" value="sine"></input> sine</label><br>
<label><input type="radio" name="type" value="square"></input> square</label><br>
<label><input type="radio" name="type" value="sawtooth"></input> sawtooth</label><br>
<label><input type="radio" name="type" value="triangle"></input> triangle</label><br>
<h3>frequency</h3>
<input type="range" name="frequency"></input>
<label name="frequency"></label> Hz
<h3>detune</h3>
<input type="range" name="detune"></input>
<label name="detune"></label> cents
</div>
<div id="bufferParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode">AudioBufferSourceNode</a></h2>
<h3>playbackRate</h3>
<input type="range" name="playbackRate"></input>
x<label name="playbackRate"></label>
</div>
<div id="gainParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/GainNode">GainNode</a></h2>
<h3>gain</h3>
<input type="range" name="gain"></input>
</div>
<div id="splitParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/ChannelSplitterNode">ChannelSplitterNode</a></h2>
</div>
<div id="mergeParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/ChannelMergerNode">ChannelMergerNode</a></h2>
</div>
<div id="biquadParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode">BiquadFilterNode</a></h2>
<h3>type</h3>
<label><input type="radio" name="type" value="lowpass"></input> lowpass</label><br>
<label><input type="radio" name="type" value="highpass"></input> highpass</label><br>
<label><input type="radio" name="type" value="bandpass"></input> bandpass</label><br>
<label><input type="radio" name="type" value="lowshelf"></input> lowshelf</label><br>
<label><input type="radio" name="type" value="highshelf"></input> highshelf</label><br>
<label><input type="radio" name="type" value="peaking"></input> peaking</label><br>
<label><input type="radio" name="type" value="notch"></input> notch</label><br>
<label><input type="radio" name="type" value="allpass"></input> allpass</label><br>
<h3>frequency</h3>
<input type="range" name="frequency"></input>
<label name="frequency"></label> Hz
<h3>detune</h3>
<input type="range" name="detune"></input>
<label name="detune"></label> cents
<h3>Q</h3>
<input type="range" name="Q"></input>
<h3>gain</h3>
<input type="range" name="gain"></input>
</div>
<div id="convolveParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode">ConvolverNode</a></h2>
<h3>normalize</h3>
<label><input type="radio" name="normalize" value="true"></input> On</label>
<label><input type="radio" name="normalize" value="false"></input> Off</label><br>
</div>
<div id="delayParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/DelayNode">DelayNode</a></h2>
<h3>delay</h3>
<input type="range" name="delayTime"></input>
<label name="delayTime"></label> sec
</div>
<div id="compressParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode">DynamicsCompressorNode</a></h2>
<h3>threshold</h3>
<input type="range" name="threshold"></input>
<label name="threshold"></label> dB
<h3>knee</h3>
<input type="range" name="knee"></input>
<label name="knee"></label> dB
<h3>ratio</h3>
<input type="range" name="ratio"></input>
<label name="ratio"></label> dB
<h3>reduction</h3>
<input type="range" name="reduction"></input>
<h3>attack</h3>
<input type="range" name="attack"></input>
<label name="attack"></label> sec
<h3>release</h3>
<input type="range" name="release"></input>
<label name="release"></label> sec
</div>
<div id="shaperParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode">WaveShaperNode</a></h2>
<h3>oversample</h3>
<label><input type="radio" name="oversample" value="none"></input> none</label><br>
<label><input type="radio" name="oversample" value="2x"></input> 4x</label><br>
<label><input type="radio" name="oversample" value="4x"></input> 2x</label><br>
</div>
<div id="analyserParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode">AnalyserNode</a></h2>
</div>
<div id="destParams" class="paramPane">
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode">AudioDestinationNode</a></h2>
<h3>maxChannelCount</h3>
<label name="maxChannelCount"></label>
</div>
<footer>
This app only works for Chrome and Firefox.<br>
<address>
<a href="http://tai2.net">Taiju Muto</a> <a href="https://github.com/tai2/webaudiocomposer">GitHub</a>
</address>
</footer>
</div>
<div id="workspace">
<canvas id="mainStage"></canvas>
</div>
<audio id="music" src="music.mp3" loop></audio>
<script>
createjs = window;
</script>
<script src="createjs-2013.12.12.min.js"></script>
<script src="composer.js"></script>
</body>
</html>