29#include "denigma/classify/classifier_common.h"
38namespace articulation {
74 std::vector<ArticulationMark>
marks;
390 musx::dom::VerticalPlacement
placement{ musx::dom::VerticalPlacement::NotApplicable };
395 explicit operator bool() const noexcept
396 {
return !std::holds_alternative<std::monostate>(
value); }
399 template <
typename T>
400 const T*
as() const noexcept
401 {
return std::get_if<T>(&
value); }
404 template <
typename T>
405 bool is() const noexcept
406 {
return std::holds_alternative<T>(
value); }
411 const musx::dom::MusxInstance<musx::dom::details::ArticulationAssign>& assignment,
412 const musx::dom::EntryInfoPtr& entryInfo);
415 const musx::dom::MusxInstance<musx::dom::FontInfo>& fontInfo,
char32_t symbol);
ArticulationClassification classifyArticulationSymbol(const musx::dom::MusxInstance< musx::dom::FontInfo > &fontInfo, char32_t symbol)
Classifies an articulation symbol from a font and character code.
std::variant< std::monostate, articulation::ArticulationMarks, articulation::TechniqueMark, articulation::HarmonMute, articulation::PluckedDamp, articulation::StringMute, articulation::Tremolo, articulation::Fermata, articulation::BreathMark, articulation::Caesura, articulation::Arpeggio, articulation::Ornament, articulation::VerticalEntryBracket, articulation::Parenthesis, PseudoTie, articulation::OtherMark > ArticulationValue
Variant payload for articulation classification.
Definition articulations.h:381
ArticulationClassification classifyArticulation(const musx::dom::MusxInstance< musx::dom::details::ArticulationAssign > &assignment, const musx::dom::EntryInfoPtr &entryInfo)
Classifies an articulation assignment for an entry.
Core public API for the Denigma conversion libraries.
Definition articulations.h:32
Result returned by articulation classification.
Definition articulations.h:386
const T * as() const noexcept
Returns the classified payload as T, or nullptr when it has another type.
Definition articulations.h:400
ArticulationValue value
Classified articulation payload, or std::monostate when no articulation was recognized.
Definition articulations.h:388
bool is() const noexcept
Returns true when the classified payload has type T.
Definition articulations.h:405
musx::dom::VerticalPlacement placement
Resolved placement of the assigned articulation, when classified from an assignment.
Definition articulations.h:390
std::optional< std::string > glyphName
SMuFL glyph name associated with the recognized symbol, when available.
Definition articulations.h:392
Visual style encoded by the source glyph variant.
Definition classifier_common.h:32
A source shape used as a stand-in for a laissez-vibrer tie or tie end.
Definition classifier_common.h:49
Classification for arpeggio articulation marks.
Definition articulations.h:267
Type
Arpeggio type.
Definition articulations.h:271
Type type
Classified arpeggio type.
Definition articulations.h:279
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:281
Classification for one articulation mark represented by a musx articulation symbol.
Definition articulations.h:43
Type
Articulation mark type recognized by the classifier.
Definition articulations.h:47
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:66
Type type
Articulation mark type.
Definition articulations.h:64
Classification for one or more articulation marks represented by a musx articulation symbol.
Definition articulations.h:72
std::vector< ArticulationMark > marks
One or more articulation marks represented by the source symbol.
Definition articulations.h:74
Classification for breath marks.
Definition articulations.h:224
Type
Breath mark type.
Definition articulations.h:228
Type type
Classified breath mark type.
Definition articulations.h:237
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:239
Classification for caesura articulation marks.
Definition articulations.h:245
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:261
Type
Caesura type.
Definition articulations.h:249
Type type
Classified caesura type.
Definition articulations.h:259
Classification for fermata articulation marks.
Definition articulations.h:187
Shape shape
Visual fermata shape.
Definition articulations.h:214
Shape
Visual fermata shape.
Definition articulations.h:191
Duration duration
Playback-duration class.
Definition articulations.h:216
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:218
Duration
Finale playback-duration class associated with the fermata.
Definition articulations.h:205
Classification for one note-attached Harmon mute technique symbol with qualifier state.
Definition articulations.h:111
Qualifier
Distinguishes the displayed stem / closed state of the Harmon mute symbol.
Definition articulations.h:115
Qualifier qualifier
Harmon mute qualifier encoded by the source glyph.
Definition articulations.h:123
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:125
Accidental sign attached to an ornament.
Definition articulations.h:313
Accidental accidental
Accidental sign shown with the ornament.
Definition articulations.h:315
musx::dom::VerticalPlacement placement
Placement of the accidental relative to the ornament sign.
Definition articulations.h:317
Classification for ornament articulation marks.
Definition articulations.h:287
Type type
Classified ornament type.
Definition articulations.h:321
std::vector< AccidentalMark > accidentals
Accidentals attached to the ornament sign.
Definition articulations.h:325
Accidental
Accidentals attached to an ornament sign.
Definition articulations.h:291
Type
Ornament types recognized by the classifier.
Definition articulations.h:301
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:323
Classification for recognized articulation symbols that have no more specific Denigma classification.
Definition articulations.h:359
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:371
Category
Broad notation category for preserving a known but unclassified mark.
Definition articulations.h:363
Category category
Broad notation category for the mark.
Definition articulations.h:369
Classification for a single notehead parenthesis mark attached to one side of a note.
Definition articulations.h:339
Side
Which side of the note the parenthesis mark appears on.
Definition articulations.h:343
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:353
Side side
Side of the note the parenthesis mark is on.
Definition articulations.h:349
musx::dom::NoteInfoPtr note
The note this parenthesis is associated with, per ArticulationAssign::calcAssociatedNote....
Definition articulations.h:351
Classification for a plucked-string damping symbol.
Definition articulations.h:131
Type type
Damping scope encoded by the source glyph.
Definition articulations.h:141
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:143
Type
Distinguishes damping selected strings from damping all strings.
Definition articulations.h:135
Classification for a string mute on/off symbol.
Definition articulations.h:149
Type type
Mute state encoded by the source glyph.
Definition articulations.h:159
Type
Whether the source symbol applies or removes the string mute.
Definition articulations.h:153
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:161
Classification for one note-attached technique mark represented by a musx articulation symbol.
Definition articulations.h:80
Type type
Technique mark type.
Definition articulations.h:103
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:105
Type
Technique mark type recognized by the classifier.
Definition articulations.h:84
Classification for tremolo articulation marks.
Definition articulations.h:167
int marks
Number of tremolo strokes.
Definition articulations.h:179
Style style
Tremolo style.
Definition articulations.h:177
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:181
Style
Distinguishes measured from unmeasured tremolo marks.
Definition articulations.h:171
Classification for Finale vertical entry bracket shapes.
Definition articulations.h:331
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:333