update so that keyboard and midi both trigger
This commit is contained in:
parent
896d778dee
commit
0afc8f69f6
@ -76,9 +76,6 @@ class Keyboard extends events.EventEmitter{
|
|||||||
//the midi input
|
//the midi input
|
||||||
this._midi = new Midi()
|
this._midi = new Midi()
|
||||||
this._midi.on('keyDown', (note) => {
|
this._midi.on('keyDown', (note) => {
|
||||||
const splash = document.getElementById("splash");
|
|
||||||
splash.classList.add('disappear');
|
|
||||||
container.classList.add('focus');
|
|
||||||
this.keyDown(note);
|
this.keyDown(note);
|
||||||
this._emitKeyDown(note);
|
this._emitKeyDown(note);
|
||||||
});
|
});
|
||||||
@ -114,6 +111,9 @@ class Keyboard extends events.EventEmitter{
|
|||||||
if (!this._active){
|
if (!this._active){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const splash = document.getElementById("splash");
|
||||||
|
splash.classList.add('disappear');
|
||||||
|
container.classList.add('focus');
|
||||||
if (!this._currentKeys[note]){
|
if (!this._currentKeys[note]){
|
||||||
this._currentKeys[note] = 0
|
this._currentKeys[note] = 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user