mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-11-03 22:03:54 +01:00
Arpeggio sequences + auto-start on first note
- Sequence mode: bars (2/4/6/8) with one chord per bar, chosen by functional rules (I->IV/V/vi...), diatonic cycle, or random (no immediate repeats); deterministic via melody seed. Chord symbols per bar in the score model (chordSymbols) rendered above the staff via setSection. - Rhythm: quarters or eighths (cycling up/down through the pattern). - Single-chord mode unchanged (whole path, overflow bars if needed). - Auto-start: 'Start on first note (no count-in)' — step pace begins the run as soon as the mic detects the first note; no start press needed. - 'New' button re-rolls the progression (new seed). - Tests 174/174.
This commit is contained in:
@@ -272,6 +272,14 @@ export const PhraseSheetMusic: React.FC<PhraseSheetMusicProps> = ({
|
||||
if (r === 0) treble.addTimeSignature(`${score.meter.numerator}/${score.meter.denominator}`);
|
||||
treble.setMeasure(measure.number);
|
||||
}
|
||||
// Chord symbol above the staff (bar-indexed), drawn via the
|
||||
// stave's annotation area so it shifts with the clef offset.
|
||||
const chordSym = score.chordSymbols?.[m];
|
||||
if (chordSym) {
|
||||
try {
|
||||
treble.setSection(chordSym, 0);
|
||||
} catch { /* courtesy label — never fatal */ }
|
||||
}
|
||||
let bass: Stave | null = null;
|
||||
if (isGrand) {
|
||||
bass = new Stave(x, y + 130, barWidth);
|
||||
|
||||
Reference in New Issue
Block a user