2.1.26 Score

This is the top level notation context. No other context can contain a Score context. This context handles the administration of time signatures. It also makes sure that items such as clefs, time signatures, and key-signatures are aligned across staves.

You cannot explicitly instantiate a Score context (since it is not contained in any other context). It is instantiated automatically when an output definition (a \score or \layout block) is processed.

An alias for Timing is established by the Timing_translator in whatever context it is initialized, and the timing variables are then copied from wherever Timing had been previously established. The alias at Score level provides a target for initializing Timing variables in layout definitions before any Timing_translator has been run.

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

This context creates the following layout object(s): BarNumber, BreakAlignGroup, BreakAlignment, CenteredBarNumber, CenteredBarNumberLineSpanner, ControlPoint, ControlPolygon, Footnote, GraceSpacing, JumpScript, LeftEdge, MetronomeMark, NonMusicalPaperColumn, PaperColumn, Parentheses, RehearsalMark, SpacingSpanner, SystemStartBar, SystemStartBrace, SystemStartBracket, SystemStartSquare, VerticalAlignment, VoltaBracket and VoltaBracketSpanner.

This context sets the following properties:

This is not a ‘Bottom’ context; search for such a one will commence after creating an implicit context of type Staff.

Context Score can contain ChoirStaff, ChordNames, Devnull, DrumStaff, Dynamics, FiguredBass, FretBoards, GrandStaff, GregorianTranscriptionStaff, KievanStaff, Lyrics, MensuralStaff, NoteNames, OneStaff, PetrucciStaff, PianoStaff, RhythmicStaff, Staff, StaffGroup, TabStaff and VaticanaStaff.

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

Bar_number_engraver

A bar number may be created at any bar line, subject to the barNumberVisibility callback. By default, it is put on top of all staves and appears only at the left side of the staff. The staves are taken from stavesFound, which is maintained by Staff_collecting_engraver. This engraver usually creates BarNumber grobs, but when centerBarNumbers is true, it makes CenteredBarNumber grobs instead.

Properties (read)

alternativeNumber (integer)

When set, the index of the current \alternative element, starting from one. Not set outside of alternatives. Note the distinction from volta number: an alternative may pertain to multiple volte.

alternativeNumberingStyle (symbol)

The scheme and style for numbering bars in repeat alternatives. If not set (the default), bar numbers continue through alternatives. Can be set to numbers to reset the bar number at each alternative, or set to numbers-with-letters to reset and also include letter suffixes.

barNumberFormatter (procedure)

A procedure that takes a bar number, measure position, and alternative number and returns a markup of the bar number to print.

barNumberVisibility (procedure)

A procedure that takes a bar number and a measure position and returns whether the corresponding bar number should be printed. Note that the actual print-out of bar numbers is controlled with the break-visibility property.

The following procedures are predefined:

all-bar-numbers-visible

Enable bar numbers for all bars, including the first one and broken bars (which get bar numbers in parentheses).

first-bar-number-invisible

Enable bar numbers for all bars (including broken bars) except the first one. If the first bar is broken, it doesn’t get a bar number either.

first-bar-number-invisible-save-broken-bars

Enable bar numbers for all bars (including broken bars) except the first one. A broken first bar gets a bar number.

first-bar-number-invisible-and-no-parenthesized-bar-numbers

Enable bar numbers for all bars except the first bar and broken bars. This is the default.

(every-nth-bar-number-visible n)

Assuming n is value 2, for example, this enables bar numbers for bars 2, 4, 6, etc.

(modulo-bar-number-visible n m)

If bar numbers 1, 4, 7, etc., should be enabled, n (the modulo) must be set to 3 and m (the division remainder) to 1.

centerBarNumbers (boolean)

Whether to center bar numbers in their measure instead of aligning them on the bar line.

currentBarNumber (integer)

Contains the current barnumber. This property is incremented at every bar line.

currentCommandColumn (graphical (layout) object)

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

measurePosition (moment)

How much of the current measure have we had. This can be set manually to create incomplete measures.

stavesFound (list of grobs)

A list of all staff-symbols found.

This engraver creates the following layout object(s): BarNumber and CenteredBarNumber.

Beam_collision_engraver

Help beams avoid colliding with notes and clefs in other voices.

Break_align_engraver

Align grobs with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder. The left edge of the alignment gets a separate group, with a symbol left-edge.

This engraver creates the following layout object(s): BreakAlignGroup, BreakAlignment and LeftEdge.

Centered_bar_number_align_engraver

Group measure-centered bar numbers in a CenteredBarNumberLineSpanner so they end up on the same vertical position.

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): CenteredBarNumberLineSpanner.

Concurrent_hairpin_engraver

Collect concurrent hairpins.

Default_bar_line_engraver

This engraver determines what kind of automatic bar lines should be produced, and sets whichBar accordingly. It should be at the same level as Timing_translator.

Properties (read)

automaticBars (boolean)

