[ << Simultaneous notes ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Suppressing warnings for clashing note columns ] | [ Up : Top ] | [ > ] |
Staff notation
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Staff notation ] | [ Up : Staff notation ] | [ Adding an extra staff at a line break > ] |
Adding ambitus per voice
Ambitus can be added per voice. In this case, the ambitus must be moved manually to prevent collisions.
\new Staff << \new Voice \with { \consists "Ambitus_engraver" } \relative c'' { \override Ambitus #'X-offset = #2.0 \voiceOne c4 a d e f1 } \new Voice \with { \consists "Ambitus_engraver" } \relative c' { \voiceTwo es4 f g as b1 } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Adding an extra staff > ] |
Adding an extra staff at a line break
When adding a new staff at a line break, some extra space is
unfortunately added at the end of the line before the break (to fit in
a key signature change, which will never be printed anyway). The
workaround is to add a setting of
Staff.explicitKeySignatureVisibility
as is shown in the example.
\score { \new StaffGroup \relative c'' { \new Staff \key f \major c1 c^"Unwanted extra space" \break << { c1 | c } \new Staff { \key f \major \once \override Staff.TimeSignature #'stencil = ##f c1 | c } >> c1 | c^"Fixed here" \break << { c1 | c } \new Staff { \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible \key f \major \once \override Staff.TimeSignature #'stencil = ##f c1 | c } >> } }
Adding an extra staff
An extra staff can be added (possibly temporarily) after the start of a piece.
\score { << \new Staff \relative c'' { c1 | c | c | c | c } \new StaffGroup \relative c'' { \new Staff { c1 | c << c1 \new Staff { \once \override Staff.TimeSignature #'stencil = ##f c1 } >> c1 } } >> }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Adding an extra staff ] | [ Up : Staff notation ] | [ Changing the number of lines in a staff > ] |
Adding indicators to staves which get split after a break
This snippet defines the \splitStaffBarLine
command, which adds
arrows in north-east and south-east directions at a bar line, to denote
that several voices sharing a staff will each continue on a staff of
their own in the next system.
#(define-markup-command (arrow-at-angle layout props angle-deg length fill) (number? number? boolean?) (let* ( ;; PI-OVER-180 and degrees->radians are taken from flag-styles.scm (PI-OVER-180 (/ (atan 1 1) 45)) (degrees->radians (lambda (degrees) (* degrees PI-OVER-180))) (angle-rad (degrees->radians angle-deg)) (target-x (* length (cos angle-rad))) (target-y (* length (sin angle-rad)))) (interpret-markup layout props (markup #:translate (cons (/ target-x 2) (/ target-y 2)) #:rotate angle-deg #:translate (cons (/ length -2) 0) #:concat (#:draw-line (cons length 0) #:arrow-head X RIGHT fill))))) splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \combine \arrow-at-angle #45 #(sqrt 8) ##f \arrow-at-angle #-45 #(sqrt 8) ##f } splitStaffBarLine = { \once \override Staff.BarLine #'stencil = #(lambda (grob) (ly:stencil-combine-at-edge (ly:bar-line::print grob) X RIGHT (grob-interpret-markup grob splitStaffBarLineMarkup) 0 0)) \break } \paper { ragged-right = ##t short-indent = 5\mm } \score { << \new ChoirStaff << \new Staff \with { instrumentName = #"High I + II" } { << \repeat unfold 4 f''1 \\ \repeat unfold 4 d''1 >> \splitStaffBarLine } \new Staff \with { instrumentName = #"Low" } { << \repeat unfold 4 b'1 \\ \repeat unfold 4 g'1 >> } \new Staff \with { shortInstrumentName = #"H I" } { R1*4 \repeat unfold 2 { r4 f''2 r4 } \repeat unfold 2 e''1 } \new Staff \with { shortInstrumentName = #"H II" } { R1*4 \repeat unfold 4 b'2 \repeat unfold 2 c''1 } \new Staff \with { shortInstrumentName = #"L" } { R1*4 << \repeat unfold 4 g'1 \\ \repeat unfold 4 c'1 >> } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup #'remove-first = ##t } } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Adding indicators to staves which get split after a break ] | [ Up : Staff notation ] | [ Changing the staff size > ] |
Changing the number of lines in a staff
The number of lines in a staff may changed by overriding the
StaffSymbol
property line-count
.
upper = \relative c'' { c4 d e f } lower = \relative c { \clef bass c4 b a g } \score { \context PianoStaff << \new Staff { \upper } \new Staff { \override Staff.StaffSymbol #'line-count = #4 \lower } >> }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Changing the number of lines in a staff ] | [ Up : Staff notation ] | [ Changing the tempo without a metronome mark > ] |
Changing the staff size
Though the simplest way to resize staves is to use
#(set-global-staff-size xx)
, an individual staff’s size can be
changed by scaling the properties 'staff-space
and
fontSize
.
<< \new Staff { \relative c'' { \dynamicDown c8\ff c c c c c c c } } \new Staff \with { fontSize = #-3 \override StaffSymbol #'staff-space = #(magstep -3) } { \clef bass c8 c c c c\f c c c } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Changing the staff size ] | [ Up : Staff notation ] | [ Creating blank staves > ] |
Changing the tempo without a metronome mark
To change the tempo in MIDI output without printing anything, make the metronome mark invisible.
\score { \new Staff \relative c' { \tempo 4 = 160 c4 e g b c4 b d c \set Score.tempoHideNote = ##t \tempo 4 = 96 d,4 fis a cis d4 cis e d } \layout { } \midi { } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Changing the tempo without a metronome mark ] | [ Up : Staff notation ] | [ Creating metronome marks in markup mode > ] |
Creating blank staves
To create blank staves, generate empty measures then remove the
Bar_number_engraver
from the Score
context, and the
Time_signature_engraver
, Clef_engraver
and
Bar_engraver
from the Staff
context.
#(set-global-staff-size 20) \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0\in \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Creating blank staves ] | [ Up : Staff notation ] | [ Display bracket with only one staff in a system > ] |
Creating metronome marks in markup mode
New metronome marks can be created in markup mode, but they will not change the tempo in MIDI output.
\relative c' { \tempo \markup { \concat { ( \smaller \general-align #Y #DOWN \note #"16." #1 " = " \smaller \general-align #Y #DOWN \note #"8" #1 ) } } c1 c4 c' c,2 }
Display bracket with only one staff in a system
If there is only one staff in one of the staff types ChoirStaff
or StaffGroup
, the bracket and the starting bar line will not be
displayed as standard behavior. This can be changed by overriding the
relevant properties.
Note that in contexts such as PianoStaff
and GrandStaff
where the systems begin with a brace instead of a bracket, another
property has to be set, as shown on the second system in the example.
\markup \left-column { \score { \new StaffGroup << % Must be lower than the actual number of staff lines \override StaffGroup.SystemStartBracket #'collapse-height = #1 \override Score.SystemStartBar #'collapse-height = #1 \new Staff { c'1 } >> \layout { } } \null \score { \new PianoStaff << \override PianoStaff.SystemStartBrace #'collapse-height = #1 \override Score.SystemStartBar #'collapse-height = #1 \new Staff { c'1 } >> \layout { } } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Display bracket with only one staff in a system ] | [ Up : Staff notation ] | [ Incipit > ] |
Forcing measure width to adapt to MetronomeMark’s width
By default, metronome marks do not influence horizontal spacing. This has one downside: when using compressed rests, some metronome marks may be too close and therefore are printed vertically stacked, as demonstrated in the first part of this example. This can be solved through a simple override, as shown in the second half of the example.
example = { \tempo "Allegro" R1*6 \tempo "Rall." R1*2 \tempo "A tempo" R1*8 } { \compressFullBarRests \example R1 R1 \override Score.MetronomeMark #'extra-spacing-width = #'(0 . 0) \example }
Incipit
Incipits can be added using the instrument name grob, but keeping separate the instrument name definition and the incipit definition.
incipit = #(define-music-function (parser location incipit-music) (ly:music?) #{ \once \override Staff.InstrumentName #'self-alignment-X = #RIGHT \once \override Staff.InstrumentName #'self-alignment-Y = #UP \once \override Staff.InstrumentName #'Y-offset = #(lambda (grob) (+ 4 (system-start-text::calc-y-offset grob))) \once \override Staff.InstrumentName #'padding = #0.3 \once \override Staff.InstrumentName #'stencil = #(lambda (grob) (let* ((instrument-name (ly:grob-property grob 'long-text)) (layout (ly:output-def-clone (ly:grob-layout grob))) (music (make-sequential-music (list (context-spec-music (make-sequential-music (list (make-property-set 'instrumentName instrument-name) (make-grob-property-set 'VerticalAxisGroup 'Y-extent '(-4 . 4)))) 'MensuralStaff) $incipit-music))) (score (ly:make-score music)) (mm (ly:output-def-lookup layout 'mm)) (indent (ly:output-def-lookup layout 'indent)) (width (ly:output-def-lookup layout 'incipit-width)) (incipit-width (if (number? width) (* width mm) (* indent 0.5)))) (ly:output-def-set-variable! layout 'indent (- indent incipit-width)) (ly:output-def-set-variable! layout 'line-width indent) (ly:output-def-set-variable! layout 'ragged-right #f) (ly:output-def-set-variable! layout 'ragged-last #f) (ly:output-def-set-variable! layout 'system-count 1) (ly:score-add-output-def! score layout) (ly:grob-set-property! grob 'long-text (markup #:score score)) (system-start-text::print grob))) #}) %%%%%%%%%%%%%%%%%%%%%%%%% global = { \set Score.skipBars = ##t \key g \major \time 4/4 % the actual music \skip 1*8 % let finis bar go through all staves \override Staff.BarLine #'transparent = ##f % finis bar \bar "|." } discantusIncipit = << \new MensuralVoice = "discantusIncipit" << \repeat unfold 9 { s1 \noBreak } { \clef "neomensural-c1" \key f \major \time 2/2 c''1. } >> \new Lyrics \lyricsto discantusIncipit { IV- } >> discantusNotes = { \transpose c' c'' { \clef "treble" d'2. d'4 | b e' d'2 | c'4 e'4.( d'8 c' b | a4) b a2 | b4.( c'8 d'4) c'4 | \once \override NoteHead #'transparent = ##t c'1 | b\breve | } } discantusLyrics = \lyricmode { Ju -- bi -- | la -- te De -- | o, om -- nis ter -- | ra, __ om- | "..." | -us. | } altusIncipit = << \new MensuralVoice = "altusIncipit" << \repeat unfold 9 { s1 \noBreak } { \clef "neomensural-c3" \key f \major \time 2/2 r1 f'1. } >> \new Lyrics \lyricsto altusIncipit { IV- } >> altusNotes = { \transpose c' c'' { \clef "treble" % two measures r2 g2. e4 fis g | a2 g4 e | fis g4.( fis16 e fis4) | g1 | \once \override NoteHead #'transparent = ##t g1 | g\breve | } } altusLyrics = \lyricmode { % two measures Ju -- bi -- la -- te | De -- o, om -- | nis ter -- ra, | "..." | -us. | } tenorIncipit = << \new MensuralVoice = "tenorIncipit" << \repeat unfold 9 { s1 \noBreak } { \clef "neomensural-c4" \key f \major \time 2/2 r\longa r\breve r1 c'1. } >> \new Lyrics \lyricsto tenorIncipit { IV- } >> tenorNotes = { \transpose c' c' { \clef "treble_8" R1 | R1 | R1 | % two measures r2 d'2. d'4 b e' | \once \override NoteHead #'transparent = ##t e'1 | d'\breve | } } tenorLyrics = \lyricmode { % two measures Ju -- bi -- la -- te | "..." | -us. } bassusIncipit = << \new MensuralVoice = "bassusIncipit" << \repeat unfold 9 { s1 \noBreak } { \clef "bass" \key f \major \time 2/2 %% incipit r\maxima f1. } >> \new Lyrics \lyricsto bassusIncipit { IV- } >> bassusNotes = { \transpose c' c' { \clef "bass" R1 | R1 | R1 | R1 | g2. e4 | \once \override NoteHead #'transparent = ##t e1 | g\breve | } } bassusLyrics = \lyricmode { Ju -- bi- | "..." | -us. } \score { << \new StaffGroup = choirStaff << \new Voice = "discantusNotes" << \global \set Staff.instrumentName = #"Discantus" \incipit \discantusIncipit \discantusNotes >> \new Lyrics = "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics } \new Voice = "altusNotes" << \global \set Staff.instrumentName = #"Altus" \incipit \altusIncipit \altusNotes >> \new Lyrics = "altusLyrics" \lyricsto altusNotes { \altusLyrics } \new Voice = "tenorNotes" << \global \set Staff.instrumentName = #"Tenor" \incipit \tenorIncipit \tenorNotes >> \new Lyrics = "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics } \new Voice = "bassusNotes" << \global \set Staff.instrumentName = #"Bassus" \incipit \bassusIncipit \bassusNotes >> \new Lyrics = "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics } >> >> \layout { \context { \Score %% no bar lines in staves or lyrics \override BarLine #'transparent = ##t } %% the next two instructions keep the lyrics between the bar lines \context { \Lyrics \consists "Bar_engraver" \consists "Separating_line_group_engraver" } \context { \Voice %% no slurs \override Slur #'transparent = ##t %% Comment in the below "\remove" command to allow line %% breaking also at those bar lines where a note overlaps %% into the next measure. The command is commented out in this %% short example score, but especially for large scores, you %% will typically yield better line breaking and thus improve %% overall spacing if you comment in the following command. %%\remove "Forbid_line_break_engraver" } indent = 6\cm incipit-width = 4\cm } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Incipit ] | [ Up : Staff notation ] | [ Letter tablature formatting > ] |
Inserting score fragments above a staff as markups
The \markup
command is quite versatile. In this snippet, it
contains a \score
block instead of texts or marks.
tuning = \markup { \score { \new Staff \with { \remove "Time_signature_engraver" } { \clef bass <c, g, d g>1 } \layout { ragged-right = ##t } } } \header { title = "Solo Cello Suites" subtitle = "Suite IV" subsubtitle = \markup { Originalstimmung: \general-align #Y #CENTER \tuning } } \layout { ragged-right = ##f } \relative c'' { \time 4/8 \times 2/3 { c8 d e } \times 2/3 { c d e } \times 2/3 { c8 d e } \times 2/3 { c d e } g8 a g a g8 a g a }
Letter tablature formatting
Tablature can be formatted using letters instead of numbers.
music = \relative c { c4 d e f g4 a b c d4 e f g } << \new Staff { \clef "G_8" \music } \new TabStaff \with { tablatureFormat = #fret-letter-tablature-format } { \music } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Letter tablature formatting ] | [ Up : Staff notation ] | [ > ] |
Making some staff lines thicker than the others
For pedagogical purposes, a staff line can be thickened (e.g., the
middle line, or to emphasize the line of the G clef). This can be
achieved by adding extra lines very close to the line that should be
emphasized, using the line-positions
property of the
StaffSymbol
object.
{ \override Staff.StaffSymbol #'line-positions = #'(-4 -2 -0.2 0 0.2 2 4) d'4 e' f' g' }
Measure counter
This snippet provides a workaround for emitting measure counters using transparent percent repeats.
<< \context Voice = "foo" { \clef bass c4 r g r c4 r g r c4 r g r c4 r g r } \context Voice = "foo" { \set countPercentRepeats = ##t \override PercentRepeat #'transparent = ##t \override PercentRepeatCounter #'staff-padding = #1 \repeat percent 4 { s1 } } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Modern TAB text clef > ] |
Mensurstriche layout (bar lines between the staves)
The mensurstriche-layout where the bar lines do not show on the staves
but between staves can be achieved with a StaffGroup
instead of
a ChoirStaff
. The bar line on staves is blanked out by setting
the transparent
property.
global = { \override Staff.BarLine #'transparent = ##t s1 s % the final bar line is not interrupted \revert Staff.BarLine #'transparent \bar "|." } \new StaffGroup \relative c'' { << \new Staff { << \global { c1 c } >> } \new Staff { << \global { c c } >> } >> }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Mensurstriche layout (bar lines between the staves) ] | [ Up : Staff notation ] | [ Nesting staves > ] |
Modern TAB text clef
Use a markup text to replace the (TAB) clef glyph with a modern font.
\markup { This snippet is deprecated as of version 2.13.4 and will be removed in version 2.14. }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Modern TAB text clef ] | [ Up : Staff notation ] | [ > ] |
Nesting staves
The property systemStartDelimiterHierarchy
can be used to make
more complex nested staff groups. The command \set
StaffGroup.systemStartDelimiterHierarchy
takes an alphabetical list of
the number of staves produced. Before each staff a system start
delimiter can be given. It has to be enclosed in brackets and takes as
much staves as the brackets enclose. Elements in the list can be
omitted, but the first bracket takes always the complete number of
staves. The possibilities are SystemStartBar
,
SystemStartBracket
, SystemStartBrace
, and
SystemStartSquare
.
\new StaffGroup \relative c'' << \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartSquare (SystemStartBrace (SystemStartBracket a (SystemStartSquare b) ) c ) d) \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } \new Staff { c1 } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Nesting staves ] | [ Up : Staff notation ] | [ > ] |
Non-traditional key signatures
The commonly used \key
command sets the keySignature
property, in the Staff
context.
To create non-standard key signatures, set this property directly. The format of this command is a list:
\set Staff.keySignature = #`(((octave . step) . alter) ((octave
. step) . alter) ...)
where, for each element in the list,
octave
specifies the octave (0 being the octave from
middle C to the B above), step
specifies the note within the
octave (0 means C and 6 means B), and alter
is
,SHARP ,FLAT ,DOUBLE-SHARP
etc. (Note the leading comma.)
Alternatively, for each item in the list, using the more concise format
(step . alter)
specifies that the same alteration should hold in all
octaves.
Here is an example of a possible key signature for generating a whole-tone scale:
\relative c' { \set Staff.keySignature = #`(((0 . 6) . ,FLAT) ((0 . 5) . ,FLAT) ((0 . 3) . ,SHARP)) c4 d e fis aes4 bes c2 }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ > ] |
Printing metronome and rehearsal marks below the staff
By default, metronome and rehearsal marks are printed above the staff.
To place them below the staff simply set the direction
property
of MetronomeMark
or RehearsalMark
appropriately.
\layout { ragged-right = ##f } { % Metronome marks below the staff \override Score.MetronomeMark #'direction = #DOWN \tempo 8. = 120 c''1 % Rehearsal marks below the staff \override Score.RehearsalMark #'direction = #DOWN \mark \default c''1 }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Quoting another voice > ] |
Quoting another voice with transposition
Quotations take into account the transposition of both source and
target. In this example, all instruments play sounding middle C; the
target is an instrument in F. The target part may be transposed using
\transpose
. In this case, all the pitches (including the
quoted ones) are transposed.
\addQuote clarinet { \transposition bes \repeat unfold 8 { d'16 d' d'8 } } \addQuote sax { \transposition es' \repeat unfold 16 { a8 } } quoteTest = { % french horn \transposition f g'4 << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >> << \quoteDuring #"sax" { \skip 4 } s4^"sax." >> g'4 } { \set Staff.instrumentName = \markup { \center-column { Horn \line { in F } } } \quoteTest \transpose c' d' << \quoteTest s4_"up a tone" >> }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Removing the first empty line > ] |
Quoting another voice
The quotedEventTypes
property determines the music event types
which should be quoted. The default value is (note-event
rest-event tie-event beam-event tuplet-span-event)
, which means that
only the notes, rests, ties, beams and tuplets of the quoted voice will
appear in the \quoteDuring
expression. In the following
example, a 16th rest is not quoted since rest-event
is not in
quotedEventTypes
.
For a list of event types, consult the “Music classes” section of the Internals Reference.
quoteMe = \relative c' { fis4 r16 a8.-> b4\ff c } \addQuote quoteMe \quoteMe original = \relative c'' { c8 d s2 \once \override NoteColumn #'ignore-collision = ##t es8 gis8 } << \new Staff { \set Staff.instrumentName = #"quoteMe" \quoteMe } \new Staff { \set Staff.instrumentName = #"orig" \original } \new Staff \relative c'' << \set Staff.instrumentName = #"orig+quote" \set Staff.quotedEventTypes = #'(note-event articulation-event) \original \new Voice { s4 \set fontSize = #-4 \override Stem #'length-fraction = #(magstep -4) \quoteDuring #"quoteMe" { \skip 2. } } >> >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Quoting another voice ] | [ Up : Staff notation ] | [ Tick bar lines > ] |
Removing the first empty line
The first empty staff can also be removed from the score by setting the
VerticalAxisGroup
property remove-first
. This can be done
globally inside the \layout
block, or locally inside the
specific staff that should be removed. In the latter case, you have to
specify the context (Staff
applies only to the current staff) in
front of the property.
The lower staff of the second staff group is not removed, because the setting applies only to the specific staff inside of which it is written.
\layout { \context { \Staff \RemoveEmptyStaves % To use the setting globally, uncomment the following line: % \override VerticalAxisGroup #'remove-first = ##t } } \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { % To use the setting globally, comment this line, % uncomment the line in the \layout block above \override Staff.VerticalAxisGroup #'remove-first = ##t R1 \break R } >> \new StaffGroup << \new Staff \relative c' { e4 f g a \break c1 } \new Staff { R1 \break R } >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Removing the first empty line ] | [ Up : Staff notation ] | [ Time signature in parentheses > ] |
Tick bar lines
’Tick’ bar lines are often used in music where the bar line is used only for coordination and is not meant to imply any rhythmic stress.
\relative c' { \set Score.defaultBarType = #"'" c4 d e f g4 f e d c4 d e f g4 f e d \bar "|." }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Tick bar lines ] | [ Up : Staff notation ] | [ > ] |
Time signature in parentheses
The time signature can be enclosed within parentheses.
\relative c'' { \override Staff.TimeSignature #'stencil = #(lambda (grob) (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1)) \time 2/4 a4 b8 c }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Time signature in parentheses ] | [ Up : Staff notation ] | [ Use square bracket at the start of a staff group > ] |
Tweaking clef properties
The command \clef "treble_8"
is equivalent to setting
clefGlyph
, clefPosition
(which controls the vertical
position of the clef), middleCPosition
and
clefOctavation
. A clef is printed when any of the properties
except middleCPosition
are changed.
Note that changing the glyph, the position of the clef, or the
octavation does not in itself change the position of subsequent notes
on the staff: the position of middle C must also be specified to do
this. The positional parameters are relative to the staff center line,
positive numbers displacing upwards, counting one for each line and
space. The clefOctavation
value would normally be set to 7, -7,
15 or -15, but other values are valid.
When a clef change takes place at a line break the new clef symbol is
printed at both the end of the previous line and the beginning of the
new line by default. If the warning clef at the end of the previous
line is not required it can be suppressed by setting the Staff
property explicitClefVisibility
to the value
end-of-line-invisible
. The default behavior can be recovered
with \unset Staff.explicitClefVisibility
.
The following examples show the possibilities when setting these properties manually. On the first line, the manual changes preserve the standard relative positioning of clefs and notes, whereas on the second line, they do not.
\layout { ragged-right = ##t } { % The default treble clef c'1 % The standard bass clef \set Staff.clefGlyph = #"clefs.F" \set Staff.clefPosition = #2 \set Staff.middleCPosition = #6 c'1 % The baritone clef \set Staff.clefGlyph = #"clefs.C" \set Staff.clefPosition = #4 \set Staff.middleCPosition = #4 c'1 % The standard choral tenor clef \set Staff.clefGlyph = #"clefs.G" \set Staff.clefPosition = #-2 \set Staff.clefOctavation = #-7 \set Staff.middleCPosition = #1 c'1 % A non-standard clef \set Staff.clefPosition = #0 \set Staff.clefOctavation = #0 \set Staff.middleCPosition = #-4 c'1 \break % The following clef changes do not preserve % the normal relationship between notes and clefs: \set Staff.clefGlyph = #"clefs.F" \set Staff.clefPosition = #2 c'1 \set Staff.clefGlyph = #"clefs.G" c'1 \set Staff.clefGlyph = #"clefs.C" c'1 \set Staff.clefOctavation = #7 c'1 \set Staff.clefOctavation = #0 \set Staff.clefPosition = #0 c'1 % Return to the normal clef: \set Staff.middleCPosition = #0 c'1 }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ > ] |
Use square bracket at the start of a staff group
The system start delimiter SystemStartSquare
can be used by
setting it explicitly in a StaffGroup
or ChoirStaffGroup
context.
\score { \new StaffGroup { << \set StaffGroup.systemStartDelimiter = #'SystemStartSquare \new Staff { c'4 d' e' f' } \new Staff { c'4 d' e' f' } >> } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < Use square bracket at the start of a staff group ] | [ Up : Staff notation ] | [ > ] |
Volta below chords
By adding the Volta_engraver
to the relevant staff, volte can be
put under chords.
\score { << \chords { c1 c1 } \new Staff \with { \consists "Volta_engraver" } { \repeat volta 2 { c'1 } \alternative { c' } } >> \layout { \context { \Score \remove "Volta_engraver" } } }
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Editorial annotations > ] |
Volta multi staff
By adding the Volta_engraver
to the relevant staff, volte can be
put over staves other than the topmost one in a score.
voltaMusic = \relative c'' { \repeat volta 2 { c1 } \alternative { d1 e1 } } << \new StaffGroup << \new Staff \voltaMusic \new Staff \voltaMusic >> \new StaffGroup << \new Staff \with { \consists "Volta_engraver" } \voltaMusic \new Staff \voltaMusic >> >>
[ << Staff notation ] | [Top][Contents][Index][ ? ] | [ Editorial annotations >> ] | ||
[ < ] | [ Up : Staff notation ] | [ Editorial annotations > ] |