|
|
|
@ -43,7 +43,6 @@ export const MidiController = (midiDeviceSubstring) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
input.on('message', (deltaTime, message) => { |
|
|
|
|
console.log(message) |
|
|
|
|
// https://www.cs.cf.ac.uk/Dave/Multimedia/node158.html has some helpful
|
|
|
|
|
// information interpreting the messages.
|
|
|
|
|
const [status, data1, data2] = message; |
|
|
|
@ -54,7 +53,6 @@ export const MidiController = (midiDeviceSubstring) => { |
|
|
|
|
case CONT_CHANGE: |
|
|
|
|
const controlId = data1 |
|
|
|
|
const value = data2 / 127 |
|
|
|
|
// console.log(value, controlId)
|
|
|
|
|
midiController.emit(`${chan}:ControlChange:${controlId}`, { value, deltaTime, controlId }) |
|
|
|
|
break; |
|
|
|
|
case NOTE_OFF: |
|
|
|
|