GNU LilyPond – Internals Reference

This document is also available as a PDF and as a HTML indexed multiple pages.

This is the Internals Reference (IR) for version 2.12.1 of LilyPond, the GNU music typesetter.


1. Music definitions


1.1 Music expressions


1.1.1 AbsoluteDynamicEvent

Create a dynamic mark.

Syntax: note\x, where \x is a dynamic mark like \ppp or \sfz. A complete list is in file ‘ly/dynamic-scripts-init.ly’.

Event classes: absolute-dynamic-event, dynamic-event, music-event and StreamEvent.

Accepted by: Dynamic_engraver, Dynamic_performer and New_dynamic_engraver.

Properties:

name (symbol):

'AbsoluteDynamicEvent

Name of this music object.

types (list):

'(general-music event dynamic-event absolute-dynamic-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.2 AnnotateOutputEvent

Print an annotation of an output element.

Event classes: annotate-output-event, music-event and StreamEvent.

Accepted by: Balloon_engraver.

Properties:

name (symbol):

'AnnotateOutputEvent

Name of this music object.

types (list):

'(general-music event annotate-output-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.3 ApplyContext

Call the argument with the current context during interpreting phase.

Properties:

name (symbol):

'ApplyContext

Name of this music object.

types (list):

'(general-music apply-context)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:apply-context-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.4 ApplyOutputEvent

Call the argument with all current grobs during interpreting phase.

Syntax: \applyOutput #'context func

Arguments to func are 1. the grob, 2. the originating context, and 3. the context where func is called.

Event classes: apply-output-event, layout-instruction-event, music-event and StreamEvent.

Accepted by: Output_property_engraver.

Properties:

name (symbol):

'ApplyOutputEvent

Name of this music object.

types (list):

'(general-music event apply-output-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.5 ArpeggioEvent

Make an arpeggio on this note.

Syntax: note-\arpeggio

Event classes: arpeggio-event, music-event and StreamEvent.

Accepted by: Arpeggio_engraver.

Properties:

name (symbol):

'ArpeggioEvent

Name of this music object.

types (list):

'(general-music arpeggio-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.6 ArticulationEvent

Add an articulation marking to a note.

Syntax: notexy, where x is a direction (^ for up or _ for down), or LilyPond’s choice (no direction specified)), and where y is an articulation (such as -., ->, \tenuto, \downbow). See the Notation Reference for details.

Event classes: articulation-event, script-event, music-event and StreamEvent.

Accepted by: Script_engraver.

Properties:

name (symbol):

'ArticulationEvent

Name of this music object.

types (list):

'(general-music event articulation-event script-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.7 AutoChangeMusic

Used for making voices that switch between piano staves automatically.

Properties:

name (symbol):

'AutoChangeMusic

Name of this music object.

iterator-ctor (procedure):

ly:auto-change-iterator::constructor

Function to construct a music-event-iterator object for this music.

start-callback (procedure):

ly:music-wrapper::start-callback

Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

length-callback (procedure):

ly:music-wrapper::length-callback

How to compute the duration of this music. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

types (list):

'(general-music music-wrapper-music auto-change-instruction)

The types of this music object; determines by what engraver this music expression is processed.


1.1.8 BarCheck

Check whether this music coincides with the start of the measure.

Properties:

name (symbol):

'BarCheck

Name of this music object.

types (list):

'(general-music bar-check)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:bar-check-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.9 BassFigureEvent

Print a bass-figure text.

Event classes: bass-figure-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Figured_bass_engraver.

Properties:

name (symbol):

'BassFigureEvent

Name of this music object.

types (list):

'(general-music event rhythmic-event bass-figure-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.10 BeamEvent

Start or stop a beam.

Syntax for manual control: c8-[ c c-] c8

Event classes: beam-event, span-event, music-event and StreamEvent.

Accepted by: Beam_engraver, Beam_performer and Grace_beam_engraver.

Properties:

name (symbol):

'BeamEvent

Name of this music object.

types (list):

'(general-music event beam-event span-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.11 BeamForbidEvent

Specify that a note may not auto-beamed.

Event classes: beam-forbid-event, music-event and StreamEvent.

Accepted by: Auto_beam_engraver.

Properties:

name (symbol):

'BeamForbidEvent

Name of this music object.

types (list):

'(general-music event beam-forbid-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.12 BendAfterEvent

A drop/fall/doit jazz articulation.

Event classes: bend-after-event, music-event and StreamEvent.

Accepted by: Bend_engraver.

Properties:

name (symbol):

'BendAfterEvent

Name of this music object.

types (list):

'(general-music bend-after-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.13 BreathingEvent

