A scale type describes the intervals contained in a scale, with no specific root pitch class. E.g. the "major scale."
Get a mode of a scale type by shifting the order of its intervals. For example, the Phrygian mode is the third mode of the major scale:
mode 3 major == phrygianNote: like many numbers in music theory, modes are 1-based; 2 means the second mode of the scale type. 0 and negative integers are ignored.
Get the intervals contained in the scale type:
toList major
== [ Interval.perfectUnison
, Interval.majorSecond
, Interval.majorThird
, Interval.perfectFourth
, Interval.perfectFifth
, Interval.majorSixth
, Interval.majorSeventh
]Same as ionian
Also known as the "natural minor" scale. Same as aeolian
Define a custom scale type with 5 degrees:
customPentatonic
{ rootToSecond = Interval.minorThird
, rootToThird = Interval.perfectFourth
, rootToFourth = Interval.perfectFifth
, rootToFifth = Interval.minorSeventh
}
== minorPentatonicDefine a custom scale type with 6 degrees:
customHexatonic
{ rootToSecond = Interval.majorSecond
, rootToThird = Interval.majorThird
, rootToFourth = Interval.augmentedFourth
, rootToFifth = Interval.minorSixth
, rootToSixth = Interval.minorSeventh
}
== wholeToneDefine a custom scale type with 7 degrees:
customHeptatonic
{ rootToSecond = Interval.majorSecond
, rootToThird = Interval.minorThird
, rootToFourth = Interval.perfectFourth
, rootToFifth = Interval.perfectFifth
, rootToSixth = Interval.majorSixth
, rootToSeventh = Interval.minorSeventh
}
== dorianDefine a custom scale type with 8 degrees:
customOctatonic
{ rootToSecond = Interval.majorSecond
, rootToThird = Interval.minorThird
, rootToFourth = Interval.perfectFourth
, rootToFifth = Interval.diminishedFifth
, rootToSixth = Interval.minorSixth
, rootToSeventh = Interval.majorSixth
, rootToEighth = Interval.majorSeventh
}
== diminishedWholeToneHalfTone