If set to false then bar lines will not be printed automatically; they must be explicitly created with a \bar command. Unlike the \cadenzaOn keyword, measures are still counted. Bar line generation will resume according to that count if this property is unset.

barAlways (boolean)

If set to true a bar line is drawn after each note.

defaultBarType (string)

Set the default type of bar line. See whichBar for information on available bar types.

This variable is read by Timing_translator at Score level.

measureStartNow (boolean)

True at the beginning of a measure.

Properties (write)

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 ‘scm/bar-line.scm’.

Footnote_engraver

Create footnote texts.

This engraver creates the following layout object(s): Footnote.

Grace_spacing_engraver

Bookkeeping of shortest starting and playing notes in grace note runs.

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): GraceSpacing.

Jump_engraver

Create JumpScript objects. It puts them outside all staves (which is taken from the property stavesFound). If moving this engraver to a different context, Staff_collecting_engraver must move along, otherwise all marks end up on the same Y location.

Music types accepted: fine-event

Properties (read)

stavesFound (list of grobs)

A list of all staff-symbols found.

This engraver creates the following layout object(s): JumpScript.

Mark_engraver

Create RehearsalMark objects. It puts them on top of all staves (which is taken from the property stavesFound). If moving this engraver to a different context, Staff_collecting_engraver must move along, otherwise all marks end up on the same Y location.

Music types accepted: mark-event

Properties (read)

markFormatter (procedure)

A procedure taking as arguments the context and the sequence number of the rehearsal mark. It should return the formatted mark as a markup object.

rehearsalMark (integer)

The last rehearsal mark printed.

stavesFound (list of grobs)

A list of all staff-symbols found.

This engraver creates the following layout object(s): RehearsalMark.

Metronome_mark_engraver

Engrave metronome marking. This delegates the formatting work to the function in the metronomeMarkFormatter property. The mark is put over all staves. The staves are taken from the stavesFound property, which is maintained by Staff_collecting_engraver.

Music types accepted: tempo-change-event

Properties (read)

currentCommandColumn (graphical (layout) object)

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

currentMusicalColumn (graphical (layout) object)

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

metronomeMarkFormatter (procedure)

How to produce a metronome markup. Called with two arguments: a TempoChangeEvent and context.

stavesFound (list of grobs)

A list of all staff-symbols found.

tempoHideNote (boolean)

Hide the note = count in tempo marks.

This engraver creates the following layout object(s): MetronomeMark.

Output_property_engraver

Apply a procedure to any grob acknowledged.

Music types accepted: apply-output-event

Paper_column_engraver

Take care of generating columns.

This engraver decides whether a column is breakable. The default is that a column is always breakable. However, every Bar_engraver that does not have a barline at a certain point will set forbidBreaks in the score context to stop line breaks. In practice, this means that you can make a break point by creating a bar line (assuming that there are no beams or notes that prevent a break point).

Music types accepted: break-event and label-event

Properties (read)

forbidBreak (boolean)

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

Properties (write)

currentCommandColumn (graphical (layout) object)

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

currentMusicalColumn (graphical (layout) object)

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

forbidBreak (boolean)

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

This engraver creates the following layout object(s): NonMusicalPaperColumn and PaperColumn.

Parenthesis_engraver

Parenthesize objects whose parenthesize property is #t.

This engraver creates the following layout object(s): Parentheses.

Repeat_acknowledge_engraver

Acknowledge repeated music, and convert the contents of repeatCommands into an appropriate setting for whichBar.

Music types accepted: fine-event, section-event, segno-event and volta-span-event

Properties (read)

defaultBarType (string)

Set the default type of bar line. See whichBar for information on available bar types.

This variable is read by Timing_translator at Score level.

doubleRepeatSegnoType (string)

Set the default bar line for the combinations double repeat with segno. Default is ‘:|.S.|:’.

doubleRepeatType (string)

Set the default bar line for double repeats.

endRepeatSegnoType (string)

Set the default bar line for the combinations ending of repeat with segno. Default is ‘:|.S’.

endRepeatType (string)

Set the default bar line for the ending of repeats.

fineBarType (string)

The bar line for \fine. See whichBar for information on available bar types.

fineSegnoType (string)

Set the default bar line for a requested segno with fine. Default is ‘|.S’.

fineStartRepeatSegnoType (string)

Set the default bar line for the combinations beginning of repeat with segno and fine. Default is ‘|.S.|:’.

repeatCommands (list)