Create a ‘breath mark’ or ‘comma’.

Syntax: note\breathe

Event classes: breathing-event, music-event and StreamEvent.

Accepted by: Breathing_sign_engraver.

Properties:

name (symbol):

'BreathingEvent

Name of this music object.

types (list):

'(general-music event breathing-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.14 ClusterNoteEvent

A note that is part of a cluster.

Event classes: cluster-note-event, melodic-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Cluster_spanner_engraver.

Properties:

name (symbol):

'ClusterNoteEvent

Name of this music object.

types (list):

'(general-music cluster-note-event melodic-event rhythmic-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.15 ContextChange

Change staves in Piano staff.

Syntax: \change Staff = new-id

Properties:

name (symbol):

'ContextChange

Name of this music object.

iterator-ctor (procedure):

ly:change-iterator::constructor

Function to construct a music-event-iterator object for this music.

types (list):

'(general-music translator-change-instruction)

The types of this music object; determines by what engraver this music expression is processed.


1.1.16 ContextSpeccedMusic

Interpret the argument music within a specific context.

Properties:

name (symbol):

'ContextSpeccedMusic

Name of this music object.

iterator-ctor (procedure):

ly:context-specced-music-iterator::constructor

Function to construct a music-event-iterator object for this music.

length-callback (procedure):

ly:music-wrapper::length-callback

How to compute the duration of this music. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

start-callback (procedure):

ly:music-wrapper::start-callback

Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

types (list):

'(context-specification general-music music-wrapper-music)

The types of this music object; determines by what engraver this music expression is processed.


1.1.17 CrescendoEvent

Begin or end a crescendo.

Syntax: note\crnote\rc

You can also use \<, \!, \cresc, and \endcresc. See the Notation Reference for details.

Event classes: crescendo-event, span-dynamic-event, span-event, music-event and StreamEvent.

Accepted by: Dynamic_engraver, Dynamic_performer and New_dynamic_engraver.

Properties:

name (symbol):

'CrescendoEvent

Name of this music object.

types (list):

'(general-music span-event span-dynamic-event crescendo-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.18 DecrescendoEvent

See CrescendoEvent.

Event classes: decrescendo-event, span-dynamic-event, span-event, music-event and StreamEvent.

Accepted by: Dynamic_engraver, Dynamic_performer and New_dynamic_engraver.

Properties:

name (symbol):

'DecrescendoEvent

Name of this music object.

types (list):

'(general-music span-event span-dynamic-event decrescendo-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.19 Event

Atomic music event.

Properties:

name (symbol):

'Event

Name of this music object.

types (list):

'(general-music event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.20 EventChord

Internally used to group a set of events.

Properties:

name (symbol):

'EventChord

Name of this music object.

iterator-ctor (procedure):

ly:event-chord-iterator::constructor

Function to construct a music-event-iterator object for this music.

length-callback (procedure):

ly:music-sequence::maximum-length-callback

How to compute the duration of this music. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

to-relative-callback (procedure):

ly:music-sequence::event-chord-relative-callback

How to transform a piece of music to relative pitches.

types (list):

'(general-music event-chord simultaneous-music)

The types of this music object; determines by what engraver this music expression is processed.


1.1.21 ExtenderEvent

Extend lyrics.

Event classes: extender-event, music-event and StreamEvent.

Accepted by: Extender_engraver.

Properties:

name (symbol):

'ExtenderEvent

Name of this music object.

types (list):

'(general-music extender-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.22 FingeringEvent

Specify what finger to use for this note.

Event classes: fingering-event, music-event and StreamEvent.

Accepted by: Fingering_engraver.

Properties:

name (symbol):

'FingeringEvent

Name of this music object.

types (list):

'(general-music fingering-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.23 GlissandoEvent

Start a glissando on this note.

Event classes: glissando-event, music-event and StreamEvent.

Accepted by: Glissando_engraver.

Properties:

name (symbol):

'GlissandoEvent

Name of this music object.

types (list):

'(general-music glissando-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.24 GraceMusic

Interpret the argument as grace notes.

Properties:

name (symbol):

'GraceMusic

Name of this music object.

start-callback (procedure):

ly:grace-music::start-callback

Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

length (moment):

#<Mom 0>

The duration of this music.

iterator-ctor (procedure):

ly:grace-iterator::constructor

Function to construct a music-event-iterator object for this music.

types (list):

'(grace-music music-wrapper-music general-music)

The types of this music object; determines by what engraver this music expression is processed.


1.1.25 HarmonicEvent

Mark a note as harmonic.

Event classes: harmonic-event, music-event and StreamEvent.

Not accepted by any engraver or performer.

Properties:

