# Attach sustainOn/Off to notes that change between staffs

I am currently engraving a piano piece that has notes for the same hand changing between staffs quite often, although usually only at the end of a bar. I have kept the two PianoStaffs separate, so I am using \change Staff = "..." (although my issue also occurs with \autochange).

I have a bar however where the first few notes are on the bottom staff, and the rest are on the top staff. The piece uses Ped and * sustain marks, which go between the staffs. When I try attaching the \sustainOn to the first note, and the \sustainOff to the last however, I get: warning: cannot find start of piano pedal: Sustain', because the sustain starts on the bottom staff and ends on the top.

I have got around this problem for now by using two simultaneous voices on my top staff where necessary, and attaching the \sustainOn and \sustainOff to silent notes. This requires extra effort however, and also gives me warnings when they are contained in tuplets: warning: omitting tuplet bracket with neither left nor right bound.

Is there a better way of doing this?

• A better way of changing between staffs?
• A better way of marking \sustainOn and \sustainOff?
• A better way of annotating my tuplets? The actual piece is 4/4 with \tuplet 6/4 4 to get 4 tuplets of 6 semiquavers.

In this image, the left side is what I want (and achieved with two voices and silent notes, but with tuplet warnings), and the right side is what I get if I use the 'naive' notation (with a warning about sustain off and the pedal mark in the wrong place).

Here is the code for my small test, which replicates the issue I am having in the more complex piece:

\version "2.20.0"
\language "english"

topStaff = \new Staff = "top" {
\time 2/4
\clef "treble"
\key c \major

\relative c' {
\tuplet 3/4 4 {
<<
\new Voice {
\voiceOne
\change Staff = "bottom" b16 a
\change Staff = "top"    e' f e f
}
\new Voice {
\voiceTwo
s16\sustainOn s s s s s\sustainOff
}
>>
}
|
\tuplet 3/4 4 {
\voiceOne
\change Staff = "bottom" b,16\sustainOn a
\change Staff = "top"    e' f e f \sustainOff
}
\bar "|."
}
}

bottomStaff = \new Staff = "bottom" {
\clef "bass"
\key c \major

\relative c {
\voiceTwo
b4 e
|
b4 e
\bar "|."
}
}

\score {
\new PianoStaff {
<<
\topStaff
\bottomStaff
>>
}
}


EDIT: this is the passage that prompted this question, from Chopin's “Winter Wind” Étude (1st edition) bars 27-28.

• Why on earth do you want the pedal markings between the staffs? There is only one pedal, and it always affects all strings (except the fiddly ones at the top), so it should always be notated below the score no matter which hand plays which note. – Kilian Foth Dec 22 '20 at 10:09
• I have to second @KilianFoth question. The pedal markings for piano music always go below the grand staff; never in the middle. Is there some special effect you're going for? – Aaron Dec 22 '20 at 10:12
• Two reasons: firstly, copying the original score (1st edition of Chopin's “Winter Wind”), which has them in the middle (I also opted for old-style rests); secondly, because the pedal is timed with the tuplets, so just sticking them in the bottom staff puts the marks in the wrong places (especially at the end of a bar). – Billy Brown Dec 22 '20 at 10:29
• What publisher's edition is this printing of the Chopin "Winter Wind" etude? It's got the nastiest positions for pedal markings I've ever seen, and this includes self-published works. – Dekkadeci Dec 22 '20 at 12:14
• @Dekkadeci "Etudes Pour Le Piano, Op. 25" M. Schlesinger, Paris, 1837. chopin.nifc.pl/en/chopin/pierwodruk/314 For this specific piece, it's chopin.lib.uchicago.edu/gsdl/cgi-bin/… – Billy Brown Dec 22 '20 at 12:19

A couple of things comes to mind:

If you want to put the pedal markings in between the staves all the time, the best way to do it would be to use separate Dynamics. Just put it between your staves, so you get something like

\new PianoStaff <<
\new Staff { \clef treble ... }
\new Dynamics { ... }
\new Staff { \clef bass ... }
>>


Then, just put any notes into the Dynamics. They won't render anywhere, but all the dynamics and similar things (like pedal markings) will. You can also write any kind of rhythm in there; it doesn't have to have anything in common with what is in the other staves. Here's a lilybin for you (lilybin is a web application that lets people share lilypond snippets and compiles the previews).

If you want to get rid of the warnings of empty tuplet bracket, just don't use tuplets for the spacer rests. You can scale the durations using *. So s4*1/3 is a s4 which only takes 1/3 of the original time.

If your treble staff is full of tuplets, I would recommend using \tupletSpan (length). When you set it, you can write "one long tuplet" and it will be automatically broken down into chunks of (length). E. g. \tupletSpan 4 \times 2/3 { c8 d e f g a b a g f e d } makes 4 triplets, one with c d e, the next with f g a and so on.

Finally, if would you really want to reproduce the messy pedal markings in the original, you can attach the pedal markings to the notes as a markup. You can get the "Ped." with \markup \musicglyph #"pedal.Ped" and the star with \markup \musicglyph #"pedal.*". So you could write this:

c16^\markup\musicglyph #"pedal.Ped" d e f g f e d_\markup\musicglyph #"pedal.*"


and the markings will be all over the place, just like in the original score you posted. See another lilybin.

• Thanks, I didn't actually know about \Dynamics { ... }, and the time multiplication trick helps too. I wanted to try keeping them in the middle, as a slight improvement on them being all over the place, but that has some overlap. I may just end up using the dynamics method to follow Kilian and Aaron's suggestion of putting all pedal marks below the staff (my more experienced pianist friend recommended putting it below as well). – Billy Brown Dec 22 '20 at 12:14
• @BillyBrown, then do it like that. I'm not a pianist, so I can't really say anything about it. You can put the Dynamics anywhere you want, so if you put it after your two staves, it will just render the pedal marks below both of them. – Ramillies Dec 22 '20 at 12:25
• I use one Dynamics` line in between the staves for actual dynamics, and then one below the grand staff for the pedal. I've sometimes sneaked a dynamic into the pedal line, but never a pedal into the dynamics line. – ksnortum Dec 22 '20 at 23:59