lilypond-user
[Top][All Lists]
Advanced

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

Re: Cross staff stems between notes of different durations


From: Rutger Hofman
Subject: Re: Cross staff stems between notes of different durations
Date: Sat, 23 Jul 2016 13:09:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 07/20/2016 03:15 PM, Rutger Hofman wrote:
For me, this just works, with differentlyHeaded and with different
durations for the same NoteHead type:

\version "2.19.39"

\score {
     \new PianoStaff \with {
         \consists #Span_stem_engraver
     } <<
         \new Staff = RH <<
             \time 3/4
             \relative c'' {
                 c4 \mergeDifferentlyHeadedOn \crossStaff { c2 }
             }
         >>
         \new Staff = LH <<
             \relative c' {
                 \clef bass
                 % \voiceOne
                 c4 c c
             }
         >>
     >>
}


\score {
     \new PianoStaff \with {
         \consists #Span_stem_engraver
     } <<
         \new Staff = RH <<
             \time 3/4
             \relative c'' {
                 c4 \mergeDifferentlyHeadedOn \crossStaff { c8 c c c }
             }
         >>
         \new Staff = LH <<
             \relative c' {
                 \clef bass
                 % \voiceOne
                 c4 c c
             }
         >>
     >>
}

And the mergeDifferentlyHeaded is not even necessary. To follow-up on my own take: the crossStaff stuff can also be moved into a parallel Voice within the 'other' Staff. Then it is easy to lift it into a little function, see below. The function has an obvious caveat: the name of the other staff is hard-coded. The usual restrictions for crossStaff'ing apply of course. The example has two cross-staff instances, the first from the RH and the other, in the next beat, from the LH.

Rutger

====8<=================================================================

RHCB = #(define-music-function (music) (ly:music?)
"Set @var{music} on staff RH, crossStaffed if possible. Call this in parallel << >> with the music that is the other side of the cross-staff. The latter must be \\stemDown."
#{
    \new Voice \crossStaff { \change Staff = RH \stemDown $music }
#})

LHCB = #(define-music-function (music) (ly:music?)
"Set @var{music} on staff LH, crossStaffed if possible. Call this in parallel << >> with the music that is the other side of the cross-staff. The latter must be \\stemUp."
#{
    \new Voice \crossStaff { \change Staff = LH \stemUp $music }
#})


\score {
    \new PianoStaff \with {
        \consists #Span_stem_engraver
    } <<
        \new Staff = RH <<
            \time 3/4
            \relative c'' {
                \voiceOne c2 c4
                <<
                    c2.
                    \LHCB { a2 }
                >>
            }
        >>
        \new Staff = LH <<
            \relative c' {
                \clef bass
                % \voiceOne
                c4 <<
                    { c c }
                    \RHCB { a'2 }
                >>
                \voiceTwo c,2.
            }
        >>
    >>
}


On 07/20/2016 02:40 PM, Andrew Bernard wrote:
Total silence? No thoughts, anybody?

Andrew



On 18 July 2016 at 11:45:51 PM, Andrew Bernard wrote:

If one wants to have cross staff stems between notes of different
durations, found often in the contemporary music I set, is there a
lilypond setting of some sort to do this?


Attachment: cross-staff-merge-differently-headed-clipped.png
Description: PNG image


reply via email to

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