Phrase mode: count-in no-scoring fix, re-arm timeout for repeated notes, browser QA scripts

This commit is contained in:
2026-09-14 01:22:55 +02:00
parent 486f3c5dcd
commit 909c30192f
10 changed files with 374 additions and 19 deletions

View File

@@ -137,3 +137,18 @@ export const INSTRUMENT_DEFINITIONS: Record<string, InstrumentDefinition> = {
]
}
};
/**
* Clef + display transpose for rendering, shared by the single-note and
* phrase renderers (identical semantics: sounding midi + transpose = written).
*/
export function resolveClefTranspose(
instrumentDef: InstrumentDefinition,
difficulty: string,
): { clef: ClefMode; transpose: number } {
const rangeDef = instrumentDef.ranges.find(r => r.id === difficulty);
return {
clef: rangeDef?.clef ?? instrumentDef.clefMode,
transpose: rangeDef?.transpose ?? instrumentDef.transpose,
};
}