-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
460 lines (426 loc) · 18.6 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
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
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<!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="https://unpkg.com/[email protected]/webmidi.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue.min.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 id="reconbut">
<button onclick="connect()" class="bb">Reconnect</button>
</p>
<hr>
<div id="when-connected">
<h2>sequencer</h2>
<div id="sequencer" style="display: inline-block;">
<button v-if="playing" v-on:click="playToggle">Pause</button>
<button v-else v-on:click="playToggle">Play</button>
<input v-model.number="tempo" type="number" class="bpminput">
<button v-on:click="clearPattern" style="float:right;margin-right:6px">Clear</button>
<div v-for="track in expanded">
<div class="row">
<button v-for="step in 16" class="step"
v-bind:class="{on: (stepq(track,step)==1),accent: (stepq(track,step)==127), playhead: (step-1 === playhead-1)}"
v-on:click="setstep(track,step,1)"
v-on:dblclick="setstep(track,step,127)">
</button>
</div>
</div>
<p>
<a v-if="(expanded == 4)" v-on:click="expanded=12" href="#">show all 12 tracks</a>
<a v-else v-on:click.stop="expanded=4" href="#">hide tracks</a>
- double click for accent
</p>
</div>
<h2>output settings</h2>
<p>Change the behavior of your automat here.</br>Calibrate the velocity range for each output.</br>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 leftmost position with the values 0-0.</br></br>Upload the configuration to your automat with pressing "Write config"</br><b>PLEASE ONLY DO THAT AFTER FINISHING THE CONFIGURATION FOR ALL OUTPUTS</b>.</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 style="text-align: center;">Gate-Time in Milliseconds</th>
<th>Midi Channel</th>
<th>Note</th>
<th>Curve</th>
<th>Test</th>
<th>Response</th>
</tr>
<tr id="r1">
<td><b>1</b></td>
<td>
<input id="range-1-1" type="range" min="0" max="1000" value="40">
<input id="range-1-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m1"></td>
<td><select id="n1"></td>
<td><select id="c1"></td>
<td><button class="trigger" onclick="testNode(1, 1)">L - 1</button>
<button class="trigger" onclick="testNode(1, 127)">H - 127</button></td>
<td><canvas id="d1" width="128" height="100"></td>
</tr>
<tr id="r2">
<td><b>2</b></td>
<td>
<input id="range-2-1" type="range" min="0" max="1000" value="40">
<input id="range-2-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m2"></td>
<td><select id="n2"></td>
<td><select id="c2"></td>
<td><button class="trigger" onclick="testNode(2, 1)">L - 1</button>
<button class="trigger" onclick="testNode(2, 127)">H - 127</button></td>
<td><canvas id="d2" width="128" height="100"></td>
</tr>
<tr id="r3">
<td><b>3</b></td>
<td>
<input id="range-3-1" type="range" min="0" max="1000" value="40">
<input id="range-3-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m3"></td>
<td><select id="n3"></td>
<td><select id="c3"></td>
<td><button class="trigger" onclick="testNode(3, 1)">L - 1</button>
<button class="trigger" onclick="testNode(3, 127)">H - 127</button></td>
<td><canvas id="d3" width="128" height="100"></td>
</tr>
<tr id="r4">
<td><b>4</b></td>
<td>
<input id="range-4-1" type="range" min="0" max="1000" value="40">
<input id="range-4-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m4"></td>
<td><select id="n4"></td>
<td><select id="c4"></td>
<td><button class="trigger" onclick="testNode(4, 1)">L - 1</button>
<button class="trigger" onclick="testNode(4, 127)">H - 127</button></td>
<td><canvas id="d4" width="128" height="100"></td>
</tr>
<tr id="r5">
<td><b>5</b></td>
<td>
<input id="range-5-1" type="range" min="0" max="1000" value="40">
<input id="range-5-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m5"></td>
<td><select id="n5"></td>
<td><select id="c5"></td>
<td><button class="trigger" onclick="testNode(5, 1)">L - 1</button>
<button class="trigger" onclick="testNode(5, 127)">H - 127</button></td>
<td><canvas id="d5" width="128" height="100"></td>
</tr>
<tr id="r6">
<td><b>6</b></td>
<td>
<input id="range-6-1" type="range" min="0" max="1000" value="40">
<input id="range-6-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m6"></td>
<td><select id="n6"></td>
<td><select id="c6"></td>
<td><button class="trigger" onclick="testNode(6, 1)">L - 1</button>
<button class="trigger" onclick="testNode(6, 127)">H - 127</button></td>
<td><canvas id="d6" width="128" height="100"></td>
</tr>
<tr id="r7">
<td><b>7</b></td>
<td>
<input id="range-7-1" type="range" min="0" max="1000" value="40">
<input id="range-7-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m7"></td>
<td><select id="n7"></td>
<td><select id="c7"></td>
<td><button class="trigger" onclick="testNode(7, 1)">L - 1</button>
<button class="trigger" onclick="testNode(7, 127)">H - 127</button></td>
<td><canvas id="d7" width="128" height="100"></td>
</tr>
<tr id="r8">
<td><b>8</b></td>
<td>
<input id="range-8-1" type="range" min="0" max="1000" value="40">
<input id="range-8-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m8"></td>
<td><select id="n8"></td>
<td><select id="c8"></td>
<td><button class="trigger" onclick="testNode(8, 1)">L - 1</button>
<button class="trigger" onclick="testNode(8, 127)">H - 127</button></td>
<td><canvas id="d8" width="128" height="100"></td>
</tr>
<tr id="r9">
<td><b>9</b></td>
<td>
<input id="range-9-1" type="range" min="0" max="1000" value="40">
<input id="range-9-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m9"></td>
<td><select id="n9"></td>
<td><select id="c9"></td>
<td><button class="trigger" onclick="testNode(9, 1)">L - 1</button>
<button class="trigger" onclick="testNode(9, 127)">H - 127</button></td>
<td><canvas id="d9" width="128" height="100"></td>
</tr>
<tr id="r10">
<td><b>10</b></td>
<td>
<input id="range-10-1" type="range" min="0" max="1000" value="40">
<input id="range-10-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m10"></td>
<td><select id="n10"></td>
<td><select id="c10"></td>
<td><button class="trigger" onclick="testNode(10, 1)">L - 1</button>
<button class="trigger" onclick="testNode(10, 127)">H - 127</button></td>
<td><canvas id="d10" width="128" height="100"></td>
</tr>
<tr id="r11">
<td><b>11</b></td>
<td>
<input id="range-11-1" type="range" min="0" max="1000" value="40">
<input id="range-11-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m11"></td>
<td><select id="n11"></td>
<td><select id="c11"></td>
<td><button class="trigger" onclick="testNode(11, 1)">L - 1</button>
<button class="trigger" onclick="testNode(11, 127)">H - 127</button></td>
<td><canvas id="d11" width="128" height="100"></td>
</tr>
<tr id="r12">
<td><b>12</b></td>
<td>
<input id="range-12-1" type="range" min="0" max="1000" value="40">
<input id="range-12-2" type="range" min="0" max="1000" value="40">
</td>
<td><select id="m12"></td>
<td><select id="n12"></td>
<td><select id="c12"></td>
<td><button class="trigger" onclick="testNode(12, 1)">L - 1</button>
<button class="trigger" onclick="testNode(12, 127)">H - 127</button></td>
<td><canvas id="d12" width="128" height="100"></td>
</tr>
</table>
<!-- </form> -->
</div>
<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: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr2 = new JSR(['#range-2-1', '#range-2-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr3 = new JSR(['#range-3-1', '#range-3-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr4 = new JSR(['#range-4-1', '#range-4-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr5 = new JSR(['#range-5-1', '#range-5-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr6 = new JSR(['#range-6-1', '#range-6-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr7 = new JSR(['#range-7-1', '#range-7-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr8 = new JSR(['#range-8-1', '#range-8-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr9 = new JSR(['#range-9-1', '#range-9-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr10 = new JSR(['#range-10-1', '#range-10-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr11 = new JSR(['#range-11-1', '#range-11-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
labels: {
minMax: false
},
grid: false,
log: 'info'
});
var jsr12 = new JSR(['#range-12-1', '#range-12-2'], {
sliders: 2,
min: 0,
max: 1000,
step: 1,
values: [80, 320],
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>
<script src="main.js"></script>
<script src="sequencer.js"></script>
</body>
</html>