The dynamic group object

Type: Dictionary

Encodes a dynamic value at a given rhythmic position.

This is used for any type of dynamic, from immediate ones (such as "p" or "f") to gradual ones (such as crescendo hairpins).

Various attributes are required only for certain types. For quick reference, here are the required attributes for each "type" value:

To encode a hairpin with both starting and ending dynamic values (such as "p < f"), use two separate dynamic groups:

Attributes

Name Type Required? Description
attackValue dynamic value No Encodes a dynamic that should be used specifically during the note attack, with the expectation that the dynamic should immediately be followed by a different dynamic value.

For example, this is used for "fp" dynamics, which are a bit of a special case meaning "start playing in f, then immediately reduce dynamics to p." This is encoded as {"attackValue": "f", "value": "p"}.
end measure rhythmic position No Required if type is "gradual". This defines the endpoint of the gradual dynamic.
glyphs An array of smufl glyph objects No Optional list of SMuFL glyphs to use when displaying this dynamic.

If this is provided, consuming applications should use these specific glyphs. If this isn't provided, consuming applications should automatically determine the SMuFL glyphs based on "value", "attackValue" and "relativeValue".
orient multi-staff orientation No Where the dynamic group is positioned, relative to the staff.

If not provided, the default value is "auto".
position rhythmic position Yes The rhythmic position at which this dynamic group starts.
prefix string No Optional text to display before the dynamic marking, such as "più".
relativeValue relative dynamic value No Required if type is "relative".
staff staff number No The staff index to which this dynamic group applies. By default, a dynamic group applies to all staffs in the part.
suffix string No Optional text to display after the dynamic marking, such as "sub.".
type dynamic group type Yes Distinguishes between different types of dynamics. This can be "immediate" (such as a notated "p"), "gradual" (such as a crescendo hairpin) or "relative" (such as a notated "più p", meaning "quieter").

value dynamic value No Required if type is "immediate". This defines the dynamic value, such as "p" or "f".

For gradual dynamics, this is the dynamic value at the beginning.
voice voice name No The voice to which this dynamic group applies. By default, a dynamic group applies to all voices in the part.
wedgeType wedge type No Required if type is "gradual". This defines whether the hairpin is gradually opening or gradually closing.

Plus globally available attributes: _c, _x, id

Parent objects

This object is used by the following parent objects: