29#include "denigma/classify/classifier_common.h"
31#include "musx/util/Arpeggio.h"
39namespace articulation {
74 std::vector<ArticulationMark>
marks;
348 std::optional<musx::util::ArpeggioSpanCandidate>
candidate;
452 musx::dom::VerticalPlacement
placement{musx::dom::VerticalPlacement::NotApplicable};
457 explicit operator bool() const noexcept {
return !std::holds_alternative<std::monostate>(
value); }
460 template <
typename T>
461 const T*
as() const noexcept
463 return std::get_if<T>(&
value);
467 template <
typename T>
468 bool is() const noexcept
470 return std::holds_alternative<T>(
value);
476 const musx::dom::MusxInstance<musx::dom::details::ArticulationAssign>& assignment,
const musx::dom::EntryInfoPtr& entryInfo);
ArticulationClassification classifyArticulationSymbol(const musx::dom::MusxInstance< musx::dom::FontInfo > &fontInfo, char32_t symbol)
Classifies an articulation symbol from a font and character code.
ArticulationClassification classifyArticulation(const musx::dom::MusxInstance< musx::dom::details::ArticulationAssign > &assignment, const musx::dom::EntryInfoPtr &entryInfo)
Classifies an articulation assignment for an entry.
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::AccordionRegistration, articulation::VerticalEntryBracket, articulation::Parenthesis, PseudoTie, articulation::OtherMark > ArticulationValue
Variant payload for articulation classification.
Definition articulations.h:443
Core public API for the Denigma conversion libraries.
Definition articulations.h:33
Result returned by articulation classification.
Definition articulations.h:448
const T * as() const noexcept
Returns the classified payload as T, or nullptr when it has another type.
Definition articulations.h:461
ArticulationValue value
Classified articulation payload, or std::monostate when no articulation was recognized.
Definition articulations.h:450
bool is() const noexcept
Returns true when the classified payload has type T.
Definition articulations.h:468
musx::dom::VerticalPlacement placement
Resolved placement of the assigned articulation, when classified from an assignment.
Definition articulations.h:452
std::optional< std::string > glyphName
SMuFL glyph name associated with the recognized symbol, when available.
Definition articulations.h:454
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:48
One registration dot decoded from the precomposed glyph.
Definition articulations.h:217
DotPosition position
Logical position decoded from the precomposed glyph.
Definition articulations.h:219
A precomposed SMuFL accordion-registration glyph found in Finale notation.
Definition articulations.h:168
DotPosition
Logical vertical position of a registration dot, from top to bottom.
Definition articulations.h:205
RankCount rankCount
Number of ranks encoded by the source glyph family.
Definition articulations.h:225
std::vector< Dot > dots
Registration dots, preserving multiplicity.
Definition articulations.h:229
InstrumentType instrumentType
Named instrument or reed preset, when the source glyph identifies one.
Definition articulations.h:227
Hand
Hand designation encoded by the registration diagram.
Definition articulations.h:171
InstrumentType
Named accordion instrument or reed preset encoded by a glyph.
Definition articulations.h:188
std::vector< std::string > glyphNames
Canonical SMuFL name for the recognized registration glyph, as a single-element sequence.
Definition articulations.h:231
RankCount
Number of reed ranks in the registration diagram.
Definition articulations.h:179
Hand hand
Hand encoded by the source glyph family.
Definition articulations.h:223
Classification for arpeggio articulation marks.
Definition articulations.h:332
Type
Arpeggio type.
Definition articulations.h:335
Type type
Classified arpeggio type.
Definition articulations.h:343
std::optional< musx::util::ArpeggioSpanCandidate > candidate
The vertical span the arpeggio covers, or nullopt when no span resolved or the classification came fr...
Definition articulations.h:348
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:345
Classification for one articulation mark represented by a musx articulation symbol.
Definition articulations.h:44
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:291
Type
Breath mark type.
Definition articulations.h:294
Type type
Classified breath mark type.
Definition articulations.h:303
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:305
Classification for caesura articulation marks.
Definition articulations.h:311
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:326
Type
Caesura type.
Definition articulations.h:314
Type type
Classified caesura type.
Definition articulations.h:324
Classification for fermata articulation marks.
Definition articulations.h:256
Shape shape
Visual fermata shape.
Definition articulations.h:281
Shape
Visual fermata shape.
Definition articulations.h:259
Duration duration
Playback-duration class.
Definition articulations.h:283
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:285
Duration
Finale playback-duration class associated with the fermata.
Definition articulations.h:272
Classification for one note-attached Harmon mute technique symbol with qualifier state.
Definition articulations.h:110
Qualifier
Distinguishes the displayed stem / closed state of the Harmon mute symbol.
Definition articulations.h:113
Qualifier qualifier
Harmon mute qualifier encoded by the source glyph.
Definition articulations.h:121
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:123
Accidental sign attached to an ornament.
Definition articulations.h:378
Accidental accidental
Accidental sign shown with the ornament.
Definition articulations.h:380
musx::dom::VerticalPlacement placement
Placement of the accidental relative to the ornament sign.
Definition articulations.h:382
Classification for ornament articulation marks.
Definition articulations.h:354
Type type
Classified ornament type.
Definition articulations.h:386
std::vector< AccidentalMark > accidentals
Accidentals attached to the ornament sign.
Definition articulations.h:390
Accidental
Accidentals attached to an ornament sign.
Definition articulations.h:357
Type
Ornament types recognized by the classifier.
Definition articulations.h:366
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:388
Classification for recognized articulation symbols that have no more specific Denigma classification.
Definition articulations.h:423
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:434
Category
Broad notation category for preserving a known but unclassified mark.
Definition articulations.h:426
Category category
Broad notation category for the mark.
Definition articulations.h:432
Classification for a single notehead parenthesis mark attached to one side of a note.
Definition articulations.h:404
Side
Which side of the note the parenthesis mark appears on.
Definition articulations.h:407
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:417
Side side
Side of the note the parenthesis mark is on.
Definition articulations.h:413
musx::dom::NoteInfoPtr note
The note this parenthesis is associated with, per ArticulationAssign::calcAssociatedNote....
Definition articulations.h:415
Classification for a plucked-string damping symbol.
Definition articulations.h:129
Type type
Damping scope encoded by the source glyph.
Definition articulations.h:138
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:140
Type
Distinguishes damping selected strings from damping all strings.
Definition articulations.h:132
Classification for a string mute on/off symbol.
Definition articulations.h:146
Type type
Mute state encoded by the source glyph.
Definition articulations.h:155
Type
Whether the source symbol applies or removes the string mute.
Definition articulations.h:149
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:157
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:102
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:104
Type
Technique mark type recognized by the classifier.
Definition articulations.h:83
Classification for tremolo articulation marks.
Definition articulations.h:237
int marks
Number of tremolo strokes.
Definition articulations.h:248
Style style
Tremolo style.
Definition articulations.h:246
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:250
Style
Distinguishes measured from unmeasured tremolo marks.
Definition articulations.h:240
Classification for Finale vertical entry bracket shapes.
Definition articulations.h:396
GlyphStyle glyphStyle
Visual style encoded by the source glyph variant.
Definition articulations.h:398