lilypond-user
[Top][All Lists]
Advanced

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

Re: Staff change in a chord


From: Alexander Kobel
Subject: Re: Staff change in a chord
Date: Thu, 23 Jul 2009 20:21:11 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Oscar van Eijk wrote:
I've attached an snippet that shows a bit what I need (it's the same bar twice); the triplets in the left hand are connected to a chord, but the highest notes are played by the right hand. Adding a staff change in the triplets is no problem (see the second bar), but that won't work in a chord: [...]
Is there any way to achieve this? [...]

Hi, Oscar,

I don't think this is possible inside the chord; however, there is a way using an additional voice on the upper staff. Which is semantically ugly as hell, but well... ;-)

I attach my solution; note that you probably have to manually adjust the tuplet number positions for kneed beams and set the ignore-collisions property for noise-free compilation, or use (not my preferred look) the stemUp-variant for the last note of the tuplets. For more information, look at http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Common-notation-for-keyboards#Cross_002dstaff-stems and http://lilypond.org/doc/v2.12/input/lsr/lilypond-snippets/Simultaneous-notes.html#Simultaneous-notes where I borrowed some tweaks.


Cheers,
Alexander
\version "2.12.1"

crossStaff = {
  \once \override Voice . Stem #'cross-staff = ##t
  \once \override Voice . Stem #'length = #18
}
ignoreCollision = \once \override NoteColumn #'ignore-collision = ##t

\score {
  \new PianoStaff <<
    \new Staff = "up" {
      \clef treble
      <<
        \new Voice {
          \voiceOne
          s4 fis'8 e'16 d' s4 a'8 g'16 fis'
          s4 fis'8 e'16 d' s4 a'8 g'16 fis'
          \bar "||"
        }
        \new Voice {
          \voiceTwo
          s1 |
          s4*2/3 \hideNotes a8*2/3~ \unHideNotes \crossStaff a4
          s4*2/3 \hideNotes \ignoreCollision d'8*2/3~ \unHideNotes \crossStaff 
d'4
        }
      >>
    }
    \new Staff = "down" {
      \clef bass
      \set tieWaitForNote = ##t

      \times 2/3 { cis,8~ d~ a~ }
      <cis, d a>4

      \stemUp \times 2/3 { d,8~ fis~ d'~ } \stemNeutral
      <d, fis d'>4
      
      \stemUp
      \times 2/3 { cis,8~ d~ \change Staff=up a }
      \change Staff=down \stemDown <cis, d \tweak #'transparent ##t a>4 
\stemNeutral

      \once \override Voice . TupletNumber #'Y-offset = #-2.8
      \times 2/3 { d,8~ fis~ \change Staff=up d' }
      \change Staff=down \stemDown <d, fis \tweak #'transparent ##t a>4 
\stemNeutral
      
      \bar "||"
    }
  >>

  \layout {}
}

Attachment: cross-staff-stems.pdf
Description: Adobe PDF document


reply via email to

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