class MTK::Core::PitchClass
A set of all pitches that are an integer number of octaves apart. A {Pitch} has the same PitchClass
as the pitches one or more octaves away. @see en.wikipedia.org/wiki/Pitch_class @see Lang::PitchClasses
Constants
- NAMES
The preferred names of the 12 pitch classes in the chromatic scale. The index of each {#name} is the pitch class’s numeric {#value}.
- VALID_NAMES
All valid enharmonic pitch class names in a flat list. @see
VALID_NAMES_BY_VALUE
- VALID_NAMES_BY_VALUE
All enharmonic names of the 12 pitch classes, including sharps, flats, double-sharps, and double-flats, organized such that each index contains the allowed names of the pitch class with a {#value} equal to that index. @see
VALID_NAMES
- VALUES_BY_NAME
A mapping from valid names to the value of the pitch class with that name
Attributes
The name of this pitch class. One of the {NAMES} defined by this class.
The value of this pitch class. An integer from 0..11 that indexes this pitch class in {PITCH_CLASSES} and the {#name} in {NAMES}.
This value is fairly arbitrary and just used for sorting purposes and mod 12 arithmetic when composing directly with pitch classes.