|
denigma 4.0.0
|
Music classification helpers for Finale symbol extraction. More...
Classes | |
| struct | ArticulationClassification |
| Result returned by articulation classification. More... | |
| struct | BarlineClassification |
| Result returned by barline classification. More... | |
| struct | ChordSuffixClassification |
| Classified logical strings reconstructed from Finale chord-suffix elements. More... | |
| struct | ClefClassification |
| Result returned by clef classification. More... | |
| struct | EntryNoteheadClassification |
| Result returned by chord-level notehead-pattern classification. More... | |
| struct | ExpressionAssignmentClassification |
| Classification paired with the Finale measure-expression assignment that produced it. More... | |
| struct | ExpressionClassification |
| Exporter-neutral semantic classification of one Finale expression. More... | |
| struct | GlyphStyle |
| Visual style encoded by the source glyph variant. More... | |
| struct | JumpClassification |
| Classification of a Finale text repeat assignment. More... | |
| struct | KeyboardPedalClassification |
| A keyboard-pedal marking recognized in Finale text or in a custom line's text. More... | |
| struct | NoteheadClassification |
| Result returned by notehead classification. More... | |
| struct | OctaveMarkingClassification |
| An octave-displacement marking ("8va", "15mb", the SMuFL ottava glyphs, etc.) recognized in Finale text. More... | |
| struct | PseudoTie |
| A source shape used as a stand-in for a laissez-vibrer tie or tie end. More... | |
| struct | SmartShapeClassification |
| Result returned by smart-shape classification. More... | |
Enumerations | |
| enum class | ExpressionType { GenericText , Dynamic , Fermata , BreathMark , StringMute , HarpDiagram , KeyboardPedal , PseudoTie , NonArpeggio , TempoMark , MetronomeMark , TempoAlteration , TechniqueText , RehearsalMark , MultimeasureRestNumber , MeasureRepeatCount , Error , Suppress } |
| Exporter-neutral semantic classes for Finale/MUSX text expressions. More... | |
| enum class | ClassificationBasis { FinaleCategory , Heuristic , FinaleCategoryConfirmed , FinaleCategoryCorrected , FallbackToGenericText } |
| Diagnostic reason for the selected expression classification. More... | |
Functions | |
| ArticulationClassification | classifyArticulation (const musx::dom::MusxInstance< musx::dom::details::ArticulationAssign > &assignment, const musx::dom::EntryInfoPtr &entryInfo) |
| Classifies an articulation assignment for an entry. | |
| ArticulationClassification | classifyArticulationSymbol (const musx::dom::MusxInstance< musx::dom::FontInfo > &fontInfo, char32_t symbol) |
| Classifies an articulation symbol from a font and character code. | |
| BarlineClassification | classifyBarline (const musx::dom::MusxInstance< musx::dom::others::Staff > &staff, const musx::dom::MusxInstance< musx::dom::others::Measure > &measure, bool isFinalMeasure, const musx::dom::MusxInstance< musx::dom::options::BarlineOptions > &barlineOptions) |
| Classifies the effective right barline for a Finale measure in staff context. | |
| ChordSuffixClassification | classifyChordSuffix (const musx::dom::MusxInstanceList< musx::dom::others::ChordSuffixElement > &suffix) |
| Reconstructs a Finale chord suffix as Unicode text, resolving SMuFL and known legacy-font glyphs. | |
| ChordSuffixClassification | classifyChordSuffix () |
| Classifies a Finale chord with no displayed suffix as a major triad. | |
| musx::dom::MusxInstance< musx::dom::FontInfo > | singleVisibleFont (const musx::util::EnigmaParsingContext &textContext) |
| Returns the common effective font of all nonempty visible text chunks. | |
| ClefClassification | classifyClef (const musx::dom::MusxInstance< musx::dom::options::ClefOptions::ClefDef > &clefDef, const musx::dom::MusxInstance< musx::dom::others::Staff > &staff=nullptr) |
| Classifies a Finale clef definition, optionally in the context of a staff. | |
| std::optional< dynamics::Mark > | classifyDynamicRun (const musx::util::EnigmaTextChunk &chunk) |
| Classifies a source text chunk as a single plain dynamic mark. | |
| dynamics::Composition | dynamicComposition (dynamics::Dynamic dynamic) |
| Decomposes a dynamic into its constituent parts. | |
| dynamics::Composition | dynamicCompositionFromLetters (std::string_view letters) |
| Decomposes dynamic letters such as "sffz" into their constituent parts, whether or not the spelling is one that dynamics::Dynamic enumerates. | |
| dynamics::Dynamic | dynamicFromLevel (dynamics::Level level) |
| Returns the dynamics::Dynamic that names a level, so that a level can be passed to the functions keyed on dynamics::Dynamic. | |
| std::string | dynamicCanonicalText (dynamics::Dynamic dynamic) |
| Returns the canonical text spelling for a dynamic. | |
| std::vector< std::string > | dynamicCanonicalGlyphs (dynamics::Dynamic dynamic) |
| Returns canonical SMuFL glyph names for a dynamic. | |
| std::vector< std::string > | dynamicCanonicalLetterGlyphs (dynamics::Dynamic dynamic) |
| Returns canonical per-letter SMuFL glyph names for a dynamic. | |
| std::vector< std::string > | dynamicLettersToLetterGlyphs (std::string_view letters) |
| Returns per-letter SMuFL glyph names for recognized dynamic letters, omitting other characters. | |
| std::string | dynamicGlyphsToLetters (const std::vector< std::string > &glyphs) |
| Returns the dynamic letters represented by known dynamic glyph names. | |
| EntryNoteheadClassification | classifyEntryNoteheads (const musx::dom::EntryInfoPtr &entry) |
| Classifies chord-level notehead patterns (e.g. | |
| ExpressionClassification | classifyExpression (const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > &assignment) |
| Classifies the expression referenced by a Finale measure-expression assignment. | |
| std::vector< ExpressionAssignmentClassification > | classifyExpressionAssignments (const musx::dom::MusxInstanceList< musx::dom::others::MeasureExprAssign > &assignments) |
| Classifies a list of Finale measure-expression assignments. | |
| ExpressionClassification | classifyExpression (const musx::dom::MusxInstance< musx::dom::others::TextExpressionDef > &def, const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > &assignment={}) |
| Classifies a Finale text-expression definition. | |
| ExpressionClassification | classifyExpression (const musx::dom::MusxInstance< musx::dom::others::ShapeExpressionDef > &def, const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > &assignment={}) |
| Classifies a Finale shape-expression definition. | |
| std::optional< smartshape::GeneralLine > | classifyGeneralLine (const musx::dom::MusxInstance< musx::dom::others::SmartShapeCustomLine > &customLine) |
| Describes a custom line style as a smartshape::GeneralLine. | |
| std::optional< smartshape::GeneralLine > | classifyGeneralLine (const musx::dom::MusxInstance< musx::dom::others::SmartShape > &shape) |
| Describes a line-type smart shape (built-in or custom) as a smartshape::GeneralLine. | |
| JumpClassification | classifyJump (const musx::dom::MusxInstance< musx::dom::others::TextRepeatDef > &def) |
| Classifies a Finale text repeat definition by text/glyph only. | |
| JumpClassification | classifyJump (const musx::dom::MusxInstance< musx::dom::others::TextRepeatAssign > &assignment) |
| Classifies a Finale text repeat assignment by both visible text/glyph and playback behavior. | |
| std::optional< KeyboardPedalClassification > | classifyKeyboardPedal (std::string_view text) |
| Classifies plain text as a keyboard-pedal marking. | |
| std::optional< KeyboardPedalClassification > | classifyKeyboardPedal (const musx::util::EnigmaParsingContext &textContext) |
| Classifies Finale text as a keyboard-pedal marking, resolving SMuFL pedal glyphs. | |
| NoteheadClassification | classifyNoteheadSymbol (const musx::dom::MusxInstance< musx::dom::FontInfo > &fontInfo, char32_t symbol) |
| Classifies a notehead symbol from a font and character code. | |
| NoteheadClassification | classifyNotehead (const musx::dom::NoteInfoPtr ¬e) |
| Classifies the effective notehead for a note, resolving the note's font/character via #musx::dom::NoteInfoPtr::calcNoteheadInfo. | |
| std::optional< OctaveMarkingClassification > | classifyOctaveMarking (std::string_view text) |
| Classifies plain text as an octave-displacement marking. | |
| std::optional< OctaveMarkingClassification > | classifyOctaveMarking (const musx::util::EnigmaParsingContext &textContext) |
| Classifies Finale text as an octave-displacement marking, resolving SMuFL ottava glyphs (including parenthesized and letter-composed forms). | |
| SmartShapeClassification | classifySmartShape (const musx::dom::MusxInstance< musx::dom::others::SmartShape > &shape) |
| Classifies a smart shape's meaning. | |
| std::optional< smartshape::KeyboardPedal > | classifyKeyboardPedalCustomLine (const musx::dom::MusxInstance< musx::dom::others::SmartShapeCustomLine > &customLine) |
| Classifies a custom line style as keyboard pedaling. | |
Music classification helpers for Finale symbol extraction.
| using denigma::classify::SmartShapeValue = typedef std::variant< std::monostate, smartshape::Ottava, smartshape::Crescendo, smartshape::Decrescendo, smartshape::Slur, smartshape::ArpeggiatedTie, PseudoTie, smartshape::NonArpeggio, smartshape::KeyboardPedal, smartshape::TrillLine, smartshape::VibratoLine, smartshape::GeneralLine> |
The semantic payload of a classified smart shape.
std::monostate means the shape was not classified: it is invalid, or its type carries no semantics Denigma models. A smartshape::GeneralLine is the fallback for a line-type shape that no more specific classification claimed.
|
strong |
Diagnostic reason for the selected expression classification.
|
strong |
Exporter-neutral semantic classes for Finale/MUSX text expressions.
| ChordSuffixClassification denigma::classify::classifyChordSuffix | ( | const musx::dom::MusxInstanceList< musx::dom::others::ChordSuffixElement > & | suffix | ) |
Reconstructs a Finale chord suffix as Unicode text, resolving SMuFL and known legacy-font glyphs.
| suffix | The chord suffix elements, normally from details::ChordAssign::getChordSuffix. |
| std::optional< dynamics::Mark > denigma::classify::classifyDynamicRun | ( | const musx::util::EnigmaTextChunk & | chunk | ) |
Classifies a source text chunk as a single plain dynamic mark.
Recognition is driven by the text and its glyphs alone: a marking is a dynamic because it is spelled as one, not because Finale files it under the Dynamics category.
| EntryNoteheadClassification denigma::classify::classifyEntryNoteheads | ( | const musx::dom::EntryInfoPtr & | entry | ) |
Classifies chord-level notehead patterns (e.g.
artificial harmonics) for an entry.
This does not replace per-note notehead classification (classifyNotehead); it identifies additional structure across the notes of a chord. std::monostate means no such pattern was found, in which case each note's notehead should still be classified individually via classifyNotehead.
| ExpressionClassification denigma::classify::classifyExpression | ( | const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > & | assignment | ) |
Classifies the expression referenced by a Finale measure-expression assignment.
| assignment | Source assignment whose expression definition is resolved and classified. |
| ExpressionClassification denigma::classify::classifyExpression | ( | const musx::dom::MusxInstance< musx::dom::others::ShapeExpressionDef > & | def, |
| const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > & | assignment = {} |
||
| ) |
Classifies a Finale shape-expression definition.
| def | Source shape-expression definition. |
| assignment | Optional assignment providing placement and category context. |
| ExpressionClassification denigma::classify::classifyExpression | ( | const musx::dom::MusxInstance< musx::dom::others::TextExpressionDef > & | def, |
| const musx::dom::MusxInstance< musx::dom::others::MeasureExprAssign > & | assignment = {} |
||
| ) |
Classifies a Finale text-expression definition.
| def | Source text-expression definition. |
| assignment | Optional assignment providing placement and category context. |
| std::vector< ExpressionAssignmentClassification > denigma::classify::classifyExpressionAssignments | ( | const musx::dom::MusxInstanceList< musx::dom::others::MeasureExprAssign > & | assignments | ) |
Classifies a list of Finale measure-expression assignments.
| assignments | Source assignments to classify. |
| std::optional< smartshape::GeneralLine > denigma::classify::classifyGeneralLine | ( | const musx::dom::MusxInstance< musx::dom::others::SmartShape > & | shape | ) |
Describes a line-type smart shape (built-in or custom) as a smartshape::GeneralLine.
Entry-attached shapes are never classified as general lines: they carry specific meanings and are classified separately.
| std::optional< smartshape::GeneralLine > denigma::classify::classifyGeneralLine | ( | const musx::dom::MusxInstance< musx::dom::others::SmartShapeCustomLine > & | customLine | ) |
Describes a custom line style as a smartshape::GeneralLine.
customLine is null. | std::optional< KeyboardPedalClassification > denigma::classify::classifyKeyboardPedal | ( | const musx::util::EnigmaParsingContext & | textContext | ) |
Classifies Finale text as a keyboard-pedal marking, resolving SMuFL pedal glyphs.
This form additionally recognizes the glyph-only markings that have no spelled-out equivalent, such as the half-pedal, notched-release, and pedal-line hook glyphs. Hidden text chunks are ignored.
textContext is empty or is not a recognized marking. | std::optional< KeyboardPedalClassification > denigma::classify::classifyKeyboardPedal | ( | std::string_view | text | ) |
Classifies plain text as a keyboard-pedal marking.
Recognizes the spelled-out markings ("Ped.", "sost.", "una corda", "senza Ped.", the release star), the Roman-numeral and numeric pedal identifiers ("Ped. II"), and the usual qualifiers ("sempre", "simile", "ad lib.", "con"). Punctuation and letter case are ignored.
text is not a recognized marking. | std::optional< smartshape::KeyboardPedal > denigma::classify::classifyKeyboardPedalCustomLine | ( | const musx::dom::MusxInstance< musx::dom::others::SmartShapeCustomLine > & | customLine | ) |
Classifies a custom line style as keyboard pedaling.
This is the line-style half of classifySmartShape's keyboard-pedal path, exposed for callers that have a line style but no shape.
customLine is null or names no pedal marking in either its texts or its caps. | std::optional< OctaveMarkingClassification > denigma::classify::classifyOctaveMarking | ( | std::string_view | text | ) |
Classifies plain text as an octave-displacement marking.
Only unmistakable spellings are recognized (e.g., "8va", "8vb", "15ma", "22mb", "8va bassa"). A bare ASCII number is never classified.
| SmartShapeClassification denigma::classify::classifySmartShape | ( | const musx::dom::MusxInstance< musx::dom::others::SmartShape > & | shape | ) |
Classifies a smart shape's meaning.
An invalid shape, or one whose type Denigma does not model, yields a classification whose value is std::monostate.
| dynamics::Composition denigma::classify::dynamicComposition | ( | dynamics::Dynamic | dynamic | ) |
Decomposes a dynamic into its constituent parts.
Returns an empty dynamics::Composition for dynamics::Dynamic::None and dynamics::Dynamic::Other, whose spelling is not known from the enumerator alone; use dynamicCompositionFromLetters or dynamics::Mark::composition for those.
| dynamics::Composition denigma::classify::dynamicCompositionFromLetters | ( | std::string_view | letters | ) |
Decomposes dynamic letters such as "sffz" into their constituent parts, whether or not the spelling is one that dynamics::Dynamic enumerates.
Returns an empty dynamics::Composition if the letters do not spell a dynamic.
| dynamics::Dynamic denigma::classify::dynamicFromLevel | ( | dynamics::Level | level | ) |
Returns the dynamics::Dynamic that names a level, so that a level can be passed to the functions keyed on dynamics::Dynamic.
Returns dynamics::Dynamic::None for Level::None.
| musx::dom::MusxInstance< musx::dom::FontInfo > denigma::classify::singleVisibleFont | ( | const musx::util::EnigmaParsingContext & | textContext | ) |
Returns the common effective font of all nonempty visible text chunks.