Compare commits
2 Commits
761a33e540
...
42eb01257b
Author | SHA1 | Date | |
---|---|---|---|
42eb01257b | |||
c13ba1839d |
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user