Compare commits

..

No commits in common. "42eb01257b95683182933378034c9fc0256cdf73" and "761a33e5407b2eee85287845dcb2515fdcee9153" have entirely different histories.

View File

@ -678,22 +678,28 @@ 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);
}
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);
}
break;
}
case 2: { // Sustain release
let id = dv.getUint8(1);
if (id != this.id) {
piano.releaseSustain(id);
}
}
}
}
keyDown(key, velocity) {
let buffer = new ArrayBuffer(3);