-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
172 lines (159 loc) · 8.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="main.js"></script>
<link rel="stylesheet" href="main.css">
<title>mcmidi web</title>
</head>
<body>
<h1>Welcome to mcmidi web.</h1>
<span>Connection Settings:</span>
<br>
<input type="radio" id="websocket" name="connection-type" value="websocket" checked="checked">
<label for="websocket">WebSocket (Preferred)</label>
<input type="radio" id="http" name="connection-type" value="http">
<label for="http">HTTP</label>
<br>
<input type="text" id="websocket-endpoint" name="websocket-endpoint" value="wss://example.com:61672/mcmidi/note" size="40">
<label id="websocket-endpoint-label" for="websocket-endpoint">WebSocket Endpoint</label>
<input type="text" id="http-endpoint" name="http-endpoint" value="https://example.com:61672/mcmidi/note" size="40">
<label id="http-endpoint-label" for="http-endpoint">HTTP Endpoint</label>
<br>
<button type="button" id="websocket-connect">Connect</button>
<br>
<br>
<span>Player Settings:</span>
<br>
<input type="text" id="player-name" name="player-name" value="Example">
<label for="player-name">Player Name</label>
<br>
<select name="instrument" id="instrument">
<option value="BANJO">Banjo</option>
<option value="BASEDRUM">Basedrum</option>
<option value="BASS">Bass</option>
<option value="BELL">Bell</option>
<option value="BIT">Bit</option>
<option value="CHIME">Chime</option>
<option value="COW_BELL">Cow Bell</option>
<option value="DIDGERIDOO">Didgeridoo</option>
<option value="FLUTE">Flute</option>
<option value="GUITAR">Guitar</option>
<option value="HARP">Harp</option>
<option value="HAT">Hat</option>
<option value="IRON_XYLOPHONE">Iron Xylophone</option>
<option value="PLING" selected="selected">Pling</option>
<option value="SNARE">Snare</option>
<option value="XYLOPHONE">Xylophone</option>
<option value="MAGIC">Magic</option>
</select>
<label for="instrument">Instrument</label>
<br>
<select name="magic-octave-one-instrument" id="magic-octave-one-instrument">
<option value="BANJO">Banjo</option>
<option value="BASEDRUM">Basedrum</option>
<option value="BASS" selected="selected">Bass</option>
<option value="BELL">Bell</option>
<option value="BIT">Bit</option>
<option value="CHIME">Chime</option>
<option value="COW_BELL">Cow Bell</option>
<option value="DIDGERIDOO">Didgeridoo</option>
<option value="FLUTE">Flute</option>
<option value="GUITAR">Guitar</option>
<option value="HARP">Harp</option>
<option value="HAT">Hat</option>
<option value="IRON_XYLOPHONE">Iron Xylophone</option>
<option value="PLING">Pling</option>
<option value="SNARE">Snare</option>
<option value="XYLOPHONE">Xylophone</option>
</select>
<select name="magic-octave-two-instrument" id="magic-octave-two-instrument">
<option value="BANJO">Banjo</option>
<option value="BASEDRUM">Basedrum</option>
<option value="BASS">Bass</option>
<option value="BELL">Bell</option>
<option value="BIT">Bit</option>
<option value="CHIME">Chime</option>
<option value="COW_BELL">Cow Bell</option>
<option value="DIDGERIDOO">Didgeridoo</option>
<option value="FLUTE">Flute</option>
<option value="GUITAR">Guitar</option>
<option value="HARP" selected="selected">Harp</option>
<option value="HAT">Hat</option>
<option value="IRON_XYLOPHONE">Iron Xylophone</option>
<option value="PLING">Pling</option>
<option value="SNARE">Snare</option>
<option value="XYLOPHONE">Xylophone</option>
</select>
<select name="magic-octave-three-instrument" id="magic-octave-three-instrument">
<option value="BANJO">Banjo</option>
<option value="BASEDRUM">Basedrum</option>
<option value="BASS">Bass</option>
<option value="BELL" selected="selected">Bell</option>
<option value="BIT">Bit</option>
<option value="CHIME">Chime</option>
<option value="COW_BELL">Cow Bell</option>
<option value="DIDGERIDOO">Didgeridoo</option>
<option value="FLUTE">Flute</option>
<option value="GUITAR">Guitar</option>
<option value="HARP">Harp</option>
<option value="HAT">Hat</option>
<option value="IRON_XYLOPHONE">Iron Xylophone</option>
<option value="PLING">Pling</option>
<option value="SNARE">Snare</option>
<option value="XYLOPHONE">Xylophone</option>
<option value="MAGIC">Magic</option>
</select>
<input type="checkbox" id="send-velocity" name="send-velocity" value="velocity">
<label for="send-velocity">Send Velocity</label>
<br>
<p><em>Note: This website is only compatible with browsers which natively support the Web MIDI API,
which are currently Chrome, Opera, and Edge.</em></p>
<p id="status">Loading..</p>
<p id="inputs"></p>
<p id="piano">
<p> Don't have a piano? Have this one instead!</p>
<div class="piano-keys">
<div class="piano-white piano-key-F3 piano-key piano-disabled"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Gb3 piano-key"></div></div>
<div class="piano-white piano-key-G3 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Ab3 piano-key"></div></div>
<div class="piano-white piano-key-A3 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Bb3 piano-key"></div></div>
<div class="piano-white piano-key-B3 piano-key"></div>
<div class="piano-white piano-key-C4 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Db4 piano-key"></div></div>
<div class="piano-white piano-key-D4 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Eb4 piano-key"></div></div>
<div class="piano-white piano-key-E4 piano-key"></div>
<div class="piano-white piano-key-F4 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Gb4 piano-key"></div></div>
<div class="piano-white piano-key-G4 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Ab4 piano-key"></div></div>
<div class="piano-white piano-key-A4 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Bb4 piano-key"></div></div>
<div class="piano-white piano-key-B4 piano-key"></div>
<div class="piano-white piano-key-C5 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Db5 piano-key"></div></div>
<div class="piano-white piano-key-D5 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Eb5 piano-key"></div></div>
<div class="piano-white piano-key-E5 piano-key"></div>
<div class="piano-white piano-key-F5 piano-key"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Gb5 piano-key"></div></div>
<div class="piano-white piano-key-G5 piano-key piano-disabled"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Ab5 piano-key piano-disabled"></div></div>
<div class="piano-white piano-key-A5 piano-key piano-disabled"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Bb5 piano-key piano-disabled"></div></div>
<div class="piano-white piano-key-B5 piano-key piano-disabled"></div>
<div class="piano-white piano-key-C6 piano-key piano-disabled"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Db6 piano-key piano-disabled"></div></div>
<div class="piano-white piano-key-D6 piano-key piano-disabled"></div>
<div class="piano-black"><div class="piano-black-raised piano-key-Eb6 piano-key piano-disabled"></div></div>
<div class="piano-white piano-key-E6 piano-key piano-disabled"></div>
</div>
</p>
<label for="log">Log:</label>
<br>
<textarea id="log" rows=6 cols=70></textarea>
</body>
</html>