Fill in components. We assume the modifiers are already constructed, e.g. by deserialize or the calling function.
the active voice in the editor, if there are multiple voices
Information for identifying this object
Measure-specific formatting parameters.
Row, column, and custom numbering information about this measure.
Runtime information about rendering
Overrides display of actual time signature, in the case of pick-up notes where the actual and displayed durations are different
Adjust for non-concert pitch intstruments
The rendered width of the measure, or estimate of same
Get rendered or estimated start x
Get rendered or estimated start y
Return actual or estimated highest point in score
Default constructor parameters. Defaults are always copied so the caller can modify them to create a new measure.
constructor params for a new measure
Measure text is deprecated, and may not be supported in the future. Better to use SmoTextGroup and attach to the measure.
used by xml export
Count the number of ticks in each voice and return max
Count the number of ticks in a specific voice
Set measure tempo to the default SmoTempoText
Convert this measure object to a JSON object, recursively serializing all the notes, note modifiers, etc.
Return actual or estimated bounding box
set the rendered width of the measure, or estimate of same
Set rendered or estimated start x
Set rendered or estimated start y
Return actual or estimated highest point in score
WHen setting an instrument, offset the pitches to match the instrument key
restore a serialized measure object. Usually called as part of deserializing a score, but can also be used to restore a measure due to an undo operation. Recursively deserialize all the notes and modifiers to construct a new measure.
the serialized SmoMeasure
When creating a new measure, the 'default' settings can vary depending on what comes before/after the measure. This determines the defaults from the parameters that are passed in, which could be another measure in the score. This version returns params with no notes, for callers that want to use their own notes. If you want the default notes, see getDefaultMeasureWithNotes
When creating a new measure, the 'default' settings can vary depending on what comes before/after the measure. This determines the defaults from the parameters that are passed in, which could be another measure in the score.
Get a measure full of default notes for a given timeSignature/clef. returns 8th notes for triple-time meters, etc.
// Return true if the time signatures are the same, for display purposes (e.g. if a time sig change // is required)
Generated using TypeDoc
Data for a measure of music. Many rules of musical engraving are enforced at a measure level: the duration of notes, accidentals, etc.
Measures contain SmoNote, SmoTuplet, and {@link SmoBeamGroup} Measures are contained in SmoSystemStaff