name (symbol):

'HarmonicEvent

Name of this music object.

types (list):

'(general-music event harmonic-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.26 HyphenEvent

A hyphen between lyric syllables.

Event classes: hyphen-event, music-event and StreamEvent.

Accepted by: Hyphen_engraver.

Properties:

name (symbol):

'HyphenEvent

Name of this music object.

types (list):

'(general-music hyphen-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.27 KeyChangeEvent

Change the key signature.

Syntax: \key name scale

Event classes: key-change-event, music-event and StreamEvent.

Accepted by: Key_engraver and Key_performer.

Properties:

name (symbol):

'KeyChangeEvent

Name of this music object.

to-relative-callback (procedure):

#<procedure #f (x p)>

How to transform a piece of music to relative pitches.

types (list):

'(general-music key-change-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.28 LabelEvent

Place a bookmarking label.

Event classes: label-event, music-event and StreamEvent.

Accepted by: Paper_column_engraver.

Properties:

name (symbol):

'LabelEvent

Name of this music object.

types (list):

'(general-music label-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.29 LaissezVibrerEvent

Don’t damp this chord.

Syntax: note\laissezVibrer

Event classes: laissez-vibrer-event, music-event and StreamEvent.

Accepted by: Laissez_vibrer_engraver.

Properties:

name (symbol):

'LaissezVibrerEvent

Name of this music object.

types (list):

'(general-music event laissez-vibrer-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.30 LigatureEvent

Start or end a ligature.

Event classes: ligature-event, span-event, music-event and StreamEvent.

Accepted by: Ligature_bracket_engraver, Mensural_ligature_engraver and Vaticana_ligature_engraver.

Properties:

name (symbol):

'LigatureEvent

Name of this music object.

span-type (string):

'ligature

What kind of spanner should be created?

TODO: Consider making type into symbol.

types (list):

'(general-music span-event ligature-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.31 LineBreakEvent

Allow, forbid or force a line break.

Event classes: line-break-event, break-event, music-event and StreamEvent.

Accepted by: Page_turn_engraver and Paper_column_engraver.

Properties:

name (symbol):

'LineBreakEvent

Name of this music object.

types (list):

'(general-music line-break-event break-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.32 LyricCombineMusic

Align lyrics to the start of notes.

Syntax: \lyricsto voicename lyrics

Properties:

name (symbol):

'LyricCombineMusic

Name of this music object.

length (moment):

#<Mom 0>

The duration of this music.

types (list):

'(general-music lyric-combine-music)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:lyric-combine-music-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.33 LyricEvent

A lyric syllable. Must be entered in lyrics mode, i.e., \lyrics { twinkle4 twinkle4 } .

Event classes: lyric-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Lyric_engraver and Lyric_performer.

Properties:

name (symbol):

'LyricEvent

Name of this music object.

types (list):

'(general-music rhythmic-event lyric-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.34 MarkEvent

Insert a rehearsal mark.

Syntax: \mark marker

Example: \mark "A"

Event classes: mark-event, music-event and StreamEvent.

Accepted by: Mark_engraver.

Properties:

name (symbol):

'MarkEvent

Name of this music object.

types (list):

'(general-music mark-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.35 MultiMeasureRestEvent

Used internally by MultiMeasureRestMusic to signal rests.

Event classes: multi-measure-rest-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Multi_measure_rest_engraver.

Properties:

name (symbol):

'MultiMeasureRestEvent

Name of this music object.

types (list):

'(general-music event rhythmic-event multi-measure-rest-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.36 MultiMeasureRestMusic

Rests that may be compressed into Multi rests.

Syntax: R2.*4 for 4 measures in 3/4 time.

Properties:

name (symbol):

'MultiMeasureRestMusic

Name of this music object.

iterator-ctor (procedure):

ly:sequential-iterator::constructor

Function to construct a music-event-iterator object for this music.

elements-callback (procedure):

mm-rest-child-list

Return a list of children, for use by a sequential iterator. Takes a single music parameter.

types (list):

'(general-music multi-measure-rest)

The types of this music object; determines by what engraver this music expression is processed.


1.1.37 MultiMeasureTextEvent

Texts on multi measure rests.

Syntax: R-\markup { \roman "bla" }

Note the explicit font switch.

Event classes: multi-measure-text-event, music-event and StreamEvent.

Accepted by: Multi_measure_rest_engraver.

Properties:

name (symbol):

'MultiMeasureTextEvent

Name of this music object.

types (list):

'(general-music event multi-measure-text-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.38 Music

Generic type for music expressions.

Properties:

name (symbol):

'Music

Name of this music object.

types (list):

'(general-music)

