|
MCC
|
Music Composition Core public namespace. More...
Namespaces | |
| namespace | Chords |
| Reviewed catalog of named chords stored in program memory. | |
| namespace | Core |
| MCC core services. | |
| namespace | Notation |
| Text formatting and parsing for note names, pitches and intervals. | |
| namespace | Scales |
| Reviewed catalog of named scales stored in program memory. | |
Classes | |
| class | Accidental |
| Chromatic alteration of a letter, from -4 (quadruple flat) to +4 (quadruple sharp). More... | |
| class | Chord |
| A chord pattern spelled from a root note name. More... | |
| class | ChordPattern |
| Root-independent chord structure: up to seven ascending tones within two octaves. More... | |
| class | ChromaticIndex |
| Absolute semitone position of a pitch, with origin C-1 = 0. More... | |
| class | EqualTemperament |
| Twelve-tone equal temperament relative to a Tuning. More... | |
| class | Interval |
| Directed interval: a diatonic step count and a chromatic semitone count (SPEC-INT-1). More... | |
| class | IntervalNumber |
| 1-based interval number: 1 unison, 3 third, 8 octave, 10 tenth (SPEC-INT-2, SPEC-INT-3). More... | |
| class | IntervalQuality |
| Interval quality: perfect, major, minor, or augmented/diminished repeated one to four times (SPEC-INT-4). More... | |
| class | Key |
| A tonic and a diatonic mode, with the key signature they imply. More... | |
| class | KeySignature |
| Key signature: zero to seven sharps or flats (SPEC-KEY-1). More... | |
| class | Meter |
| Exact written time signature and its simple/compound interpretation. More... | |
| struct | NotationOptions |
| Options for text output (SPEC-TXT-3). More... | |
| class | Note |
| A written pitch combined with an exact written note value. More... | |
| class | NoteName |
| Written note name: a letter plus an accidental, without octave. More... | |
| class | NoteValue |
| Exact written note length: a power-of-two base and zero to four dots. More... | |
| class | Pitch |
| Written absolute pitch: a note name plus an octave. More... | |
| class | PitchClass |
| Pitch class 0-11 with spelling discarded (C = 0). More... | |
| class | RhythmPattern |
| Cyclic onset/rest pattern on a grid of equal steps. More... | |
| class | Scale |
| A scale pattern spelled from a root note name. More... | |
| class | ScalePattern |
| Root-independent scale structure: up to twelve ascending degrees. More... | |
| class | Tuning |
| Tuning reference: a written pitch and its frequency in hertz. More... | |
Enumerations | |
| enum class | Letter : uint8_t { C = 0 , D = 1 , E = 2 , F = 3 , G = 4 , A = 5 , B = 6 } |
| Diatonic letter name. More... | |
| enum class | IntervalDirection : int8_t { Descending = -1 , Unison = 0 , Ascending = 1 } |
| Direction of an interval (SPEC-INT-2). More... | |
| enum class | IntervalQualityKind : uint8_t { Diminished = 0 , Minor = 1 , Perfect = 2 , Major = 3 , Augmented = 4 } |
| Kind of an interval quality. | |
| enum class | KeyMode : uint8_t { Lydian = 0 , Major , Mixolydian , Dorian , Minor , Phrygian , Locrian } |
| Diatonic mode of a key, ordered from brightest to darkest. | |
| enum class | NotationSymbols : uint8_t { NotationSymbols::Ascii , NotationSymbols::Unicode } |
| Accidental symbols used in text output (SPEC-TXT-3). More... | |
| enum class | MeterKind : uint8_t { Simple = 0 , Compound , Irregular , Invalid } |
| Rhythmic interpretation of a written meter. | |
Functions | |
| constexpr uint8_t | DiatonicIndex (Letter letter) noexcept |
| Returns the diatonic index of letter: C = 0 ... B = 6. | |
| MCC_CONSTEXPR14 uint8_t | NaturalSemitone (Letter letter) noexcept |
| Returns the semitone offset of the natural letter above C: 0 2 4 5 7 9 11 (SPEC-ORD-1). | |
| constexpr Letter | MoveLetter (Letter letter, int32_t steps) noexcept |
| Moves letter by steps diatonic letters, wrapping around the octave: MoveLetter(Letter::B, 1) == Letter::C. | |
| constexpr bool | IsEnharmonic (Pitch a, Pitch b) noexcept |
| Returns true when a and b are valid and have the same chromatic index (SPEC-EQ-2): B#3 and C4 are enharmonic, B#3 and C3 are not. Any invalid operand yields false (SPEC-ERR-6). | |
| MCC_CONSTEXPR14 bool | IsLowerThan (Pitch a, Pitch b) noexcept |
| Pitch-height order (SPEC-ORD-6): true when a sounds lower than b, with enharmonic ties broken by written order so that sorting is deterministic. The invalid pitch sorts last. | |
| constexpr bool | IsEnharmonic (NoteName a, NoteName b) noexcept |
| Returns true when a and b are valid and share a pitch class (SPEC-EQ-2). IsEnharmonic(C#, Db) is true; any invalid operand yields false (SPEC-ERR-6). | |
| constexpr bool | IsEnharmonic (Interval a, Interval b) noexcept |
| Returns true when a and b are valid and span the same signed number of semitones: an ascending augmented fourth and an ascending diminished fifth are enharmonic. Any invalid operand yields false. | |
| MCC_CONSTEXPR14 Interval | IntervalBetween (Pitch from, Pitch to) noexcept |
| Returns the directed interval from from to to (SPEC-INT-1): the difference of their diatonic and chromatic indices. B#3 to C4 is an ascending diminished second; C4 to Cb4 is a descending augmented unison (SPEC-INT-5). | |
| MCC_CONSTEXPR14 Interval | IntervalBetween (NoteName from, NoteName to) noexcept |
| Returns the interval from from up to the next to, which is a simple ascending interval of 0-6 steps: B to C is a minor second and E to C is a minor sixth. Between two spellings of the same letter the result is a unison, descending when to is lower (C to Cb, SPEC-INT-5). | |
| MCC_CONSTEXPR14 Pitch | operator+ (Pitch pitch, Interval interval) noexcept |
| Transposes pitch by interval preserving spelling (SPEC-INT-7): the letter moves by the diatonic steps and the accidental is whatever the semitones require. E4 + major third = G#4; B3 + minor second = C4. | |
| MCC_CONSTEXPR14 Pitch | operator- (Pitch pitch, Interval interval) noexcept |
| Transposes pitch down by interval: pitch + interval.Reversed(). | |
| MCC_CONSTEXPR14 NoteName | operator+ (NoteName noteName, Interval interval) noexcept |
| Transposes a note name by interval preserving spelling (SPEC-INT-7): E + major third = G#, B + minor second = C. Octaves in the interval do not change a note name. | |
| MCC_CONSTEXPR14 NoteName | operator- (NoteName noteName, Interval interval) noexcept |
| Transposes a note name down by interval. | |
| MCC_CONSTEXPR14 bool | IsNoteLowerThan (Note a, Note b) noexcept |
| Orders notes by sounding pitch, then by written pitch and value. | |
| constexpr bool | HasSameMeasureDuration (Meter a, Meter b) noexcept |
| Returns true when two valid meters span the same whole-note length. | |
Variables | |
| constexpr uint8_t | LetterCount = 7 |
| Number of diatonic letters. | |
Music Composition Core public namespace.