27#include "denigma/classify/noteheads.h"
72using NoteheadValue = std::variant<std::monostate, ArtificialHarmonics>;
84 explicit operator bool() const noexcept {
return !std::holds_alternative<std::monostate>(
value); }
88 const T*
as() const noexcept
90 return std::get_if<T>(&
value);
95 bool is() const noexcept
97 return std::holds_alternative<T>(
value);
EntryNoteheadClassification classifyEntryNoteheads(const musx::dom::EntryInfoPtr &entry)
Classifies chord-level notehead patterns (e.g.
Core public API for the Denigma conversion libraries.
Definition articulations.h:33
Result returned by chord-level notehead-pattern classification.
Definition entries.h:79
bool is() const noexcept
Returns true when the classified payload has type T.
Definition entries.h:95
entry::NoteheadValue value
Classified payload, or std::monostate when no chord-level notehead pattern was recognized.
Definition entries.h:81
const T * as() const noexcept
Returns the classified payload as T, or nullptr when it has another type.
Definition entries.h:88
Result returned by notehead classification.
Definition noteheads.h:65
Classification for one artificial-harmonic note pair (a stopped note plus a touched node) found withi...
Definition entries.h:39
TouchInterval
The notated interval from the stopped note up to the touched node.
Definition entries.h:42
musx::dom::NoteInfoPtr stoppedNote
The stopped (fingered) note. Normally has a notehead::Shape::Regular notehead.
Definition entries.h:49
NoteheadClassification touchedNotehead
Notehead classification already computed for touchedNote.
Definition entries.h:55
musx::dom::NoteInfoPtr soundingNote
A third note in the chord at the theoretical sounding pitch, if the source explicitly includes one.
Definition entries.h:60
NoteheadClassification stoppedNotehead
Notehead classification already computed for stoppedNote.
Definition entries.h:53
TouchInterval interval
Notated interval from stoppedNote to touchedNote.
Definition entries.h:57
musx::dom::NoteInfoPtr touchedNote
The touched note (harmonic node). Normally has a notehead::Shape::Diamond notehead.
Definition entries.h:51
One or more artificial-harmonic note pairs found within a chord (e.g.
Definition entries.h:66
std::vector< ArtificialHarmonic > harmonics
The artificial-harmonic note pairs found in the chord.
Definition entries.h:68