fix: final-review findings (median pass tick, R11 secondary metrics, R12 chord duration, render version, dsp resample)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 05:55:04 +01:00
co-authored by Claude Sonnet 5.5
parent 2b7d5ffbeb
commit b631bd2c7e
16 changed files with 199 additions and 48 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import type { TierId } from "../gen/tiers.ts";
import { buildSong, loadSongDir } from "./dataset.ts";
import { createPipeline } from "../pipeline/run.ts";
import { scoreSong, type OracleFlags } from "../eval/score.ts";
import { renderReport, type BenchRun } from "./report.ts";
import { renderReport, resultsJson, type BenchRun } from "./report.ts";
export const MODES: Record<string, OracleFlags> = {
"full": { oracleStems: false, oracleTempo: false, oracleNotes: false },
@@ -49,7 +49,7 @@ export async function runBench(opts: {
const t0 = performance.now();
const res = await pipeline({ mix, oracle: { stems, truth } }, mode.flags);
const seconds = (performance.now() - t0) / 1000;
const score = scoreSong(truth, res.output, mode.flags);
const score = scoreSong(truth, res.output, mode.flags, res.gp);
const d = join(outDir, mode.name);
await mkdir(d, { recursive: true });
await Bun.write(join(d, "notes.json"), JSON.stringify({
@@ -63,7 +63,7 @@ export async function runBench(opts: {
}
const rdir = opts.resultsDir ?? "results";
await mkdir(rdir, { recursive: true });
await Bun.write(join(rdir, `${opts.runId}.json`), JSON.stringify(run, null, 1));
await Bun.write(join(rdir, `${opts.runId}.json`), resultsJson(run));
await Bun.write(join(rdir, `${opts.runId}.md`), renderReport(run));
return run;
}