mirror of https://github.com/nealey/vail.git
Handle different MIDI channels
This commit is contained in:
parent
965630e1ad
commit
8ed3cd7b11
|
@ -290,11 +290,13 @@ class Vail {
|
||||||
let data = Array.from(event.data)
|
let data = Array.from(event.data)
|
||||||
|
|
||||||
let begin
|
let begin
|
||||||
switch (Number(data[0])) {
|
let cmd = data[0] >> 4
|
||||||
case 0x90:
|
let chan = data[0] & 0xf
|
||||||
|
switch (cmd) {
|
||||||
|
case 9:
|
||||||
begin = true
|
begin = true
|
||||||
break
|
break
|
||||||
case 0x80:
|
case 8:
|
||||||
begin = false
|
begin = false
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue