This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
host.html
277 lines (268 loc) · 18.2 KB
/
host.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE HTML>
<html lang="en"
xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web MIDI Synth Host</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:;base64,iVBORwOKGO=" /> <!-- workaround to prevent "favicon not found" exceptions in Chrome.-->
<link href="hostStyleSheet.css" media="all" rel="stylesheet" type="text/css" />
<!-- Javascript files are included at the end of the body element -->
</head>
<body>
<div id="cursorControlDiv">
<div id="appDiv" class="app">
<div id="title">
<table style="width:420px">
<tr>
<td><span class="boldTitle">Web MIDI Synth Host</span></td>
<td style="text-align:right"><input class="smallButton" type="button" value="GitHub" style="width:80px" onclick="WebMIDI.host.gitHubButtonClick()" /></td>
</tr>
</table>
</div>
<div id="synthSelectDiv" style="display:block">
<hr />
<table>
<colgroup>
<col style="width:75px" />
<col />
</colgroup>
<tr>
<td><span class="boldSubtitle">Synth:</span></td>
<td>
<!--
To add a synth, include its code at the bottom of this file, and add it to this
select control in the controls.init() function (see Controls.js).
-->
<select id="synthSelect" class="synthSelect" />
</td>
</tr>
</table>
<div id="synthSelectDivButtonDiv" style="text-align:right">
<input class="largeButton" type="button" value="continue" onclick="WebMIDI.host.onSynthSelectChanged()" />
</div>
</div>
<div id="synthInfoDiv" style="display:none">
<table>
<colgroup>
<col style="width:75px" />
<col />
</colgroup>
<tr id="singleChannelSynthInfo">
<td><input class="smallButton" type="button" value="website" onclick="WebMIDI.host.synthWebsiteButtonClick()" /></td>
<td><span>single channel synth -- (ignores channel info)</span></td>
</tr>
<tr id="multiChannelSynthInfo">
<td><input class="smallButton" type="button" value="website" onclick="WebMIDI.host.synthWebsiteButtonClick()" /></td>
<td>
<span>multichannel synth -- channel:</span>
<select id="channelSelect" class="valueSelector" onchange="WebMIDI.host.onChannelSelectChanged()">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
</td>
</tr>
</table>
</div>
<!-- Displayed only if the current synth uses soundFonts (Sf2 or WebAudioFont) -->
<div id="soundFontDiv" style="display:none">
<hr />
<table id="soundFontTable1">
<colgroup>
<col style="width:75px" />
<col />
</colgroup>
<tr>
<!-- default name. Can change dynamically to "WebAudioFont: " -->
<td><span id="soundFontType" class="boldSubtitle">SoundFont: </span></td>
<td>
<!-- This select is hidden for Web Audio Fonts -->
<select id="sf2OriginSelect" class="sf2OriginSelect" onchange="WebMIDI.host.onSf2OriginSelectChanged()" />
</td>
<td>
<!-- This select is hidden for Sf2 soundFonts -->
<select id="webAudioFontSelect" class="webAudioFontSelect" onchange="WebMIDI.host.onWebAudioFontSelectChanged()" />
</td>
<td>
<!-- This select is hidden for Web Audio Fonts.
To add an sf2 SoundFont, put it in the soundFonts folder, and add it to the options for this select control.
(See the controls.init() function in Controls.js).
-->
<select id="sf2Select" class="sf2Select" onchange="WebMIDI.host.onSf2SelectChanged()" />
</td>
</tr>
</table>
<table id="soundFontTable2">
<colgroup>
<col style="width:75px" />
<col />
</colgroup>
<tr>
<td><input class="smallButton" type="button" value="website" onclick="WebMIDI.host.soundFontWebsiteButtonClick()" /></td>
<td id="loadLog"></td>
</tr>
</table>
</div>
<div id="commandsDiv" style="display:none">
<hr />
<div id="commandsTitleDiv"><span class="boldSubtitle">Commands:</span></div>
<table id="commandsTable" class="midiMessagesTable"></table>
</div>
<div id="controlsDiv" style="display:none">
<hr />
<div id="controlsTitleDiv"><span class="boldSubtitle">Controls:</span></div>
<table id="controlsTable" class="midiMessagesTable"></table>
</div>
<div id="noteDiv1" style="display:none">
<hr />
<table>
<colgroup>
<col style="width:70px" />
<col />
</colgroup>
<tr>
<td>
<span class="boldSubtitle">Note:</span>
</td>
<td>
<span>note</span>
<input id="noteDiv1IndexInput" type="number" name="value" class="number" min="0" max="127" value="64" />
<span>velocity</span>
<input id="noteDiv1VelocityInput" type="number" name="value" class="number" min="0" max="127" value="100" />
<input id="sendButton1" type="button" class="sendButton" value="send" onmousedown="WebMIDI.host.doNoteOn()" onmouseup="WebMIDI.host.doNoteOff()" />
<label><input type="checkbox" id="holdCheckbox1" value="hold" style="vertical-align:middle" onclick="WebMIDI.host.holdCheckboxClicked()" />hold</label>
</td>
</tr>
</table>
</div>
<div id="notesDiv2" style="display:none">
<hr />
<table>
<colgroup>
<col style="width:70px" />
<col />
</colgroup>
<tr>
<td>
<span class="boldSubtitle">Note:</span>
</td>
<td>
<span>note</span>
<input id="notesDiv2IndexInput1" type="number" name="value" class="number" min="0" max="127" value="68" />
<span>velocity</span>
<input id="notesDiv2VelocityInput1" type="number" name="value" class="number" min="0" max="127" value="100" />
<input type="checkbox" id="sendNote1Checkbox" style="vertical-align:middle" onclick="WebMIDI.host.noteCheckboxClicked()" />
</td>
</tr>
<tr>
<td>
<span> </span>
</td>
<td>
<span>note</span>
<input id="notesDiv2IndexInput2" type="number" name="value" class="number" min="0" max="127" value="64" />
<span>velocity</span>
<input id="notesDiv2VelocityInput2" type="number" name="value" class="number" min="0" max="127" value="100" />
<input type="checkbox" id="sendNote2Checkbox" style="vertical-align:middle" onclick="WebMIDI.host.noteCheckboxClicked()" checked="checked" />
<input id="sendButton2" type="button" class="sendButton" value="send" onmousedown="WebMIDI.host.doNotesOn()" onmouseup="WebMIDI.host.doNotesOff()" />
<label><input type="checkbox" id="holdCheckbox2" value="hold" style="vertical-align:middle" onclick="WebMIDI.host.holdCheckboxClicked()" />hold</label>
</td>
</tr>
</table>
</div>
</div> <!-- appDiv -->
</div> <!-- cursorControlDiv -->
<script src="WebMIDI/namespace.js" type="text/javascript"></script>
<script src="WebMIDI/constants.js" type="text/javascript"></script> <!-- contains PitchWheelDeviation constants -->
<script src="cwMIDISynth/waveShaper.js" type="text/javascript"></script>
<script src="cwMIDISynth/cwConstants.js" type="text/javascript"></script>
<script src="cwMIDISynth/cwMIDISynthCore.js" type="text/javascript"></script>
<script src="cwMIDISynth/cwMIDISynth.js" type="text/javascript"></script>
<script src="cwMonoSynth/cwMonoSynth.js" type="text/javascript"></script>
<!-- The following scripts define all the presets used by the residentWAFSynth in this application -->
<script src="residentWAFSynth/webAudioFontFiles/0000_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0000_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0060_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0060_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0080_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0080_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0090_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0090_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0100_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0100_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0110_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0110_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0120_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0120_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0130_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0130_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0140_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0140_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0150_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0160_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0160_GeneralUserGS_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0240_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0250_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0260_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0270_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<!--<script src="residentWAFSynth/webAudioFontFiles/0460_FluidR3_GM_sf2_file.js" type="text/javascript"></script>-->
<!-- new, interesting Fluid presets -->
<script src="residentWAFSynth/webAudioFontFiles/0460_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0530_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0580_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0790_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0890_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0920_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0930_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0950_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<!-- some Fluid winds -->
<script src="residentWAFSynth/webAudioFontFiles/0600_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0660_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0680_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0700_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0710_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/0730_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<!-- Percussion -->
<script src="residentWAFSynth/webAudioFontFiles/12841_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12845_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12848_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12856_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12859_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12860_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12861_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12862_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12863_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12870_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12873_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12874_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12875_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12876_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12877_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontFiles/12881_0_FluidR3_GM_sf2_file.js" type="text/javascript"></script>
<script src="residentWAFSynth/wafReverberator.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFont.js" type="text/javascript"></script>
<script src="residentWAFSynth/webAudioFontDefs.js" type="text/javascript"></script>
<script src="residentWAFSynth/residentWAFSynth.js" type="text/javascript"></script>
<script src="residentWAFSynth/residentWAFSynthNote.js" type="text/javascript"></script>
<script src="residentSf2Synth/riffParser.js" type="text/javascript"></script>
<script src="residentSf2Synth/soundFontParser.js" type="text/javascript"></script>
<script src="residentSf2Synth/soundFont.js" type="text/javascript"></script>
<script src="residentSf2Synth/soundFontSynthNote.js" type="text/javascript"></script>
<script src="residentSf2Synth/residentSf2Synth.js" type="text/javascript"></script>
<script src="consoleSf2Synth/consoleSf2Synth.js" type="text/javascript"></script>
<script src="host.js" type="text/javascript"></script>
</body>
</html>