I recently started learning LilyPond and am trying to notate finger sustained notes as described in Is there piano notation for finger sustained notes (as opposed to pedal sustain)?. I would be fine with either one of the notations from the top two answers.

I was able to notate what's described in the second answer like so:

\relative f' { f4~ <f c'>~ <f c' f>2 }

I find the code I wrote very verbose because I have to repeat all of the previous notes whenever I add a new one. Ideally I would only need to specify the next note and that I'd like the previous notes to continue and tie over. Is there a less verbose way to express this or what's described in the top answer of the question I linked?


I don't know whether it's possible to shorten the code you have provided (I doubt it but perhaps someone will know a way). However you could use \set tieWaitForNote = ##t to a good effect here. When it is set to ##t, each note with tie waits for the next occurrence of the same note and ties it with that. So your snippet could be rewritten like this:

\relative f' { \set tieWaitForNote = ##t f4~ c'~ <f c' f>2 }

which would result in the first f tying right to the half-note f, without the need for the second f in between.

You can play with it in a lilybin that I put together for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.