LilyPond Internals Reference: 2.1.7 Dynamics

### 2.1.7 Dynamics

Holds a single line of dynamics, which will be centered between the staves surrounding this context.

This context also accepts commands for the following context(s):

Voice.

This context creates the following layout object(s):

BarLine, DynamicLineSpanner, DynamicText, DynamicTextSpanner, Hairpin, PianoPedalBracket, Script, SostenutoPedal, SustainPedal, TextScript, TextSpanner, UnaCordaPedal and VerticalAxisGroup.

This context sets the following properties:

- Set grob-property `font-shape` in TextScript to `'italic`.
- Set grob-property `nonstaff-relatedstaff-spacing` in VerticalAxisGroup to `'((basic-distance . 5) (padding . 0.5))`.
- Set grob-property `staff-affinity` in VerticalAxisGroup to `0`.
- Set grob-property `Y-offset` in DynamicLineSpanner to `0`.
- Set translator property `pedalSustainStrings` to `'(Ped. *Ped. *)`.
- Set translator property `pedalUnaCordaStrings` to `'(una corda tre corde)`.

This context is a ‘bottom’ context; it cannot contain other contexts.

This context is built from the following engraver(s):

> `Axis_group_engraver`

>   Group all objects created in this context in a `VerticalAxisGroup` spanner.

>   Properties (read)

>   > `currentCommandColumn` (graphical (layout) object)

>   >   Grob that is X-parent to all current breakable (clef, key signature, etc.) items.

>   This engraver creates the following layout object(s):

>   VerticalAxisGroup.

> `Bar_engraver`

>   Create barlines. This engraver is controlled through the `whichBar` property. If it has no bar line to create, it will forbid a linebreak at this point.

>   Properties (read)

>   > `whichBar` (string)

>   >   This property is read to determine what type of bar line to create.

>   >   Example:

>   >   >     \set Staff.whichBar = "|:"

>   >   This will create a start-repeat bar in this staff only. Valid values are described in bar-line-interface.

>   Properties (write)

>   > `forbidBreak` (boolean)

>   >   If set to `##t`, prevent a line break at this point.

>   This engraver creates the following layout object(s):

>   BarLine.

> `Dynamic_align_engraver`

>   Align hairpins and dynamic texts on a horizontal line.

>   Music types accepted:

>   break-span-event

>   Properties (read)

>   > `currentMusicalColumn` (graphical (layout) object)

>   >   Grob that is X-parent to all non-breakable items (note heads, lyrics, etc.).

>   This engraver creates the following layout object(s):

>   DynamicLineSpanner.

> `New_dynamic_engraver`

>   Create hairpins, dynamic texts and dynamic text spanners.

>   Music types accepted:

>   absolute-dynamic-event and span-dynamic-event

>   Properties (read)

>   > `crescendoSpanner` (symbol)

>   >   The type of spanner to be used for crescendi. Available values are ‘`hairpin`’ and ‘`text`’. If unset, a hairpin crescendo is used.

>   > `crescendoText` (markup)

>   >   The text to print at start of non-hairpin crescendo, i.e., ‘`cresc.`’.

>   > `currentMusicalColumn` (graphical (layout) object)

>   >   Grob that is X-parent to all non-breakable items (note heads, lyrics, etc.).

>   > `decrescendoSpanner` (symbol)

>   >   The type of spanner to be used for decrescendi. Available values are ‘`hairpin`’ and ‘`text`’. If unset, a hairpin decrescendo is used.

>   > `decrescendoText` (markup)

>   >   The text to print at start of non-hairpin decrescendo, i.e., ‘`dim.`’.

>   This engraver creates the following layout object(s):

>   DynamicText, DynamicTextSpanner and Hairpin.

> `Output_property_engraver`

>   Apply a procedure to any grob acknowledged.

>   Music types accepted:

>   apply-output-event

> `Piano_pedal_engraver`

>   Engrave piano pedal symbols and brackets.

>   Music types accepted:

>   sostenuto-event, sustain-event and una-corda-event

>   Properties (read)

>   > `currentCommandColumn` (graphical (layout) object)

>   >   Grob that is X-parent to all current breakable (clef, key signature, etc.) items.

>   > `pedalSostenutoStrings` (list)

>   >   See `pedalSustainStrings`.

>   > `pedalSostenutoStyle` (symbol)

>   >   See `pedalSustainStyle`.

>   > `pedalSustainStrings` (list)

>   >   A list of strings to print for sustain-pedal. Format is `(up updown down)`, where each of the three is the string to print when this is done with the pedal.

>   > `pedalSustainStyle` (symbol)

>   >   A symbol that indicates how to print sustain pedals: `text`, `bracket` or `mixed` (both).

>   > `pedalUnaCordaStrings` (list)

>   >   See `pedalSustainStrings`.

>   > `pedalUnaCordaStyle` (symbol)

>   >   See `pedalSustainStyle`.

>   This engraver creates the following layout object(s):

>   PianoPedalBracket, SostenutoPedal, SustainPedal and UnaCordaPedal.

> `Script_engraver`

>   Handle note scripted articulations.

>   Music types accepted:

>   articulation-event

>   Properties (read)

>   > `scriptDefinitions` (list)

>   >   The description of scripts. This is used by the `Script_engraver` for typesetting note-superscripts and subscripts. See ‘`scm/script.scm`’ for more information.

>   This engraver creates the following layout object(s):

>   Script.

> `Text_engraver`

>   Create text scripts.

>   Music types accepted:

>   text-script-event

>   This engraver creates the following layout object(s):

>   TextScript.

> `Text_spanner_engraver`

>   Create text spanner from an event.

>   Music types accepted:

>   text-span-event

>   Properties (read)

>   > `currentMusicalColumn` (graphical (layout) object)

>   >   Grob that is X-parent to all non-breakable items (note heads, lyrics, etc.).

>   This engraver creates the following layout object(s):

>   TextSpanner.

> `Tweak_engraver`

>   Read the `tweaks` property from the originating event, and set properties.

#### Internals Reference