forked from notator/WebMIDISynthHost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
host.html
182 lines (176 loc) · 7.44 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
<!DOCTYPE HTML>
<html lang="en"
xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web MIDI Synth Host</title>
<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 width="400">
<tr>
<td><span class="boldTitle">Web MIDI Synth Host</span></td>
<td align="right"><input class="smallButton" type="button" value="GitHub" width="80" onclick="WebMIDI.host.gitHubButtonClick()" /></td>
</tr>
</table>
</div>
<div id="synthSelectDiv" style="display:block">
<hr />
<table>
<tr>
<td width="75"><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>
<tr id="singleChannelSynthInfo">
<td width="75"><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 width="75"><input class="smallButton" type="button" value="website" onclick="WebMIDI.host.synthWebsiteButtonClick()" /></td>
<td>
<span>multichannel synth -- channel:</span>
<select id="channelSelect" class="valueSelector">
<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" disabled="disabled">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>
<div id="waitingForFirstFontDiv" style="display:none; margin-top:10px">
<hr />
<span>Please wait while the first sound font loads...</span>
</div>
<div id="soundFontDiv" style="display:none">
<hr />
<table id="soundFontTable1">
<tr>
<td width="75"><span class="boldSubtitle">SoundFont:</span></td>
<td>
<select id="sf2OriginSelect" class="sf2OriginSelect" onchange="WebMIDI.host.onSf2OriginSelectChanged()" />
</td>
<td>
<!--
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">
<tr>
<td width="75"><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>
<tr>
<td width="70">
<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>
<tr>
<td width="70">
<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="0">
<input type="checkbox" id="sendNote1Checkbox" style="vertical-align:middle" onclick="WebMIDI.host.noteCheckboxClicked()" />
</td>
</tr>
<tr>
<td width="70">
<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 />
<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="WebMIDI/utilities.js" type="text/javascript"></script> <!-- contains setPitchWheelDeviation(...) utility -->
<script src="sf2Synth1/riffParser.js" type="text/javascript"></script>
<script src="sf2Synth1/soundFontParser.js" type="text/javascript"></script>
<script src="sf2Synth1/soundFont.js" type="text/javascript"></script>
<script src="sf2Synth1/soundFontSynthNote.js" type="text/javascript"></script>
<script src="sf2Synth1/sf2Synth1.js" type="text/javascript"></script>
<script src="consoleSf2Synth.js" type="text/javascript"></script>
<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.js" type="text/javascript"></script>
<!-- add more synths here -->
<script src="host.js" type="text/javascript"></script>
</body>
</html>