lilypond-user
[Top][All Lists]
Advanced

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

Re: shared notes across piano staff


From: Knute Snortum
Subject: Re: shared notes across piano staff
Date: Wed, 11 Sep 2024 10:45:08 -0700



--
Knute Snortum



On Wed, Sep 11, 2024 at 9:40 AM Robert Garrigos <robert@garrigos.cat> wrote:
Hi,

I have this piano excerpt I’m trying to reproduce:

Cursor_and_CP_Schum_47_pdf.jpeg
and I have this code:

\score {
<<
\new PianoStaff
<<
\new Staff \relative c' {
\key g \minor
\time 3/4
|
{ ef4^( c d~ | d8 c bf!4 a) }

}
\new Staff \relative c' {
\key g \minor
\time 3/4
\clef bass

| <<
{ \omit TupletBracket \omit TupletNumber \tuplet 3/2 4 { r8 ef, a c, ef a d, af' b | r8 c, g' bf d, g a d, fs} }
\\
{ }
\\
{ }
>>
}
>>
>>
}

which gives me:

exemple_ly_—_Lilypond.jpg
how can I have the bf and the a in the second measure shared across the staves??

A combination of \change Staff and \stemUp \stemDown will do the trick:

%%%
\version "2.24.4"
\language "english"

up = {
  \change Staff = "upper"
  \stemDown
}

down = {
  \change Staff = "lower"
  \stemUp
}

\score {
  <<
    \new PianoStaff
    <<
      \new Staff = "upper" \relative c' {
        \key g \minor
        \time 3/4
        |
          {  ef4^( c d~ | d8 c bf!4 a) }

      }
      \new Staff = "lower" \relative c' {
        \key g \minor
        \time 3/4
        \clef bass

        | <<
          {
            \omit TupletBracket
            \omit TupletNumber
            \tuplet 3/2 4 {
              r8 ef, a c, ef a d, af' b |
              r8 c, g' \up bf \down d, g \up a \down d, fs
            }
          }
          \\
          {  }
          \\
          {  }
        >>
      }
    >>
  >>
}
%%%

reply via email to

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