1#ifndef MCC_NOTATION_NOTATION_H
2#define MCC_NOTATION_NOTATION_H
7#include <MCC/Interval/Interval.h>
8#include <MCC/Pitch/NoteName.h>
9#include <MCC/Pitch/Pitch.h>
11#if __has_include(<MCC/Scale/Scales.h>)
12 #include <MCC/Scale/Scales.h>
14#if __has_include(<MCC/Chord/Chords.h>)
15 #include <MCC/Chord/Chords.h>
17#if __has_include(<MCC/Key/Key.h>)
18 #include <MCC/Key/Key.h>
75 template <
typename CharT>
80 template <typename CharT>
81 size_t Format(CharT* destination,
size_t capacity,
Pitch pitch,
88 template <typename CharT>
105 template <typename CharT>
109 template <typename CharT>
116 template <typename CharT>
119#if __has_include(<MCC/Scale/Scales.h>)
121 template <
typename CharT>
130#if __has_include(<MCC/Chord/Chords.h>)
132 template <
typename CharT>
141#if __has_include(<MCC/Key/Key.h>)
143 template <
typename CharT>
144 size_t Format(CharT* destination,
size_t capacity,
Key key,
Directed interval: a diatonic step count and a chromatic semitone count (SPEC-INT-1).
Definition Interval.h:30
A tonic and a diatonic mode, with the key signature they imply.
Definition Key.h:46
Written note name: a letter plus an accidental, without octave.
Definition NoteName.h:29
Written absolute pitch: a note name plus an octave.
Definition Pitch.h:35
NotationSymbols
Accidental symbols used in text output (SPEC-TXT-3).
Definition Notation.h:27
@ Ascii
#, b and n, repeated for multiples.
Definition Notation.h:28
@ Unicode
U+266F sharp, U+266D flat, U+266E natural, U+1D12A double sharp and U+1D12B double flat.
Definition Notation.h:29
Reviewed catalog of named chords stored in program memory.
Definition Chords.h:21
Id
Stable catalog identifier.
Definition Chords.h:24
Text formatting and parsing for note names, pitches and intervals.
Definition Notation.h:69
Interval ParseInterval(const CharT *text) noexcept
Parses an optional + or -, a quality (P M m A d, A/d repeated) and a number: M3, -P8,...
Pitch ParsePitch(const CharT *text) noexcept
Parses a note name followed by a signed octave: C4, bb-1, Unicode accidentals.
size_t Format(CharT *destination, size_t capacity, NoteName noteName, NotationOptions options=NotationOptions()) noexcept
Writes C, F#, Bbb (or the Unicode sharp and flat signs).
NoteName ParseNoteName(const CharT *text) noexcept
Parses C, f#, Ebb, Gx, Bn; up to four accidentals.
void(*)(uint32_t codePoint, void *context) CodePointSink
Receives one Unicode code point of formatted text.
Definition Notation.h:72
Reviewed catalog of named scales stored in program memory.
Definition Scales.h:20
Id
Stable catalog identifier.
Definition Scales.h:23
Music Composition Core public namespace.
Definition Version.h:4
Options for text output (SPEC-TXT-3).
Definition Notation.h:36
NotationSymbols symbols
Accidental symbols; ASCII by default.
Definition Notation.h:38
bool explicitNatural
Write the natural sign explicitly (Cn, or U+266E with Unicode symbols).
Definition Notation.h:40