lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross staff bug?


From: Thomas Morley
Subject: Re: cross staff bug?
Date: Thu, 30 May 2013 14:45:01 +0200

2013/5/30 Thomas Morley <address@hidden>:

> Refering to my own edition of Beethoven's Sonatas the code below seems
> to print what you want.
>
> \version "2.17.19"
> \language "english"
>
> piano_notes_upper = \relative d' {
>    <d fs d'>4 r r r8 d8   | % 16
>    r8 cs r b r a r cs   | % 17
> }
>
> piano_notes_lower = \relative d, {
>   \clef bass
>   <<
>   {
>     \voiceOne
>     %\autoBeamOff
>     s2. s8 \crossStaff { d'
>     s cs s \parenthesize b s \parenthesize a s cs }
>     %\autoBeamOn
>   }
>   {
>     <d, d'>4 r r d-.   | % 16
>     cs4-. b-. a-. cs-.   | % 17
>   }
>   >>
> }
>
> \layout {
>   \context {
>     \PianoStaff
>     \consists #Span_stem_engraver
>   }
> }
>
> \score {
>   \new PianoStaff <<
>     \new Staff << \key d \major \piano_notes_upper >>
>     \new Staff << \key d \major \piano_notes_lower >>
>   >>
> }

Scaling durations will avoid a second voice:

\version "2.17.19"
\language "english"

piano_notes_upper = \relative d' {
   <d fs d'>4 r r r8 d8   | % 16
   r8 cs r b r a r cs   | % 17
}

piano_notes_lower = \relative d, {
  \clef bass
   <d d'>4 r r \crossStaff { d4*1/2-. \once\stemUp d'8 |
   cs,4*1/2-. cs'8 b,4*1/2-. \parenthesize b'8
   a,4*1/2-. \parenthesize a'8 cs,4*1/2-. cs'8 }
}

\layout {
  \context {
    \PianoStaff
    \consists #Span_stem_engraver
  }
}

\score {
  \new PianoStaff <<
    \new Staff << \key d \major \piano_notes_upper >>
    \new Staff << \key d \major \piano_notes_lower >>
  >>
}

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]