Sequences
Apply sequences across scale positions
The sequence engine builds on the pattern walker to create exercises that shift incrementally across scale degrees -- the bread and butter of guitar practice routines.
applySequence
applySequence(scale: FrettedScale, sequence: number[], options?: SequenceOptions) => FrettedNote[][]
Apply a degree sequence to a fretted scale. Returns one FrettedNote[] array per pass.
Options
incremental -- When true, each pass shifts all degrees by +1. Pass 1 uses the pattern as-is, pass 2 adds 1 to each degree, pass 3 adds 2, etc.
boundToShape -- When true (default), stops generating passes when a note would fall outside the fretted scale's available notes. This keeps exercises within a single position.
startDegree -- Offset applied to the first pass. Use startDegree: 3 to begin the exercise from the 3rd degree.
passes -- Limit the number of passes. Without this, incremental mode generates passes until bounded by the shape.
Incremental Example
flattenSequence
flattenSequence(passes: FrettedNote[][]) => FrettedNote[]
Flatten multi-pass results into a single note array for output:
Built-in Sequences
The package includes common practice sequences:
These are just number[] arrays -- you can define your own: