commit
2d26894452
1 changed files with 5 additions and 1 deletions
|
@ -58,12 +58,16 @@ WebMidi.enable(function (err) { //check if WebMidi.js is enabled
|
||||||
}
|
}
|
||||||
midiSelectSlider = select("#slider");
|
midiSelectSlider = select("#slider");
|
||||||
midiSelectSlider.attribute("max", WebMidi.inputs.length - 1);
|
midiSelectSlider.attribute("max", WebMidi.inputs.length - 1);
|
||||||
midiSelectSlider.changed(inputChanged);
|
midiSelectSlider.input(inputChanged);
|
||||||
midiIn = WebMidi.inputs[midiSelectSlider.value()]
|
midiIn = WebMidi.inputs[midiSelectSlider.value()]
|
||||||
inputChanged();
|
inputChanged();
|
||||||
});
|
});
|
||||||
|
|
||||||
function inputChanged() {
|
function inputChanged() {
|
||||||
|
isKeyOn.fill(0);
|
||||||
|
controllerChange(64, 0);
|
||||||
|
controllerChange(67, 0);
|
||||||
|
|
||||||
midiIn.removeListener();
|
midiIn.removeListener();
|
||||||
midiIn = WebMidi.inputs[midiSelectSlider.value()];
|
midiIn = WebMidi.inputs[midiSelectSlider.value()];
|
||||||
midiIn.addListener('noteon', "all", function (e) {
|
midiIn.addListener('noteon', "all", function (e) {
|
||||||
|
|
Loading…
Reference in a new issue