Isolate piano demo voices from live mono/poly grouping

This commit is contained in:
Jage9
2026-02-23 01:53:10 -05:00
parent 5d88fce752
commit 92aabd54ef
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
// Maintainer-controlled web client version. // Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
window.CHGRID_WEB_VERSION = "2026.02.23 R218"; window.CHGRID_WEB_VERSION = "2026.02.23 R219";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit"; window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -1070,6 +1070,7 @@ function playLocalPianoNote(
keyId: string, keyId: string,
midi: number, midi: number,
config: ReturnType<typeof getPianoParams>, config: ReturnType<typeof getPianoParams>,
sourceGroupId?: string,
): void { ): void {
const ctx = audio.context; const ctx = audio.context;
const destination = audio.getOutputDestinationNode(); const destination = audio.getOutputDestinationNode();
@@ -1078,7 +1079,7 @@ function playLocalPianoNote(
const sourceY = item.carrierId === state.player.id ? state.player.y : item.y; const sourceY = item.carrierId === state.player.id ? state.player.y : item.y;
pianoSynth.noteOn( pianoSynth.noteOn(
keyId, keyId,
`local:${itemId}`, sourceGroupId ?? `local:${itemId}`,
midi, midi,
config.instrument, config.instrument,
config.voiceMode, config.voiceMode,
@@ -1149,7 +1150,7 @@ function startPianoDemo(item: WorldItem, itemId: string): void {
if (event.on) { if (event.on) {
if (activePianoDemoNotes.has(logicalKey)) return; if (activePianoDemoNotes.has(logicalKey)) return;
activePianoDemoNotes.set(logicalKey, { runtimeKey, midi: event.midi }); activePianoDemoNotes.set(logicalKey, { runtimeKey, midi: event.midi });
playLocalPianoNote(liveItem, itemId, runtimeKey, event.midi, config); playLocalPianoNote(liveItem, itemId, runtimeKey, event.midi, config, `demo:${itemId}`);
} else { } else {
const active = activePianoDemoNotes.get(logicalKey); const active = activePianoDemoNotes.get(logicalKey);
if (active) { if (active) {