mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-11-03 22:03:54 +01:00
Phrase mode: always-eighths arpeggio/Giuliani, auto meter, custom patterns, alternating bass
- arpeggioGenerator: always 240-tick eighths; auto-derive 3/4 vs 4/4 from pattern length (remainder heuristic); never stretch the last note (fixes the two-octave 2880-tick VexFlow crash in 6/8); rest fills built from renderable durations only; new 'custom' pattern from digit input (1=root..5=fifth-above-octave); removed meter/rhythm config — generator computes its own meter. - giulianiGenerator: always eighths; meter auto-derived from figure length (3v->3/4, 4v->4/4, 5v->4/4+rest, 6v->3/4); fixed pimami figure [0,1,2,3,2,1]; added pimai/pmia/pmim figures; alternating bass option (even bars voice the fifth as bass); removed the quarter-note fallback. - PhraseTrainer: removed meter/rhythm selects for arpeggio+giuliani; custom pattern text input; alternating bass checkbox. - SettingsTypes: 'custom' arpeggio pattern, customArpeggioPattern, giulianiAlternateBass; removed arpeggioRhythm. - PhraseSheetMusic: minWidthPerBar 420 -> 500 for 16th notes. - Tests updated for the new invariants + coverage for custom patterns, alternating bass, new figures, renderable-tick sweeps (1031 -> 191 per-file, all green); removed temporary crash_test.test.ts.
This commit is contained in:
@@ -61,14 +61,13 @@ export interface PhraseSettings {
|
||||
arpeggioDegree: string; // ArpeggioDegree (single-chord mode / sequence start)
|
||||
/** Sequence mode: which degrees may appear (empty = all 7). */
|
||||
arpeggioChordSelection: string[];
|
||||
arpeggioPattern: 'up' | 'down' | 'updown' | '1235';
|
||||
arpeggioPattern: 'up' | 'down' | 'updown' | '1235' | 'custom';
|
||||
arpeggioCoverage: 'one-octave' | 'two-octave';
|
||||
/** Sequence mode: bars per exercise (1 = single chord). */
|
||||
arpeggioBars: number;
|
||||
arpeggioProgression: 'random' | 'functional' | 'diatonic-cycle';
|
||||
arpeggioRhythm: 'quarters' | 'eighths';
|
||||
/** Giuliani study material (own category — voicing-enforced). */
|
||||
giulianiPattern: 'pim' | 'pima' | 'pami' | 'aim' | 'pimamim' | 'pmamim';
|
||||
giulianiPattern: 'pim' | 'pima' | 'pami' | 'aim' | 'pimamim' | 'pmamim' | 'piai' | 'pmami' | 'pimami' | 'pimaia' | 'pimai' | 'pmia' | 'pmim';
|
||||
giulianiBars: number;
|
||||
/** Phrase-local fret window (guitar/bass) — overrides the note set. */
|
||||
fretWindowEnabled: boolean;
|
||||
@@ -87,6 +86,10 @@ export interface PhraseSettings {
|
||||
/** Begin the run as soon as the first note is played (no count-in,
|
||||
* step pace only). */
|
||||
autoStartOnNote: boolean;
|
||||
/** Custom arpeggio pattern as raw digits (1=root, 2=third, etc.). */
|
||||
customArpeggioPattern?: string;
|
||||
/** Alternating bass thumb for Giuliani studies. */
|
||||
giulianiAlternateBass?: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_PHRASE_SETTINGS: PhraseSettings = {
|
||||
@@ -106,7 +109,6 @@ export const DEFAULT_PHRASE_SETTINGS: PhraseSettings = {
|
||||
arpeggioCoverage: 'one-octave',
|
||||
arpeggioBars: 1,
|
||||
arpeggioProgression: 'functional',
|
||||
arpeggioRhythm: 'quarters',
|
||||
giulianiPattern: 'pima',
|
||||
giulianiBars: 4,
|
||||
fretWindowEnabled: false,
|
||||
@@ -120,6 +122,8 @@ export const DEFAULT_PHRASE_SETTINGS: PhraseSettings = {
|
||||
autoContinue: true,
|
||||
inputMode: 'mic',
|
||||
autoStartOnNote: false,
|
||||
customArpeggioPattern: '',
|
||||
giulianiAlternateBass: false,
|
||||
};
|
||||
|
||||
export function getPhraseSettings(s: AppSettings): PhraseSettings {
|
||||
|
||||
Reference in New Issue
Block a user