midi: store receiveOsc in conver instance

This commit is contained in:
jean-emmanuel 2019-03-19 12:59:27 +01:00
parent 0607ccbdf1
commit a826391442

View file

@ -38,6 +38,7 @@ class MidiConverter {
init(receiveOsc) {
this.receiveOsc = receiveOsc
this.py.on('message', (message)=>{
MidiConverter.parseIpc(message, this)
})
@ -60,7 +61,7 @@ class MidiConverter {
console.log(data)
}
} else if (name == 'osc') {
receiveOsc(data)
instance.receiveOsc(data)
} else if (name == 'error') {
console.error('ERROR: MIDI: ' + data)
if (instance) instance.stop()