MENC (Music ENCoding) is a small yet expressive library for encoding common types of music information in extremely efficient C++ templated bitfields. Despite its minimalist approach the library provides a powerful API for creating and manipulating most common musical data. Its feature set includes:
- Exact ratios and rational arithmetic for representing musical proporitions and time lines. Ratios can be added, subtracted etc, in regular C++ expressions.
- Pitches include pitch class, accidental and letter information.
- Notes (pitches in octave space) include key number,
micro-tonal adjustment, and hertz. Notes can be compared using
= < >and thenote.transposefunction preserves note spelling in the transposed note. - Intervals define all possible intervallic distances between notes, from quintuply diminished (eg F##-Bbb) to quintuply augmented. Intervals provide distance (3rd 4th etc) quality (major, minor, diminished, etc), number of semitones/octaves spanned, etc.
- Meters, including type (compound and simple), metric stress patterns, and determination of metric stress level from time values etc.
- Key Signatures, numbers of sharps and flats.
- Modes: all common modes enumerated.
- Keys: all possible combinations of key signature and mode, e.g. C-Major, Eb-Lydian, etc.
- To/from string conversion of all entities. You need to build using 'premake --juce ...' to enable string support, see the readme for more information.