This property is a list of commands of the form (list 'volta x), where x is a string or #f. 'end-repeat is also accepted as a command.

sectionBarType (string)

The bar line for \section. See whichBar for information on available bar types.

segnoType (string)

Set the default bar line for a requested segno. Default is ‘S’.

startRepeatSegnoType (string)

Set the default bar line for the combinations beginning of repeat with segno. Default is ‘S.|:’.

startRepeatType (string)

Set the default bar line for the beginning of repeats.

underlyingRepeatType (string)

Set the bar line to use at points of repetition or departure where no bar line would normally appear, for example at the end of a system broken in mid measure where the next system begins with a segno.

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 ‘scm/bar-line.scm’.

Properties (write)

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 ‘scm/bar-line.scm’.

Show_control_points_engraver

Create grobs to visualize control points of Bézier curves (ties and slurs) for ease of tweaking.

This engraver creates the following layout object(s): ControlPoint and ControlPolygon.

Spacing_engraver

Make a SpacingSpanner and do bookkeeping of shortest starting and playing notes.

Music types accepted: spacing-section-event

Properties (read)

currentCommandColumn (graphical (layout) object)

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

currentMusicalColumn (graphical (layout) object)

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

proportionalNotationDuration (moment)

Global override for shortest-playing duration. This is used for switching on proportional notation.

This engraver creates the following layout object(s): SpacingSpanner.

Spanner_tracking_engraver

Helper for creating spanners attached to other spanners. If a spanner has the sticky-grob-interface, the engraver tracks the spanner contained in its sticky-host object. When the host ends, the sticky spanner attached to it has its end announced too.

Staff_collecting_engraver

Maintain the stavesFound variable.

Properties (read)

stavesFound (list of grobs)

A list of all staff-symbols found.

Properties (write)

stavesFound (list of grobs)

A list of all staff-symbols found.

Stanza_number_align_engraver

This engraver ensures that stanza numbers are neatly aligned.

System_start_delimiter_engraver

Create a system start delimiter (i.e., a SystemStartBar, SystemStartBrace, SystemStartBracket or SystemStartSquare spanner).

Properties (read)

currentCommandColumn (graphical (layout) object)

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

systemStartDelimiter (symbol)

Which grob to make for the start of the system/staff? Set to SystemStartBrace, SystemStartBracket or SystemStartBar.

systemStartDelimiterHierarchy (pair)

A nested list, indicating the nesting of a start delimiters.

This engraver creates the following layout object(s): SystemStartBar, SystemStartBrace, SystemStartBracket and SystemStartSquare.

Timing_translator

This engraver adds the alias Timing to its containing context. Responsible for synchronizing timing information from staves. Normally in Score. In order to create polyrhythmic music, this engraver should be removed from Score and placed in Staff.

Music types accepted: alternative-event

Properties (read)

alternativeNumberingStyle (symbol)

The scheme and style for numbering bars in repeat alternatives. If not set (the default), bar numbers continue through alternatives. Can be set to numbers to reset the bar number at each alternative, or set to numbers-with-letters to reset and also include letter suffixes.

baseMoment (moment)

Smallest unit of time that will stand on its own as a subdivided section.

currentBarNumber (integer)

Contains the current barnumber. This property is incremented at every bar line.

internalBarNumber (integer)

Contains the current barnumber. This property is used for internal timekeeping, among others by the Accidental_engraver.

measureLength (moment)

Length of one measure in the current time signature.

measurePosition (moment)

How much of the current measure have we had. This can be set manually to create incomplete measures.

timeSignatureFraction (fraction, as pair)

A pair of numbers, signifying the time signature. For example, '(4 . 4) is a 4/4 time signature.

Properties (write)

alternativeNumber (integer)

When set, the index of the current \alternative element, starting from one. Not set outside of alternatives. Note the distinction from volta number: an alternative may pertain to multiple volte.

baseMoment (moment)

Smallest unit of time that will stand on its own as a subdivided section.

currentBarNumber (integer)

Contains the current barnumber. This property is incremented at every bar line.

internalBarNumber (integer)

Contains the current barnumber. This property is used for internal timekeeping, among others by the Accidental_engraver.

measureLength (moment)

Length of one measure in the current time signature.

measurePosition (moment)

How much of the current measure have we had. This can be set manually to create incomplete measures.

measureStartNow (boolean)

True at the beginning of a measure.

timeSignatureFraction (fraction, as pair)

A pair of numbers, signifying the time signature. For example, '(4 . 4) is a 4/4 time signature.

Tweak_engraver

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

Vertical_align_engraver

Catch groups (staves, lyrics lines, etc.) and stack them vertically.

Properties (read)

alignAboveContext (string)

Where to insert newly created context in vertical alignment.

alignBelowContext (string)

Where to insert newly created context in vertical alignment.

hasAxisGroup (boolean)

True if the current context is contained in an axis group.

This engraver creates the following layout object(s): VerticalAlignment.

Volta_engraver

Make volta brackets.

Music types accepted: volta-span-event

Properties (read)

repeatCommands (list)

This property is a list of commands of the form (list 'volta x), where x is a string or #f. 'end-repeat is also accepted as a command.

stavesFound (list of grobs)

A list of all staff-symbols found.

voltaSpannerDuration (moment)

This specifies the maximum duration to use for the brackets printed for \alternative. This can be used to shrink the length of brackets in the situation where one alternative is very large.

This engraver creates the following layout object(s): VoltaBracket and VoltaBracketSpanner.


Internals Reference v2.23.4 (development-branch).