67 switch (tuning.system) {
70 return !tuning.scale_content && !tuning.keyboard_map_content;
72 return tuning.scale_content && tuning.scale_content->valid() &&
73 (!tuning.keyboard_map_content || tuning.keyboard_map_content->valid());
constexpr std::uint32_t kMinReferencePitchMillihertz
Lowest reference pitch a document may state, in millihertz.
Definition tuning.hpp:35
constexpr std::uint32_t kDefaultReferencePitchMillihertz
Reference pitch for A4 that a document states when it states nothing else.
Definition tuning.hpp:33
constexpr bool valid_tuning_reference(const TuningReference &tuning) noexcept
Returns whether a tuning reference is internally consistent.
Definition tuning.hpp:63
constexpr std::uint32_t kMaxReferencePitchMillihertz
Highest reference pitch a document may state, in millihertz.
Definition tuning.hpp:37
TuningSystem
How a document states the mapping from note number to pitch.
Definition tuning.hpp:19
@ EqualTemperament
Twelve equal divisions of the octave against the stated reference pitch.
Definition tuning.hpp:21
@ Scala
A sealed Scala scale, and optionally a sealed keyboard mapping.
Definition tuning.hpp:29
@ MtsEsp
Defer to whichever MTS-ESP master is present when the document plays.
Definition tuning.hpp:27
Definition program_compiler.hpp:18
Durable statement of the tuning a project or one instrument plays in.
Definition tuning.hpp:46
TuningSystem system
Definition tuning.hpp:47
std::uint32_t reference_pitch_millihertz
Definition tuning.hpp:48
constexpr auto operator<=>(const TuningReference &) const =default
std::optional< ContentHash > scale_content
Sealed .scl payload. Required when system is Scala, absent otherwise.
Definition tuning.hpp:50
std::optional< ContentHash > keyboard_map_content
Sealed .kbm payload.
Definition tuning.hpp:53