MCC is a portable music-theory library for desktop and embedded targets, built on Foundation. CMake and direct source builds use C++17; Arduino source builds support stock C++11 cores. Its value types are trivially copyable and allocation-free, and it contains no MIDI concepts.
Modules
- Pitch: Letter, Accidental, NoteName (spelled, C# != Db), PitchClass (0-11), ChromaticIndex and Pitch (scientific pitch notation, middle C is C4).
- Interval: Interval (directed diatonic + chromatic distance, quality and number), inversion, IntervalBetween() and spelling-preserving transposition (E4 + M3 = G#4).
- Tuning: Tuning and EqualTemperament frequencies (A4 = 440 Hz); the only module that uses float.
- Scale: spelling-preserving ScalePattern, Scale and the reviewed Scales catalog.
- Chord: ChordPattern, Chord, close-position inversions and the reviewed Chords catalog.
- Key: KeySignature and diatonic-mode Key spelling.
- Notation: allocation-free formatting and parsing in ASCII, UTF-8, UTF-16 and UTF-32.
- Rhythm: exact written NoteValue lengths from whole notes through 256th notes, Note as Pitch + NoteValue, and written simple, compound or irregular Meter signatures.
- Core: version information.
Every rule these types follow is defined in the Music-Domain Specification.
Dependency
MCC consumes the CMake target Foundation::Foundation (Foundation 2.0.10 or a newer 2.x release, built on CPSTL). It uses a local Foundation package when one is available and otherwise fetches the pinned Foundation release from GitHub; see Foundation Dependency.