1#ifndef MCC_SCALE_SCALES_H
2#define MCC_SCALE_SCALES_H
7#include <MCC/Pitch/NoteName.h>
8#include <MCC/Scale/Scale.h>
9#include <MCC/Scale/ScalePattern.h>
23 enum class Id : uint8_t {
73 constexpr uint8_t
Count =
static_cast<uint8_t
>(Id::SuperLocrian) + 1;
91 size_t CopyName(
Id id,
char* destination,
size_t capacity)
noexcept;
98 size_t CopyAlias(uint8_t index,
char* destination,
size_t capacity,
Id& target)
noexcept;
Written note name: a letter plus an accidental, without octave.
Definition NoteName.h:29
Root-independent scale structure: up to twelve ascending degrees.
Definition ScalePattern.h:32
A scale pattern spelled from a root note name.
Definition Scale.h:28
Reviewed catalog of named scales stored in program memory.
Definition Scales.h:20
Scale Make(NoteName root, Id id) noexcept
Spells catalog entry id from root.
Definition Scales.h:107
constexpr uint8_t AliasCount
Number of aliases.
Definition Scales.h:76
size_t CopyAlias(uint8_t index, char *destination, size_t capacity, Id &target) noexcept
Copies alias index (0-based, below AliasCount) and returns its length, also reporting the scale it na...
Family FamilyOf(Id id) noexcept
Returns the family of id, or Family::Invalid.
Id Find(const char *name) noexcept
Finds a scale by exact canonical name or alias; returns Id::Invalid when nothing matches.
constexpr size_t NameCapacity
Buffer size that fits every name and alias with its terminator.
Definition Scales.h:79
size_t CopyName(Id id, char *destination, size_t capacity) noexcept
Copies the canonical name of id with snprintf semantics and returns its length; an invalid id writes ...
Family
Grouping inherited from the historical catalog arrays.
Definition Scales.h:64
constexpr uint8_t Count
Number of catalog entries.
Definition Scales.h:73
ScalePattern Pattern(Id id) noexcept
Returns the pattern of id, or the invalid pattern.
Id
Stable catalog identifier.
Definition Scales.h:23
Music Composition Core public namespace.
Definition Version.h:4