-
Notifications
You must be signed in to change notification settings - Fork 2
/
experimental.html
416 lines (403 loc) · 17.4 KB
/
experimental.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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>automat configurator</title>
<meta name="description" content="">
<link rel="icon" type="image/png" href="images/favicon.png">
<script src="webmidi.js"></script>
<script src="experimental.js"></script>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="jsr.css" >
</head>
<body>
<header class="automat-tool__header">
<div class="header__logo">
<a href="https://dadamachines.com"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><path class="frame" d="M77.4 0H0v80h80V0h-2.6zM5.6 74.4V5.6h68.9v 68.9 l -68.9 0 z"></path><path class="typo" d="M 61.4 10.6c-4.4 0-8.1 3.6-8.1 8v50.8h5.6V42.8h5v26.7h5.6v-50.8c0-4.4-3.6-8-8.1-8zm-2.5 26.6v-18.6c0-1.5 1-2.7 2.5-2.7 1.5 0 2.5 1.2 2.5 2.7v18.6l-5 0zM37.4 64V48h2.7a2.7 2.7 0 0 1 2.7 2.7v10.7a2.7 2.7 0 0 1-2.7 2.7m8-13.3a8 8 0 0 0-8-8h-8V69.3h8m0 0a8 8 0 0 0 8-8V50.6M40 10.6c-4.4 0-7.8 3.6-7.8 8v18.6h5v-7.8h5.6v7.8h5v-18.6c0-4.4-3.4-8-7.8-8zm-2.8 13.3v-5.3c0-1.5 1.3-2.7 2.8-2.7 1.5 0 2.8 1.2 2.8 2.7v5.3h-5.6zM16 64v-48h2.7a2.7 2.7 0 0 1 2.7 2.7v42.7a2.7 2.7 0 0 1-2.7 2.7m8-45.3c0-4.4-3.6-8-8-8H10.7v58.7h8a8 8 0 0 0 8-8l0-42.7"></path></svg> </a>
</div>
</header>
<main>
<h1 id="ac-headline">automat – configurator</h1>
<h3 id="connected">automat not connected, please accept web midi and connect automat</h3>
<p>
<button onclick="connect()">Reconnect</button>
</p>
<hr>
<h2>output settings</h2>
<p>Change the behavior of your automat here.</br>Calibrate the velocity range for each output. Set the first handle on the slider for quietest sound and the second for the loudest.</br> To use note on/off without velocity put both handles in the rightmost position.</br>Upload settings with "Write config".</p>
<button class="bb" onclick="readVersion()">Read version</button>
<button class="bb" onclick="readSysex()">Read config</button>
<button class="bb" id="save1" disabled onclick="writeSysex(getConfigDataFromForm())">Write config</button>
<button class="bb" id="save2" onclick="writeSysexConfigToFile(getConfigDataFromForm())">Save to sysex file</button>
<button class="bb" onclick="readSysexConfigFromFile()">Load from sysex file</button>
<button class="bb" id="expb" onclick="loadExperimentalPage()" style="display: none;">Switch to experimental</button>
<input type="file" id="fileElem" single accept=".syx" style="display:none" onchange="readSysexFile(this.files)">
<p id="version_config">
<p id="sysex_config" hidden=true>
</p>
<!-- <form> -->
<table class="config__table" style="width:100%; margin-bottom:50px;" align="left" cellpadding="0" cellspacing="0">
<tr>
<th>Output</th>
<th>Output Mode</th>
<th style="text-align: center;">Velocity Range</th>
<th>Midi Channel</th>
<th>Note</th>
<th>Curve</th>
<th>Duration</th>
<th>Test</th>
<th>Response</th>
</tr>
<tr id="r1">
<td><b>1</b></td>
<td><select id="v1" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-1-1" type="range" min="0" max="127" value="40">
<input id="range-1-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m1"></td>
<td><select id="n1"></td>
<td><select id="c1"></td>
<td><select id="du1" ></td>
<td><button class="trigger" onclick="testNode(1)">test</button></td>
<td><canvas id="d1" width="128" height="100"></td>
</tr>
<tr id="r2">
<td><b>2</b></td>
<td><select id="v2" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-2-1" type="range" min="0" max="127" value="40">
<input id="range-2-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m2"></td>
<td><select id="n2"></td>
<td><select id="c2"></td>
<td><select id="du2" ></td>
<td><button class="trigger" onclick="testNode(2)">test</button></td>
<td><canvas id="d2" width="128" height="100"></td>
</tr>
<tr id="r3">
<td><b>3</b></td>
<td><select id="v3" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-3-1" type="range" min="0" max="127" value="40">
<input id="range-3-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m3"></td>
<td><select id="n3"></td>
<td><select id="c3"></td>
<td><select id="du3" ></td>
<td><button class="trigger" onclick="testNode(3)">test</button></td>
<td><canvas id="d3" width="128" height="100"></td>
</tr>
<tr id="r4">
<td><b>4</b></td>
<td><select id="v4" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-4-1" type="range" min="0" max="127" value="40">
<input id="range-4-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m4"></td>
<td><select id="n4"></td>
<td><select id="c4"></td>
<td><select id="du4" ></td>
<td><button class="trigger" onclick="testNode(4)">test</button></td>
<td><canvas id="d4" width="128" height="100"></td>
</tr>
<tr id="r5">
<td><b>5</b></td>
<td><select id="v5" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-5-1" type="range" min="0" max="127" value="40">
<input id="range-5-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m5"></td>
<td><select id="n5"></td>
<td><select id="c5"></td>
<td><select id="du5" ></td>
<td><button class="trigger" onclick="testNode(5)">test</button></td>
<td><canvas id="d5" width="128" height="100"></td>
</tr>
<tr id="r6">
<td><b>6</b></td>
<td><select id="v6" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-6-1" type="range" min="0" max="127" value="40">
<input id="range-6-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m6"></td>
<td><select id="n6"></td>
<td><select id="c6"></td>
<td><select id="du6" ></td>
<td><button class="trigger" onclick="testNode(6)">test</button></td>
<td><canvas id="d6" width="128" height="100"></td>
</tr>
<tr id="r7">
<td><b>7</b></td>
<td><select id="v7" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-7-1" type="range" min="0" max="127" value="40">
<input id="range-7-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m7"></td>
<td><select id="n7"></td>
<td><select id="c7"></td>
<td><select id="du7" ></td>
<td><button class="trigger" onclick="testNode(7)">test</button></td>
<td><canvas id="d7" width="128" height="100"></td>
</tr>
<tr id="r8">
<td><b>8</b></td>
<td><select id="v8" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-8-1" type="range" min="0" max="127" value="40">
<input id="range-8-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m8"></td>
<td><select id="n8"></td>
<td><select id="c8"></td>
<td><select id="du8" ></td>
<td><button class="trigger" onclick="testNode(8)">test</button></td>
<td><canvas id="d8" width="128" height="100"></td>
</tr>
<tr id="r9">
<td><b>9</b></td>
<td><select id="v9" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-9-1" type="range" min="0" max="127" value="40">
<input id="range-9-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m9"></td>
<td><select id="n9"></td>
<td><select id="c9"></td>
<td><select id="du9" ></td>
<td><button class="trigger" onclick="testNode(9)">test</button></td>
<td><canvas id="d9" width="128" height="100"></td>
</tr>
<tr id="r10">
<td><b>10</b></td>
<td><select id="v10" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-10-1" type="range" min="0" max="127" value="40">
<input id="range-10-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m10"></td>
<td><select id="n10"></td>
<td><select id="c10"></td>
<td><select id="du10" ></td>
<td><button class="trigger" onclick="testNode(10)">test</button></td>
<td><canvas id="d10" width="128" height="100"></td>
</tr>
<tr id="r11">
<td><b>11</b></td>
<td><select id="v11" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-11-1" type="range" min="0" max="127" value="40">
<input id="range-11-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m11"></td>
<td><select id="n11"></td>
<td><select id="c11"></td>
<td><select id="du11" ></td>
<td><button class="trigger" onclick="testNode(11)">test</button></td>
<td><canvas id="d11" width="128" height="100"></td>
</tr>
<tr id="r12">
<td><b>12</b></td>
<td><select id="v12" onchange="outputModeSanityCheck()" ></td>
<td>
<input id="range-12-1" type="range" min="0" max="127" value="40">
<input id="range-12-2" type="range" min="0" max="127" value="40">
</td>
<td><select id="m12"></td>
<td><select id="n12"></td>
<td><select id="c12"></td>
<td><select id="du12" ></td>
<td><button class="trigger" onclick="testNode(12)">test</button></td>
<td><canvas id="d12" width="128" height="100"></td>
</tr>
</table>
<!-- </form> -->
<hr>
<h2>credits</h2>
<p>Firmware and configuration tool development with great support of the dadamachines community.</br> Thanks to <a href="https://github.com/lefty71" target="_blank">Justin Pedro</a> and <a href="https://github.com/jellea" target="_blank">Jelle Akkerman</a>
</br>
</br>
</p>
</main>
<script src="jsr.js"></script>
<script>
var jsr1 = new JSR(['#range-1-1', '#range-1-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr2 = new JSR(['#range-2-1', '#range-2-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr3 = new JSR(['#range-3-1', '#range-3-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr4 = new JSR(['#range-4-1', '#range-4-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr5 = new JSR(['#range-5-1', '#range-5-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr6 = new JSR(['#range-6-1', '#range-6-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr7 = new JSR(['#range-7-1', '#range-7-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr8 = new JSR(['#range-8-1', '#range-8-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr9 = new JSR(['#range-9-1', '#range-9-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr10 = new JSR(['#range-10-1', '#range-10-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr11 = new JSR(['#range-11-1', '#range-11-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr12 = new JSR(['#range-12-1', '#range-12-2'], {
sliders: 2,
min: 0,
max: 127,
values: [10, 40],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsrArray = [jsr1, jsr2, jsr3, jsr4, jsr5, jsr6,
jsr7, jsr8, jsr9, jsr10, jsr11, jsr12];
jsr1.addEventListener('update', (input, value) => {
updateMaxMinRange(1, input, value);
});
jsr2.addEventListener('update', (input, value) => {
updateMaxMinRange(2, input, value);
});
jsr3.addEventListener('update', (input, value) => {
updateMaxMinRange(3, input, value);
});
jsr4.addEventListener('update', (input, value) => {
updateMaxMinRange(4, input, value);
});
jsr5.addEventListener('update', (input, value) => {
updateMaxMinRange(5, input, value);
});
jsr6.addEventListener('update', (input, value) => {
updateMaxMinRange(6, input, value);
});
jsr7.addEventListener('update', (input, value) => {
updateMaxMinRange(7, input, value);
});
jsr8.addEventListener('update', (input, value) => {
updateMaxMinRange(8, input, value);
});
jsr9.addEventListener('update', (input, value) => {
updateMaxMinRange(9, input, value);
});
jsr10.addEventListener('update', (input, value) => {
updateMaxMinRange(10, input, value);
});
jsr11.addEventListener('update', (input, value) => {
updateMaxMinRange(11, input, value);
});
jsr12.addEventListener('update', (input, value) => {
updateMaxMinRange(12, input, value);
});
</script>
</body>
</html>