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

21
scripts/README.md Normal file
View File

@@ -0,0 +1,21 @@
# Browser QA scripts
Synthetic-microphone end-to-end checks for Phrase Mode (puppeteer-core +
system Chrome). They stub `getUserMedia` with a tunable oscillator feeding a
`MediaStreamDestination`, so note detection is exercised through the real
detection pipeline — not only through virtual taps.
Run:
```sh
npm i --no-save puppeteer-core # does not modify package.json
npm run build
npx vite preview --port 4199 & # serve dist
node scripts/phrase_e2e.cjs # matcher basics (first-note match)
node scripts/phrase_e2e2.cjs # repeated notes, release re-attack,
# timeout re-arm, tempo count-in/misses
```
In-app debug state is available with `localStorage.phraseDebug = '1'`
(`window.__phraseDebug()` returns phase, cursor, statuses, summary, pool,
frame count, mic-gate state). Only ever a QA aid, not part of the UI.