OpenSheetMusicDisplay
    Preparing search index...

    Class InstantaneousDynamicExpression

    Hierarchy (View Summary)

    Index
    ColorXML: string
    Dashes: Dashes

    The dashed line that extends the expression's text up to where it stops applying, e.g. "cresc. - - - -": MusicXML <dashes>. Undefined if the text has none.

    InMeasureTimestamp: Fraction
    language: string

    The xml:lang of the expression's words, see Label.language.

    parentMeasure: SourceMeasure
    placement: PlacementEnum
    YPositionXml: number

    The vertical position the file gives the words or dynamic, in tenths of a staff space, up from the top line of the staff: MusicXML default-y plus relative-y. Undefined without a default-y (see ExpressionReader.readYPositionXml()).

    • get Volume(): number

      The relative volume (0 to 1) of this marking, from its OSMD instance's table (EngravingRules.DynamicToRelativeVolumeDict, e.g. osmd.EngravingRules.DynamicToRelativeVolumeDict.setValue(DynamicEnum.p, 0.3)). Undefined for a marking created without a measure (and so without rules), which the MusicXML reader doesn't do.

      Returns number

    • The playback dynamic (DynEnum) for the text of a marking, or undefined if the text doesn't denote one:

      • the whole text, if it is a known dynamic: "sfz", "MF", "pf"
      • for a plain sequence of dynamics letters, the longest known dynamic it starts with, i.e. the first symbol of a combined marking: "sfmp" -> sf, "ffz" -> ff (also how Finale, Sibelius and MuseScore write these in )
      • for a text, its leading dynamic word: "f con fuoco" -> f, "p dolce" -> p. A dynamic letter that merely starts a longer word doesn't count ("fine", "forte", "pesante"), nor does a text not starting with a dynamic ("cresc.", "più f").

      Parameters

      • text: string

      Returns DynamicEnum