The types of this music object; determines by what engraver this music expression is processed.


1.1.39 NoteEvent

A note.

Event classes: note-event, melodic-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Chord_name_engraver, Completion_heads_engraver, Drum_note_performer, Drum_notes_engraver, Fretboard_engraver, Note_heads_engraver, Note_name_engraver, Note_performer and Tab_note_heads_engraver.

Properties:

name (symbol):

'NoteEvent

Name of this music object.

types (list):

'(general-music event note-event rhythmic-event melodic-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.40 NoteGroupingEvent

Start or stop grouping brackets.

Event classes: note-grouping-event, music-event and StreamEvent.

Accepted by: Horizontal_bracket_engraver.

Properties:

name (symbol):

'NoteGroupingEvent

Name of this music object.

types (list):

'(general-music event note-grouping-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.41 OverrideProperty

Extend the definition of a graphical object.

Syntax: \override [ context . ] object property = value

Properties:

name (symbol):

'OverrideProperty

Name of this music object.

types (list):

'(general-music layout-instruction-event override-property-event)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:push-property-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.42 PageBreakEvent

Allow, forbid or force a page break.

Event classes: page-break-event, break-event, music-event and StreamEvent.

Accepted by: Page_turn_engraver and Paper_column_engraver.

Properties:

name (symbol):

'PageBreakEvent

Name of this music object.

types (list):

'(general-music break-event page-break-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.43 PageTurnEvent

Allow, forbid or force a page turn.

Event classes: page-turn-event, break-event, music-event and StreamEvent.

Accepted by: Page_turn_engraver and Paper_column_engraver.

Properties:

name (symbol):

'PageTurnEvent

Name of this music object.

types (list):

'(general-music break-event page-turn-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.44 PartCombineMusic

Combine two parts on a staff, either merged or as separate voices.

Properties:

name (symbol):

'PartCombineMusic

Name of this music object.

length-callback (procedure):

ly:music-sequence::maximum-length-callback

How to compute the duration of this music. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

start-callback (procedure):

ly:music-sequence::minimum-start-callback

Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

types (list):

'(general-music part-combine-music)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:part-combine-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.45 PercentEvent

Used internally to signal percent repeats.

Event classes: percent-event, rhythmic-event, music-event and StreamEvent.

Accepted by: Percent_repeat_engraver and Slash_repeat_engraver.

Properties:

name (symbol):

'PercentEvent

Name of this music object.

types (list):

'(general-music event percent-event rhythmic-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.46 PercentRepeatedMusic

Repeats encoded by percents.

Properties:

name (symbol):

'PercentRepeatedMusic

Name of this music object.

iterator-ctor (procedure):

ly:percent-repeat-iterator::constructor

Function to construct a music-event-iterator object for this music.

start-callback (procedure):

ly:repeated-music::first-start

Function to compute the negative length of starting grace notes. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

length-callback (procedure):

ly:repeated-music::unfolded-music-length

How to compute the duration of this music. This property can only be defined as initializer in ‘scm/define-music-types.scm’.

types (list):

'(general-music repeated-music percent-repeated-music)

The types of this music object; determines by what engraver this music expression is processed.


1.1.47 PesOrFlexaEvent

Within a ligature, mark the previous and the following note to form a pes (if melody goes up) or a flexa (if melody goes down).

Event classes: pes-or-flexa-event, music-event and StreamEvent.

Accepted by: Vaticana_ligature_engraver.

Properties:

name (symbol):

'PesOrFlexaEvent

Name of this music object.

types (list):

'(general-music pes-or-flexa-event event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.48 PhrasingSlurEvent

Start or end phrasing slur.

Syntax: note\( and note\)

Event classes: phrasing-slur-event, span-event, music-event and StreamEvent.

Accepted by: Phrasing_slur_engraver.

Properties:

name (symbol):

'PhrasingSlurEvent

Name of this music object.

types (list):

'(general-music span-event event phrasing-slur-event)

The types of this music object; determines by what engraver this music expression is processed.


1.1.49 PropertySet

Set a context property.

Syntax: \property context.prop = scheme-val

Properties:

name (symbol):

'PropertySet

Name of this music object.

types (list):

'(layout-instruction-event general-music)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:property-iterator::constructor

Function to construct a music-event-iterator object for this music.


1.1.50 PropertyUnset

Remove the definition of a context \property.

Properties:

name (symbol):

'PropertyUnset

Name of this music object.

types (list):

'(layout-instruction-event general-music)

The types of this music object; determines by what engraver this music expression is processed.

iterator-ctor (procedure):

ly:property-unset-iterator::constructor

Function to construct a music-event-iterator object for this music.