Chords
chords(beats, scale, progression)
Returns a ChordPattern that cycles through a Roman-numeral chord progression.
chords(beats: number, scale: ScalePattern, progression: string): ChordPatternprogression format
A comma-separated string of Roman numerals: 'I,IV,V,I'
Available Roman numerals
Uppercase letters produce diatonic triads. Lowercase is also accepted. The chord quality follows the scale’s diatonic rules automatically.
I II III IV V VI VII
Quality suffixes can be appended: maj min / m dim aug 7 maj7
min7 / m7 dim7 9
Example
const key = scales(4, 'D4:minor')const prog = chords(8, key, 'I,VII,VI,III')
// pass prog as the scale argument to cast()yield cast(ep, prog, seq(4, '{0,2,4},~,~,~'), ctx)~ or _ after a numeral holds the preceding chord for an extra step:
chords(4, key, 'I~~,V') // I for 3 beats, V for 1chords(4, key, 'Imaj7,IVmaj7,V7,I')Octave shift
Append < (down) or > (up) to move all chord tones by one octave.
Repeat the symbol for multiple octaves, or use <N> with a signed integer.
| Syntax | Octaves | Example |
|---|---|---|
IV< | −1 | chords(4, key, 'I IV< V I') |
IV> | +1 | chords(4, key, 'I> IV V I') |
IV<< | −2 | bass-register voicing |
IV<-3> | −3 | explicit form |
IV<2> | +2 | explicit form |
The shift applies to the chord tones only — rootFreq is unchanged.
// Bass line: IV and V voiced an octave lowerconst prog = chords(4, key, 'I IV< V< I')yield cast(bass, prog, seq(4, '0,_,_,_'), ctx)