2.2.8 Bar_engraver

Create bar lines for various commands, including \\bar.

If forbidBreakBetweenBarLines is true, allow line breaks at bar lines only.

Music types accepted: ad-hoc-jump-event, caesura-event, coda-mark-event, dal-segno-event, fine-event, section-event and segno-mark-event

Properties (read)

caesuraType (list)

An alist

((bar-line . bar-type)
 (breath . breath-type)
 (scripts . script-type…)
 (underlying-bar-line . bar-type))

specifying which breath mark, bar line, and scripts to create at \caesura. All entries are optional.

bar-line has higher priority than a measure bar line and underlying-bar-line has lower priority than a measure bar line.

caesuraTypeTransform (procedure)

An engraver callback taking three arguments and returning an alist of the same kind as caesuraType.

The first argument is the context.

The second argument is the value of caesuraType with an additional entry (articulations . symbol-list) identifying the articulations attached to the caesura in the music. If the transform function returns this second argument unmodified, it is as if no transform function were set; the function is free to return a different value. The transform function can remove articulations, but any added articulations are ignored.

The third argument is a symbol-list identifying certain things the engraver has observed. bar-line indicates that the engraver has observed a BarLine at the current moment.

doubleRepeatBarType (string)

Bar line to insert where the end of one \repeat volta coincides with the start of another. The default is ‘:..:’.

doubleRepeatSegnoBarType (string)

Bar line to insert where an in-staff segno coincides with the end of one \repeat volta and the beginning of another. The default is ‘:|.S.|:’.

endRepeatBarType (string)

Bar line to insert at the end of a \repeat volta. The default is ‘:|.’.

endRepeatSegnoBarType (string)

Bar line to insert where an in-staff segno coincides with the end of a \repeat volta. The default is ‘:|.S’.

fineBarType (string)

Bar line to insert at \fine. Where there is also a repeat bar line, the repeat bar line takes precedence and this value is appended to it as an annotation. The default is ‘|.’.

fineSegnoBarType (string)

Bar line to insert where an in-staff segno coincides with \fine. The default is ‘|.S’.

fineStartRepeatSegnoBarType (string)

Bar line to insert where an in-staff segno coincides with \fine and the start of a \repeat volta. The default is ‘|.S.|:’.

forbidBreakBetweenBarLines (boolean)

If set to #t, Bar_engraver forbids line breaks where there is no bar line.

measureBarType (string)

Bar line to insert at a measure boundary.

printInitialRepeatBar (boolean)

Use a special bar line at the start of a volta repeat even at the beginning of the piece.

printTrivialVoltaRepeats (boolean)

Notate volta-style repeats even when the repeat count is 1.

repeatCommands (list)

A list of commands related to volta-style repeats. In general, each element is a list, '(command args…), but a command with no arguments may be abbreviated to a symbol; e.g., '((start-repeat)) may be given as '(start-repeat).

end-repeat return-count

End a repeated section. return-count is the number of times to go back from this point to the beginning of the section.

start-repeat repeat-count

Start a repeated section. repeat-count is the number of times to perform this section.

volta text

If text is markup, start a volta bracket with that label; if text is #f, end a volta bracket.

sectionBarType (string)

Bar line to insert at \section. Where there is also a repeat bar line, the repeat bar line takes precedence and this value is appended to it as an annotation. The default is ‘||’.

segnoBarType (string)

Bar line to insert at an in-staff segno. The default is ‘S’.

segnoStyle (symbol)

A symbol that indicates how to print a segno: bar-line or mark.

startRepeatBarType (string)

Bar line to insert at the start of a \repeat volta. The default is ‘.|:’.

startRepeatSegnoBarType (string)

Bar line to insert where an in-staff segno coincides with the start of a \repeat volta. The default is ‘S.|:’.

underlyingRepeatBarType (string)

Bar line to insert 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. Where there is also a repeat bar line, the repeat bar line takes precedence and this value is appended to it as an annotation. The default is ‘||’.

whichBar (string)

The current bar line type, or '() if there is no bar line. Setting this explicitly in user code is deprecated. Use \bar or related commands to set it.

Properties (write)

currentBarLine (graphical (layout) object)

Set to the BarLine that Bar_engraver has created in the current timestep.

forbidBreak (boolean)

If set to #t, prevent a line break at this point, except if explicitly requested by the user.

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

Bar_engraver is part of the following context(s) in \layout: ChordGrid, DrumStaff, Dynamics, GregorianTranscriptionStaff, InternalGregorianStaff, InternalMensuralStaff, KievanStaff, MensuralStaff, PetrucciStaff, RhythmicStaff, Staff, StandaloneRhythmStaff, TabStaff and VaticanaStaff.


LilyPond Internals Reference v2.25.21 (development-branch).