update midi keyboard to fix octave issue
This commit is contained in:
parent
cb63c392ae
commit
5391f3f028
@ -48,14 +48,14 @@ class Midi extends events.EventEmitter{
|
||||
})
|
||||
inputDevice.addListener('noteon', 'all', (event) => {
|
||||
try {
|
||||
this.emit('keyDown', event.note.number)
|
||||
this.emit('keyDown', event.note.number + 12)
|
||||
} catch(e){
|
||||
console.warn(e)
|
||||
}
|
||||
})
|
||||
inputDevice.addListener('noteoff', 'all', (event) => {
|
||||
try {
|
||||
this.emit('keyUp', event.note.number)
|
||||
this.emit('keyUp', event.note.number + 12)
|
||||
} catch(e){
|
||||
console.warn(e)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user