Compare commits

...

2 Commits

Author SHA1 Message Date
Lamp 42eb01257b Merge branch 'master' of gitea.moe:lamp/piano 2021-12-03 01:23:36 -06:00
Lamp c13ba1839d front not ignore self note 2021-12-03 01:03:59 -06:00
1 changed files with 3 additions and 9 deletions

View File

@ -678,25 +678,19 @@ class Networker {
let key = dv.getUint8(1);
let velocity = dv.getUint8(2) / 255;
let id = dv.getUint8(3);
if (id != this.id) {
piano.keyDown(key, velocity, id);
}
piano.keyDown(key, velocity, id);
break;
}
case 1: { // Key up
let key = dv.getUint8(1);
let sustain = dv.getUint8(2);
let id = dv.getUint8(3);
if (id != this.id) {
piano.keyUp(key, sustain, id);
}
piano.keyUp(key, sustain, id);
break;
}
case 2: { // Sustain release
let id = dv.getUint8(1);
if (id != this.id) {
piano.releaseSustain(id);
}
piano.releaseSustain(id);
}
}
}