Skip to main content

Module stepscale

Module stepscale 

Source
Expand description

Scales built from a caller-supplied cycle of intervals.

ScaleType covers music21’s named ConcreteScale subclasses, which are fixed tables and so can be an enum. CyclicalScale and OctaveRepeatingScale are not: they take an arbitrary interval list at construction, so they are a runtime type rather than a variant.

The two differ only in how they close:

  • StepScale::cyclical walks the intervals once and stops, so the scale need not span or repeat at an octave — ["P5"] from C is just C G.
  • StepScale::octave_repeating appends whatever interval is needed to reach the octave above the tonic, so ["m3", "M3"] from C becomes C E- G C.

Structs§

StepScale
A scale built by walking a cycle of intervals from a tonic.