This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
index.html
256 lines (228 loc) · 13.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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
*
* Copyright (c) 2011-2013 Marcus Geelnard
*
* This file is part of SoundBox.
*
* SoundBox is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SoundBox is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SoundBox. If not, see <http://www.gnu.org/licenses/>.
*
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SoundBox - an online music editor</title>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta name="description" content="SoundBox is a tool for composing synth music in your browser. It's optimized for small (4 KB) JavaScript demos." />
<script type="text/javascript">
// Helper function to load JavaScript files.
function include(filename) {
// We randomnize the URL to always reload it.
var getParam = '?id=' + Math.round(Math.random() * 99999);
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = filename + getParam;
head.appendChild(s);
}
// Load the main program.
include("common.js");
include("gui.js");
</script>
<link rel="stylesheet" type="text/css" href="screen.css?version=3" />
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body onload="gui_init()">
<div id="content">
<div id="cover"><div id="dialog"></div></div>
<table id="guiMaster" class="ui"><tr>
<!-- Song -->
<td id="UItable">
<!-- Logo -->
<div class="sboxLogo">
<img id="logo" src="gui/logo.png" width="130" height="32" alt="SoundBox" title="About SoundBox" />
</div>
<div id="newSong" class="button" title="New song"><img src="gui/new.png" width="32" height="32" alt="" /> New</div>
<div id="openSong" class="button" title="Open demo song"><img src="gui/open.png" width="32" height="32" alt="" /> Open</div>
<div id="saveSong" class="button" title="Save song"><img src="gui/save.png" width="32" height="32" alt="" /> Save</div>
<div id="exportJS" class="button" title="Export song as JavaScript"><img src="gui/export-js.png" width="32" height="32" alt="" /> JavaScript</div>
<div id="exportWAV" class="button" title="Export song as WAV"><img src="gui/export-wav.png" width="32" height="32" alt="" /> Export WAV</div>
<br />
<div id="playSong" class="button" title="Play song"><img src="gui/play.png" width="32" height="32" alt="" /> Song</div>
<div id="playRange" class="button" title="Play selected range (SPACE)"><img src="gui/play-range.png" width="32" height="32" alt="" /> Range</div>
<div id="stopPlaying" class="button" title="Stop playing (SPACE)"><img src="gui/stop.png" width="32" height="32" alt="" /> Stop</div>
<div>
<label class="checkbox"><input id="loopPlayback" type="checkbox" title="Enable looped playback" />Loop playback</label><br />
</div>
<br />
<div id="about" class="button" title="About"><img src="gui/help.png" width="32" height="32" alt="" /> About</div>
<br />
<div style="text-align: center">
<input id="bpm" type="text" size="3" value="" title="Beats per minute (song speed)" /> BPM<br />
<input id="rpp" type="text" size="3" value="" title="Rows per pattern" /> RPP
</div>
</td>
<!-- Sequencer -->
<td>
<div><canvas id="playGfxCanvas" width="280" height="82" /></div>
<div id="sequencer" title="Enter pattern numbers, 0-9,A-Z">
<table class="tracks" id="sequencer-table"></table>
</div>
<div style="height: 32px"><img id="sequencerCopy" class="smallButton" title="Copy" src="gui/edit-copy.png" width="24" height="24" alt="Copy" /><img id="sequencerPaste" class="smallButton" title="Paste" src="gui/edit-paste.png" width="24" height="24" alt="Paste" /><img id="sequencerPatDown" class="smallButton" title="Pattern down" src="gui/minus-one.png" width="24" height="24" alt="-1" /><img id="sequencerPatUp" class="smallButton" title="Pattern up" src="gui/plus-one.png" width="24" height="24" alt="+1" /></div>
</td>
<!-- Pattern -->
<td>
<div id="pattern">
<table class="tracks" id="pattern-table" title="Use the piano or keyboard to enter notes"></table>
</div>
<div style="height: 32px"><img id="patternCopy" class="smallButton" title="Copy" src="gui/edit-copy.png" width="24" height="24" alt="Copy" /><img id="patternPaste" class="smallButton" title="Paste" src="gui/edit-paste.png" width="24" height="24" alt="Paste" /></div>
<div style="height: 32px"><img id="patternNoteDown" class="smallButton" title="Note down" src="gui/minus-one.png" width="24" height="24" alt="-1" /><img id="patternNoteUp" class="smallButton" title="Note up" src="gui/plus-one.png" width="24" height="24" alt="+1" /><img id="patternOctaveDown" class="smallButton" title="Octave down" src="gui/minus-twelve.png" width="24" height="24" alt="-12" /><img id="patternOctaveUp" class="smallButton" title="Octave up" src="gui/plus-twelve.png" width="24" height="24" alt="+12" /></div>
<!-- Status (debug etc) -->
<div>
<label class="checkbox"><input id="displaySize" type="checkbox" title="Display the exported file size at regular intervals" />Display file size</label>
</div>
<div id="statusText"></div>
</td>
<!-- Effects track -->
<td>
<div id="fxtrack">
<table class="tracks" id="fxtrack-table" title="Use instrument and effect controls to edit"></table>
</div>
<div style="height: 32px"><img id="fxCopy" class="smallButton" title="Copy" src="gui/edit-copy.png" width="24" height="24" alt="Copy" /></div>
<div style="height: 32px"><img id="fxPaste" class="smallButton" title="Paste" src="gui/edit-paste.png" width="24" height="24" alt="Paste" /></div>
</td>
<!-- Instrument control -->
<td>
<select id="instrPreset" title="Select an instrument preset">
<option value="">(select a preset)</option>
</select>
<select id="midiInput" title="Select a MIDI source" style="margin-left: 10px; display: none">
<option value="">(select MIDI)</option>
</select>
<table class="ui">
<!-- Oscillator 1 -->
<tr>
<td>
<h3>Oscillator 1</h3>
<table class="subui">
<tr><td>Wave</td><td>
<img id="osc1_wave_sin" title="Sine" src="gui/wave-sin.png" alt="Sin" style="margin-right: 10px" />
<img id="osc1_wave_tri" title="Triangle" src="gui/wave-tri.png" alt="Tri" style="margin-right: 10px" />
<img id="osc1_wave_saw" title="Saw" src="gui/wave-saw.png" alt="Saw" style="margin-right: 10px" />
<img id="osc1_wave_sqr" title="Square" src="gui/wave-sqr.png" alt="Sqr" />
</td></tr>
<tr><td>Vol</td><td title="Volume"><div class="slider"><img id="osc1_vol" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Semi</td><td title="Semitune"><div class="slider"><img id="osc1_semi" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>X-Env</td><td title="Envelope modulates frequency"><div class="slider"><img id="osc1_xenv" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
<!-- Oscillator 2 -->
<td>
<h3>Oscillator 2</h3>
<table class="subui">
<tr><td>Wave</td><td>
<img id="osc2_wave_sin" title="Sine" src="gui/wave-sin.png" alt="Sin" style="margin-right: 10px" />
<img id="osc2_wave_tri" title="Triangle" src="gui/wave-tri.png" alt="Tri" style="margin-right: 10px" />
<img id="osc2_wave_saw" title="Saw" src="gui/wave-saw.png" alt="Saw" style="margin-right: 10px" />
<img id="osc2_wave_sqr" title="Square" src="gui/wave-sqr.png" alt="Sqr" />
</td></tr>
<tr><td>Vol</td><td title="Volume"><div class="slider"><img id="osc2_vol" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Semi</td><td title="Semitune"><div class="slider"><img id="osc2_semi" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Det</td><td title="Detune"><div class="slider"><img id="osc2_det" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>X-Env</td><td title="Envelope modulates frequency"><div class="slider"><img id="osc2_xenv" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
</tr>
<!-- Noise -->
<tr>
<td>
<h3>Noise</h3>
<table class="subui">
<tr><td>Vol</td><td title="Volume"><div class="slider"><img id="noise_vol" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
<!-- Envelope -->
<td>
<h3>Envelope</h3>
<table class="subui">
<tr><td>Att</td><td title="Attack time"><div class="slider"><img id="env_att" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Sust</td><td title="Sustain time"><div class="slider"><img id="env_sust" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Rel</td><td title="Release time"><div class="slider"><img id="env_rel" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Exp</td><td title="Exponential decay"><div class="slider"><img id="env_decay" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
</tr>
<!-- Arpeggio -->
<tr>
<td>
<h3>Arpeggio</h3>
<table class="subui">
<tr><td>Note 1</td><td title="Note 1"><div class="slider"><img id="arp_note1" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Note 2</td><td title="Note 2"><div class="slider"><img id="arp_note2" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Speed</td><td title="Arpeggio speed"><div class="slider"><img id="arp_speed" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
<!-- FX -->
<td rowspan="2">
<h3>FX</h3>
<table class="subui">
<tr><td>Filt</td><td>
<img id="fx_filt_lp" title="Low pass" src="gui/filt-lp.png" alt="LP" style="margin-right: 10px" />
<img id="fx_filt_hp" title="High pass" src="gui/filt-hp.png" alt="HP" style="margin-right: 10px" />
<img id="fx_filt_bp" title="Band pass" src="gui/filt-bp.png" alt="BP" style="margin-right: 10px" />
</td></tr>
<tr><td>Freq</td><td title="Filter frequency"><div class="slider"><img id="fx_freq" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td> Res</td><td title="Filter resonance"><div class="slider"><img id="fx_res" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Dist</td><td title="Distortion"><div class="slider"><img id="fx_dist" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Drive</td><td title="Volume drive"><div class="slider"><img id="fx_drive" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Pan</td><td title="Pan amount"><div class="slider"><img id="fx_pan_amt" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td> Freq</td><td title="Pan frequency"><div class="slider"><img id="fx_pan_freq" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Delay</td><td title="Delay amount"><div class="slider"><img id="fx_dly_amt" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td> Time</td><td title="Delay time"><div class="slider"><img id="fx_dly_time" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
</table>
</td>
</tr>
<!-- LFO -->
<tr>
<td>
<h3>LFO</h3>
<table class="subui">
<tr><td>Wave</td><td>
<img id="lfo_wave_sin" title="Sine" src="gui/wave-sin.png" alt="Sin" style="margin-right: 10px" />
<img id="lfo_wave_tri" title="Triangle" src="gui/wave-tri.png" alt="Tri" style="margin-right: 10px" />
<img id="lfo_wave_saw" title="Saw" src="gui/wave-saw.png" alt="Saw" style="margin-right: 10px" />
<img id="lfo_wave_sqr" title="Square" src="gui/wave-sqr.png" alt="Sqr" />
</td></tr>
<tr><td>Amt</td><td title="Amount"><div class="slider"><img id="lfo_amt" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>Freq</td><td title="Frequency"><div class="slider"><img id="lfo_freq" src="gui/slider.png" width="10" height="12" alt="" /></div></td></tr>
<tr><td>FXFreq</td><td title="FX frequency modulation"><img id="lfo_fxfreq" class="box" src="gui/box-uncheck.png" width="10" height="12" alt="" /></td></tr>
</table>
</td>
</tr>
</table>
<div style="height: 32px; margin-top: 4px"><img id="instrCopy" class="smallButton" title="Copy instrument" src="gui/edit-copy.png" width="24" height="24" alt="Copy" /><img id="instrPaste" class="smallButton" title="Paste instrument" src="gui/edit-paste.png" width="24" height="24" alt="Paste" /><img id="instrSave" class="smallButton" title="Save instrument" src="gui/save_small.png" width="24" height="24" alt="Save" /></div>
<!-- Keyboard -->
<div class="keyboard">
<div class="octaveSelector">
Octave: <span id="keyboardOctave" title="Octave"></span>
</div>
<img id="octaveDown" title="Octave down (<)" alt="<" src="gui/button-prev.png" width="23" height="20" /> <img draggable="false" id="keyboard" src="gui/keyboard.jpg" width="421" height="112" alt="Keyboard" /> <img id="octaveUp" title="Octave up (>)" alt=">" src="gui/button-next.png" width="23" height="20" />
</div>
</td>
</tr>
</table>
</div>
</body>
</html>