[ << Specialist notation ] | [Top][Contents][Index] | [ General input and output >> ] |
[ < Changing staff automatically ] | [ Up : Common notation for keyboards ] | [ Piano > ] |
Staff-change lines
Whenever a voice switches to another staff, a line connecting the notes can be printed automatically:
\new PianoStaff << \new Staff = "one" { \showStaffSwitch c'1 \change Staff = "two" b2 a } \new Staff = "two" { \clef bass s1*2 } >>
A staff-change line between chords connects the chords’ “last notes” as written in the source file; this can be used to quickly adjust the line’s vertical start and end positions.
\new PianoStaff << \new Staff = "one" { <c' e' g'>1 \showStaffSwitch \change Staff = "two" <a c' f>1 \hideStaffSwitch \change Staff = "one" <e' g' c'>1 \showStaffSwitch \change Staff = "two" <f a c'>1 } \new Staff = "two" { \clef bass s1*4 } >>
Predefined commands
\showStaffSwitch
,
\hideStaffSwitch
.
See also
Snippets: Keyboards.
Internals Reference: Note_head_line_engraver, VoiceFollower.
Selected Snippets
Cross staff stems
This snippet shows the use of the Span_stem_engraver
and
\crossStaff
to connect stems across staves automatically.
The stem length need not be specified, as the variable distance between noteheads and staves is calculated automatically.
\layout { \context { \PianoStaff \consists "Span_stem_engraver" } } { \new PianoStaff << \new Staff { <b d'>4 r d'16\> e'8. g8 r\! e'8 f' g'4 e'2 } \new Staff { \clef bass \voiceOne \autoBeamOff \crossStaff { <e g>4 e, g16 a8. c8} d \autoBeamOn g8 f g4 c2 } >> }
Indicating cross-staff chords with arpeggio bracket
An arpeggio bracket can indicate that notes on two different staves are
to be played with the same hand. In order to do this, the
PianoStaff
must be set to accept cross-staff arpeggios and the
arpeggios must be set to the bracket shape in the PianoStaff
context.
(Debussy, Les collines d’Anacapri, m. 65)
\new PianoStaff << \set PianoStaff.connectArpeggios = ##t \override PianoStaff.Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket \new Staff { \relative c' { \key b \major \time 6/8 b8-.(\arpeggio fis'-.\> cis-. e-. gis-. b-.)\!\fermata^\laissezVibrer \bar "||" } } \new Staff { \relative c' { \clef bass \key b \major << { <a e cis>2.\arpeggio } \\ { <a, e a,>2. } >> } } >>
See also
Snippets: Keyboards.
Internals Reference: Stem.
[ << Specialist notation ] | [Top][Contents][Index] | [ General input and output >> ] |
[ < Changing staff automatically ] | [ Up : Common notation for keyboards ] | [ Piano > ] |