lilypond-user
[Top][All Lists]
Advanced

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

Re: Change staff and cross staff


From: Lukas-Fabian Moser
Subject: Re: Change staff and cross staff
Date: Sun, 8 Nov 2020 00:18:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Knute,

Am 07.11.20 um 20:02 schrieb Knute Snortum:
Here's a better MWE with my try using voices in the left hand:

%%% Start
\version "2.20.0"
\language "english"

staffUp   = \change Staff = "upper"
staffDown = \change Staff = "lower"

rh = \relative c' {
   s8. \crossStaff e16
}

lh = \relative c' {
   \clef bass
   << { <gs b>8[ r16 b] } \\ { e,,4 } >>
}

\score {
   \new PianoStaff <<
     \new Staff = "upper" { \rh }
     \new Staff = "lower" { \lh }
   >>
   \layout {
     \context {
       \PianoStaff
       \consists #Span_stem_engraver
     }
   }
}
%%% End

My take, of course not so terribly different from Damian's solution:

\version "2.21.1"

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

rhmusic = {
  \time 3/4
  \key e \major
  <<
    {
      \change Staff = "lower"
      \voiceOne
      b8[ r16
      % Uncomment for alternative solution:
      % <b gis>8[ r16
      \change Staff = "upper"
      \crossStaff e'16]
    }
    \new Voice
    {
      \change Staff = "lower"
      % Uncomment for alternative solution:
      % \once\omit Stem
      \voiceOne gis4*3/4_( \crossStaff b16)
    }
  >>
  <e' gis'>4 <gis' b'>->
}

lhmusic = {
  \key e \major
  \clef "bass"
  \once \voiceTwo e,4 <e b>4 q->
}

\new PianoStaff
<<
  \new Staff = "upper" { \rhmusic }
  \new Staff = "lower"{ \lhmusic }
>>

I admit it's a bit longer, but I'd prefer to keep the magic inside the \rhmusic variable.

The alternative solution might be cleaner: It's a matter of either
- faking an actual chord by letting a crotchet's stem melt into a quaver's stem, or
- (alternative solution) doubling a notehead.

Lukas




reply via email to

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