-
Notifications
You must be signed in to change notification settings - Fork 0
/
index8.html
683 lines (622 loc) · 21.1 KB
/
index8.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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
<!DOCTYPE html>
<html lang="en">
<head>
<title>FP30 playground webmidi</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://code.jquery.com/ui/1.12.1/themes/dark-hive/jquery-ui.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<style>
body{
font-family:verdana,sans-serif;
font-size:12pt;
background-color:#333
}
h2{
color:#ccc;
margin-left:4px;
}
fieldset{
font-size:11pt;
margin:0px;
padding:0px;
border-color:#777;
border-radius: 8px;
width:100%;
}
select{
height:30px;
font-size:12pt;
font-weight:bold;
border-radius: 4px;
background:#444;
color:#ddd;
}
input[type=checkbox]{
-ms-transform: scale(1.5); /* IE */
-moz-transform: scale(1.5); /* FF */
-webkit-transform: scale(1.5); /* Safari and Chrome */
-o-transform: scale(1.5); /* Opera */
transform: scale(1.5);
padding:0px;
margin:0px;
}
input[type=text]{
width:38px;
background:#555;
color:#eee;
border:1;
}
button{
width:30px;
height:30px;
font-size:11pt;
border-radius: 4px;
background-color:#555;
color:#ddd;
}
div{
margin-left:12px;
margin-right:12px;
margin-top:20px;
margin-bottom:20px;
}
label{
color:#ccc;
margin:3px;
}
.labslide{
font-size:10pt;
color:#ccc;
margin:3px;
}
.slider {
-webkit-appearance: none;
width: 60%;
height: 15px;
border-radius: 5px;
background: #888;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 30px;
height: 30px;
border-color:#000;
border-width:1px;
border-radius: 30%;
background: #6ad;
cursor: pointer;
}
.slider::-moz-range-thumb {
width: 30px;
height: 30px;
border-color:#000;
border-width:1px;
border-radius: 30%;
background: #6ad;
cursor: pointer;
}
canvas{
background: #aaa;
border-radius: 6px;
margin:5px;
}
</style>
<script type="text/javascript">
var midi = null; // global MIDIAccess object
var midiinput = null;
var midioutput = null;
var midiIn = [];
var midiOut = [];
var sounds=null;
var part=0;
var midiloopback = true;
var midilocal = false;
var midisustain = true;
var sysex_init = new Uint8Array([0xF0,0x41,0x10,0x42,0x12]);
var sysex_end = new Uint8Array([0xF7]);
function checksum(data){ //Roland checksum for sysex
var check = 0;
for (i=0;i<data.length;i++)
check = check+data[i];
check = check % 128;
check = 128-check;
return check;
}
function reset(){
if (midioutput){
midioutput.send([0xb0,0x78,0x00]); // All sounds off
midioutput.send([0xb2,0x78,0x00]);
midioutput.send([0xb4,0x78,0x00]);
midioutput.send([0xb0,0x7B,0x00]); // All notes off
midioutput.send([0xb2,0x7B,0x00]);
midioutput.send([0xb4,0x7B,0x00]);
midioutput.send([0xb0,0x79,0x00]); //#Reset all
midioutput.send([0xb2,0x79,0x00]);
midioutput.send([0xb4,0x79,0x00]);
}
}
function setvolumen(value=127){
$("#vol").text(value);
if (midioutput)
midioutput.send([0xb0+part,0x07,value]);
}
function setmodulation(value=0){
$("#molabel").text(value);
if (midioutput)
midioutput.send([0xb0+part,1,value]);
}
function setpitchbend(value=64){
$("#pblabel").text(value);
if (midioutput)
midioutput.send([0xe0+part,0,value]);
}
function setexpression(value=127){
if (midioutput)
midioutput.send([0xb0+part,0x11,value]);
}
function setreverb(value=0){
$("#rev").text(value);
if (midioutput)
midioutput.send([0xb0+part,91,value]);
}
function setchorus(value=0){
$("#cho").text(value);
if (midioutput)
midioutput.send([0xb0+part,93,value]);
}
function setreverbtype(value){
var select = $("#selectReverb")[0];
var data = new Uint8Array([0x40,0x01,0x30,select.selectedIndex]); //sysex for global reverb efx type
var sysexmsg = new Uint8Array(11);
for (i=0;i<5;i++)
sysexmsg[i] = sysex_init[i];
for (i=0;i<4;i++)
sysexmsg[i+5] = data[i];
sysexmsg[9] = checksum(data);
sysexmsg[10] = sysex_end[0];
//alert(sysexmsg);
if (midioutput)
midioutput.send(sysexmsg);
}
function setchorustype(value){
var select = $("#selectChorus")[0];
var data = select.selectedIndex;
var data = [0x40,0x01,0x38,select.selectedIndex]; //sysex for global chorus efx type
var sysexmsg = new Uint8Array(11);
for (i=0;i<5;i++)
sysexmsg[i] = sysex_init[i];
for (i=0;i<4;i++)
sysexmsg[i+5] = data[i];
sysexmsg[9] = checksum(data);
sysexmsg[10] = sysex_end[0];
if (midioutput)
midioutput.send(sysexmsg);
}
function setattack(value=64,inc=0){
if (inc!=0)
value = parseInt($("#attack")[0].value)+inc;
$("#att").text(value);
$("#attack")[0].value=value;
if (midioutput)
midioutput.send([0xb0+part,73,value]);
}
function setrelease(value=64,inc=0){
if (inc!=0)
value = parseInt($("#release")[0].value)+inc;
$("#rel").text(value);
$("#release")[0].value=value;
if (midioutput)
midioutput.send([0xb0+part,72,value]);
}
function setcutoff(value=64,inc=0){
if (inc!=0)
value = parseInt($("#cutoff")[0].value)+inc;
$("#cut").text(value);
$("#cutoff")[0].value=value;
if (midioutput)
midioutput.send([0xb0+part,74,value]);
}
function setdecay(value=64,inc=0){
if (inc!=0)
value = parseInt($("#decay")[0].value)+inc;
$("#dec").text(value);
$("#decay")[0].value=value;
if (midioutput)
midioutput.send([0xb0+part,75,value]);
}
function setpcbank(){
var pc = $("#pc").val();
var msb = $("#msb").val();
var lsb = $("#lsb").val();
//alert (pc+" "+msb+" "+lsb);
if (midioutput){
midioutput.send([0xb0+part,0x00,msb]); // bank msb
midioutput.send([0xb0+part,0x20,lsb]); // bank lsb
midioutput.send([0xc0+part,pc-1]); // program change
}
}
function setslidecc(value=0){
$("#cclabel").text(value);
var cc = $("#cc").val();
//alert("CC "+cc+" val:"+value)
if (midioutput)
midioutput.send([0xb0+part,cc,value]);
}
function changepart(value){
//alert(value);
part = value;
}
function selectedSound1(){
var select = $("#selectSound1")[0];
//alert("SS1:"+select.selectedIndex);
$("#selectSound2 option").each(function(index, option) {
$(option).remove();
});
var select2 = $("#selectSound2")[0];
for(var i = 0; i < sounds["voice"].length; i++) {
var group = sounds["voice"][i]["Set"]+"-"+sounds["voice"][i]["Category"];
if (select.value == group){
var opt = sounds["voice"][i]["content"]
var el = document.createElement("option");
el.textContent = opt;
el.value = sounds["voice"][i]["PC"]+"_"+sounds["voice"][i]["MSB"]+"_"+sounds["voice"][i]["LSB"];
select2.appendChild(el);
}
}
$("#selectSound2").selectmenu("refresh");
selectedSound2();
}
function selectedSound2(){
var select = $("#selectSound2")[0];
var pc = select.value.split("_")[0];
var msb = select.value.split("_")[1];
var lsb = select.value.split("_")[2];
//alert (pc+" "+msb+" "+lsb);
if (midioutput){
midioutput.send([0xb0+part,0x00,msb]); // bank msb
midioutput.send([0xb0+part,0x20,lsb]); // bank lsb
midioutput.send([0xc0+part,pc-1]); // program change
}
//$(':focus').blur();
setattack(64);
setrelease(64);
setcutoff(64);
setdecay(64);
$("#pc").val(pc);
$("#msb").val(msb);
$("#lsb").val(lsb);
}
function selectmidilocal(cb){
midilocal=cb.checked;
// Send midi looplocal command
var data=[];
if (midilocal)
data = [0xb0,0x7A,0x7F];
else
data = [0xb0,0x7A,0x00];
//alert("midilocal:"+midilocal);
if (midioutput)
midioutput.send(data);
}
function selectloopback(cb){
midiloopback=cb.checked;
midisustain=cb.checked;
$("#midisustain")[0].checked = cb.checked;
}
function selectmidisustain(cb){
midisustain=cb.checked;
}
function echoMIDIMessage( event ) {
//console.log(event.data)
if (midiloopback && midioutput) {
if ((midisustain)||(event.data[0]<176)){
console.log(event.data);
midioutput.send( event.data, event.timestamp );
}
}
}
function initDevices(midi) {
// MIDI devices that send you data.
const inputs = midi.inputs.values();
for (let input = inputs.next(); input && !input.done; input = inputs.next()) {
midiIn.push(input.value);
}
// MIDI devices that you send data to.
const outputs = midi.outputs.values();
for (let output = outputs.next(); output && !output.done; output = outputs.next()) {
midiOut.push(output.value);
}
var select = document.getElementById("selectInterface");
var options = midiIn;
for(var i = 0; i < options.length; i++) {
var opt = options[i].name;
var el = document.createElement("option");
el.textContent = opt;
el.value = opt;
select.appendChild(el);
}
//displayDevices();
//startListening();
}
function selectedInterface(){
var selectint = document.getElementById("selectInterface");
if (selectint.selectedIndex==0){
$("#con").text("Not connected!");
$("#con").css("color","#CCC");
midioutput = null;
return;
}
//alert(selectint.options[selectint.selectedIndex].index);
var interfacename = midiIn[selectint.options[selectint.selectedIndex].index-1].name
//alert(interfacename);
// Search this name on midi outputs
midioutput = null;
for (var i=0;i<midiOut.length;i++)
if (midiOut[i].name == interfacename){
// Connect midioutput
midioutput = midiOut[i]
//alert("Connected to: "+midioutput.name)
$("#con").text("Connected!");
$("#con").css("color","#008000");
break;
}
midiinput = midiIn[selectint.options[selectint.selectedIndex].index-1]
midiinput.onmidimessage = echoMIDIMessage;
//alert(midiinput.name);
// Reset
selectmidilocal($("#cbox1")[0]); // set midilocal state
setvolumen(127);
setreverb(0x0e);
setchorus(0);
setattack(64);
setrelease(64);
setcutoff(64);
setdecay(64);
reset();
}
function onMIDISuccess( midiAccess ) {
console.log( "MIDI sucess!" );
midi = midiAccess
initDevices(midi);
//if (!midiinput || !midioutput)
// console.log("Uh oh! Couldn't get i/o ports.");
}
function onMIDIFailure(msg) {
console.log( "Failed to get MIDI access - " + msg );
alert("Failed to get MIDI access - " + msg)
}
function setup(){
navigator.requestMIDIAccess({sysex:true}).then( onMIDISuccess, onMIDIFailure );
$.getJSON( "https://jjulio.github.io/FP30test/sounds2.json", function(data) {
console.log( "sounds load success" );
sounds = data["voices"]
var select1 = $("#selectSound1")[0];
var select2 = $("#selectSound1")[0];
//var select = document.getElementById("selectSound");
var group = ""
for(var i = 0; i < sounds["voice"].length; i++) {
var newgroup = sounds["voice"][i]["Set"]+"-"+sounds["voice"][i]["Category"];
if (newgroup != group){
var el = document.createElement("option");
el.textContent = newgroup;
el.value = newgroup;
select1.appendChild(el);
group = newgroup;
}
}
$("#selectSound1").selectmenu("refresh");
selectedSound1();
});
}
function canvastend(canvas){
var ctx = canvas.getContext('2d');
//ctx.clear();
ctx.clearRect(0, 0, canvas.width, canvas.height);
canvas.pendown=false;
setpitchbend(64);
setmodulation(0);
}
function canvaststart(canvas){
e = window.event;
if (e.target == canvas) {
e.preventDefault();
}
var touch = e.touches[0];
var BB = canvas.getBoundingClientRect();
var offsetX=BB.left;
var offsetY=BB.top;
var x = parseInt(touch.clientX-offsetX);
var y = parseInt(touch.clientY-offsetY);
var ctx = canvas.getContext('2d');
ctx.fillRect(x,y, 8, 8);
canvas.pendown=true;
var centerx = canvas.width/2;
var centery = canvas.height/2;
var pitchbend = Math.min(Math.max(parseInt((x*128)/canvas.width), 0), 127);
var modulation = 0;
if ((y-centery)<0)
modulation = Math.min(Math.max(parseInt((centery-y)*128/centery),0),127);
setpitchbend(pitchbend);
setmodulation(modulation);
//$("#pblabel").text(pitchbend+" "+x+" "+offsetX);
//$("#molabel").text(modulation+" "+y+" "+offsetY);
}
function canvastmove(canvas){
e = window.event;
if (e.target == canvas) {
e.preventDefault();
}
var touch = e.touches[0];
var BB = canvas.getBoundingClientRect();
var offsetX=BB.left;
var offsetY=BB.top;
var x = parseInt(touch.clientX-offsetX);
var y = parseInt(touch.clientY-offsetY);
if (canvas.pendown){
e = window.event;
var ctx = canvas.getContext('2d');
ctx.fillRect(x,y, 8, 8);
var centerx = canvas.width/2;
var centery = canvas.height/2;
var pitchbend = Math.min(Math.max(parseInt((x*128)/canvas.width), 0), 127);
var modulation = 0;
if ((y-centery)<0)
modulation = Math.min(Math.max(parseInt((centery-y)*128/centery),0),127);
setpitchbend(pitchbend);
setmodulation(modulation);
//$("#pblabel").text(pitchbend+" "+x+" "+offsetX);
//$("#molabel").text(modulation+" "+y+" "+offsetY);
}
}
function canvasdown(canvas){
e = window.event;
var ctx = canvas.getContext('2d');
ctx.fillRect(e.offsetX, e.offsetY, 5, 5);
canvas.pendown=true;
var centerx = canvas.width/2;
var centery = canvas.height/2;
var pitchbend = Math.min(Math.max(parseInt((e.offsetX*128)/canvas.width), 0), 127);
var modulation = 0;
if ((e.offsetY-centery)<0)
modulation = Math.min(Math.max(parseInt((centery-e.offsetY)*128/centery),0),127);
setpitchbend(pitchbend);
setmodulation(modulation);
$("#pblabel").text(pitchbend+" "+e.offsetX);
$("#molabel").text(modulation+" "+e.offsetY);
}
function canvasmove(canvas){
if (canvas.pendown){
e = window.event;
var ctx = canvas.getContext('2d');
ctx.fillRect(e.offsetX, e.offsetY, 5, 5);
var centerx = canvas.width/2;
var centery = canvas.height/2;
var pitchbend = Math.min(Math.max(parseInt((e.offsetX*128)/canvas.width), 0), 127);
var modulation = 0;
if ((e.offsetY-centery)<0)
modulation = Math.min(Math.max(parseInt((centery-e.offsetY)*128/centery),0),127);
setpitchbend(pitchbend);
setmodulation(modulation);
$("#pblabel").text(pitchbend+" "+e.offsetX+" "+canvas.offsetLeft);
$("#molabel").text(modulation+" "+e.offsetY+" "+canvas.offsetTop);
}
}
function canvasup(canvas){
var ctx = canvas.getContext('2d');
//ctx.clear();
ctx.clearRect(0, 0, canvas.width, canvas.height);
canvas.pendown=false;
setpitchbend(64);
setmodulation(0);
}
</script>
</head>
<body onload="setup();">
<div><h2>FP30 Playground</h2></div>
<div>
<select id="selectInterface">
<option>Choose Midi interface</option>
</select>
<label id="con" style="color:#777;font-size:11pt;"> Not connected</label>
</div>
<fieldset>
<div style="margin-top:10px;">
<input type="checkbox" id="cbox1" onchange="selectmidilocal(this);"> <label>Main keyboard (Midi local)</label>
</div>
<div style="margin-bottom:5px;">
<input type="checkbox" id="cbox2" checked="checked" onchange="selectloopback(this);"> <label>New sounds (Midi loopback) </label>
<input type="checkbox" id="midisustain" checked="checked" onchange="selectmidisustain(this);"> <label>Sustain(CC)</label>
</div>
</fieldset>
<div id="radioset" style="padding:4px;margin:0px;font-size:10pt;">
<input type="radio" id="part1" name="radio" onchange="changepart(0);" checked="checked"><label for="part1">Part1(main)</label>
<input type="radio" id="part3" name="radio" onchange="changepart(2);"><label for="part3">Part3(split)</label>
<input type="radio" id="part5" name="radio" onchange="changepart(4);"><label for="part5">Part5(dual)</label>
</div>
<div style="padding:6px;margin:0px;">
<label for="selectSound" style="font-weight:bold;">SOUND:</label>
<select id="selectSound1" name="selectSound1"></select>
<select id="selectSound2" name="selectSound2"></select>
</div>
<div><input type="range" min="0" max="127" value="127" class="slider" id="volumen" oninput="setvolumen(this.value);"><label class="labslide">Volume</label><label class="labslide" id="vol">127</label></div>
<div>
<label for="selectReverb" style="color:#777;font-size:11pt;">Reverb type:</label>
<select id="selectReverb">
<option>Room1</option><option>Room2</option><option>Room3</option><option>Hall1</option><option>Hall2(def)</option><option>Plate</option><option>Delay</option><option>Pan delay</option>
</select>
<label for="selectChorus" style="color:#777;font-size:11pt;">Chorus type:</label>
<select id="selectChorus">
<option>Chorus1</option><option>Chorus2</option><option>Chorus3(def)</option><option>Chorus4</option><option>Feedback Chorus</option><option>Flanger</option><option>Short delay</option><option>Short Delay FB</option>
</select>
</div>
<div><input type="range" min="0" max="127" value="15" class="slider" id="reverb" oninput="setreverb(this.value);"><label class="labslide">Reverb</label><label class="labslide" id="rev">15</label></div>
<div><input type="range" min="0" max="127" value="0" class="slider" id="chorus" oninput="setchorus(this.value);"><label class="labslide">Chorus</label><label class="labslide" id="cho">0</label></div>
<fieldset style="height:1px;margin:0px;padding:0px;"></fieldset>
<div>
<input type="range" min="0" max="127" value="64" class="slider" style="width:50%;" id="attack" oninput="setattack(this.value);">
<button onclick="setattack(0,1);">+</button><button onclick="setattack(0,-1);">-</button><button onclick="setattack(64);">R</button>
<label class="labslide">Attack</label><label class="labslide" id="att">64</label>
</div>
<div>
<input type="range" min="0" max="127" value="64" class="slider" style="width:50%;" id="release" oninput="setrelease(this.value);">
<button onclick="setrelease(0,1);">+</button><button onclick="setrelease(0,-1);">-</button><button onclick="setrelease(64);">R</button>
<label class="labslide">Release</label><label class="labslide" id="rel">64</label>
</div>
<div>
<input type="range" min="0" max="127" value="64" class="slider" style="width:50%;" id="cutoff" oninput="setcutoff(this.value);">
<button onclick="setcutoff(0,1);">+</button><button onclick="setcutoff(0,-1);">-</button><button onclick="setcutoff(64);">R</button>
<label class="labslide">Cutoff</label><label class="labslide" id="cut">64</label>
</div>
<div>
<input type="range" min="0" max="127" value="64" class="slider" style="width:50%;" id="decay" oninput="setdecay(this.value);">
<button onclick="setdecay(0,1);">+</button><button onclick="setdecay(0,-1);">-</button><button onclick="setdecay(64);">R</button>
<label class="labslide">Decay</label><label class="labslide" id="dec">64</label>
</div>
<!--<fieldset style="margin:0px;padding:0px;">-->
<fieldset style="margin:2px;padding:0px;">
<div style="margin:2px;padding:0px;"><label>Pitch Bend(<-->)</label><label class="labslide" id="pblabel">64</label><label> - Modulation(up)</label><label class="labslide" id="molabel">0</label></div>
<div style="width:98%;margin:0px;padding:0px;" id="canvasdiv"><canvas id="myCanvas" width="100" height="160"
onmousedown="canvasdown(this);" onmousemove="canvasmove(this);" onmouseup="canvasup(this);"
ontouchend="canvastend(this);" ontouchstart="canvaststart(this);" ontouchmove="canvastmove(this);"></canvas>
</div>
</fieldset>
<div>
<label>Sound PC:</label><input type="text" id="pc" value="-">
<label>Bank MSB:</label><input type="text" id="msb" value="-">
<label>Bank LSB:</label><input type="text" id="lsb" value="-">
<button style="width:auto;height:auto;" onclick="setpcbank();">SET</button>
</div>
<div>
<label class="labslide">CC:</label><input type="text" id="cc" value="1">
<input type="range" min="0" max="127" value="0" class="slider" style="height:10px;width:60%;" id="slidecc" oninput="setslidecc(this.value);">
<label class="labslide" id="cclabel">0</label>
</div>
<button style="width:auto;height:auto;margin:10px;" onclick="reset();setvolumen(127);">RESET MIDI</button>
<fieldset style="height:10px;margin:5px;padding:0px;"></fieldset>
<script>
$("#selectInterface").selectmenu({change: function(event,data){selectedInterface();}});
$("#selectSound1").selectmenu({ width : 'auto',change: function(event,data){selectedSound1();}});
$("#selectSound2").selectmenu({ width : 'auto',change: function(event,data){selectedSound2();}});
$( "#radioset" ).buttonset();
$("#selectReverb").selectmenu({width:'140pt',change: function(event,data){setreverbtype();}});
$("#selectReverb").val("Hall2(def)").selectmenu("refresh");
$("#selectChorus").selectmenu({width:'140pt',change: function(event,data){setchorustype();}});
$("#selectChorus").val("Chorus3(def)").selectmenu("refresh");
$(window).bind('beforeunload', function(){
console.log("Midi local on...");
var data = [0xb0,0x7A,0x7F];
if (midioutput)
midioutput.send(data);
});
$("#myCanvas")[0].width=$("#canvasdiv").width();
</script>
</body>
</html>