[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 13:53:45 +0200 |
2013/5/30 Kieren MacMillan <address@hidden>:
> Hi all,
>
> Can anyone explain why this snippet (from Beethoven Op. 10 No. 3) is failing
> in two different ways?
>
> \version "2.17.19"
> \language "english"
>
> piano_notes_upper = \relative d' {
> <d fs d'>4 r r \crossStaff { r8 <d d,>8 } | % 16
> \crossStaff { r8 <cs cs,> r <b \parenthesize b,> r <a \parenthesize a,> r
> <cs cs,> } | % 17
> }
>
> piano_notes_lower = \relative d, {
> \clef bass
> <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 >>
> >>
> }
>
> 1. It's not cross-staffing; and,
> 2. The eighth-note flags are not appearing.
I can't explain the details, I've not the needed knowledge.
Though, one point is that \crossStaff dosn't _initiate_ something like
\changeStaff.
You need to write the notes into the Staffs where you want them to be.
\crossStaff will then connect their stems.
(I didn't test, whether \crossStaff will work with \changeStaff. I doubt)
In most cases you'll need to add \autoBeamOff, as Eluze mentioned before.
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 >>
>>
}
HTH,
Harm
Re: cross staff bug?, luis jure, 2013/05/30