mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-11-03 22:03:54 +01:00
Phrase mode: QA updates (tempo timing verification, auto-continue, expanded library documented)
This commit is contained in:
@@ -344,6 +344,9 @@ export const PhraseTrainer = forwardRef<PhraseHandle, PhraseTrainerProps>(
|
||||
if (localStorage.getItem('phraseDebug') === '1') {
|
||||
w.__phraseDebug = () => ({
|
||||
frames: rawFrameCount(),
|
||||
audioNow: audioEngine.now(),
|
||||
scoreStart: trainer.scoreStart,
|
||||
spb: trainer.spb,
|
||||
micGate: audioEngine.isAudible(),
|
||||
micBlanked: audioEngine.isMicBlanked(),
|
||||
phase: trainer.phase,
|
||||
@@ -354,6 +357,7 @@ export const PhraseTrainer = forwardRef<PhraseHandle, PhraseTrainerProps>(
|
||||
firstNote: events[0]?.pitch?.midi ?? null,
|
||||
scoreOk,
|
||||
material: phrase.material,
|
||||
midis: events.map(e => (e.pitch ? e.pitch.midi : null)),
|
||||
});
|
||||
} else {
|
||||
delete w.__phraseDebug;
|
||||
|
||||
@@ -57,6 +57,10 @@ export interface PhraseTrainerApi {
|
||||
/** Event index currently up (cursor for renderer/hints). */
|
||||
readonly currentIdx: number;
|
||||
readonly countInLeft: number;
|
||||
/** Audio-clock start of the current run's score (diagnostics/QA). */
|
||||
readonly scoreStart: number;
|
||||
/** Seconds per quarter beat (diagnostics/QA). */
|
||||
readonly spb: number;
|
||||
readonly error: string | null;
|
||||
readonly summary: PhraseSummary;
|
||||
/** True when the current note is a repeated pitch still blocked by the
|
||||
@@ -560,6 +564,8 @@ export function usePhraseTrainer(
|
||||
statuses,
|
||||
currentIdx,
|
||||
countInLeft,
|
||||
scoreStart: scoreStartRef.current,
|
||||
spb: spbRef.current,
|
||||
error,
|
||||
summary,
|
||||
start,
|
||||
|
||||
Reference in New Issue
Block a user