feat(bench): real-song benchmark

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 15:00:55 +01:00
co-authored by Claude Sonnet 5.5
parent f0249995cf
commit d623026f6d
4 changed files with 235 additions and 3 deletions
+2 -2
View File
@@ -30,12 +30,12 @@ export const DRUM_CLASSES: Record<DrumClass, number[]> = {
};
const PASS_F1 = 0.85;
function drumClass(pitch: number): DrumClass | null {
export function drumClass(pitch: number): DrumClass | null {
for (const [c, ps] of Object.entries(DRUM_CLASSES)) if (ps.includes(pitch)) return c as DrumClass;
return null;
}
// Drum pitches are compared by class: map to the class's first GM number; unknown pitches stay distinct.
const toClassPitch = (n: TimedNote): TimedNote => {
export const toClassPitch = (n: TimedNote): TimedNote => {
const c = drumClass(n.pitch);
return { ...n, pitch: c ? DRUM_CLASSES[c][0]! : 1000 + n.pitch };
};