Posts

Showing posts from December, 2021

LilyPond, ties and voices (advanced)

Image
The object of this article The object of the article is the same as my this previous article but now I have composed, using the LilyPond language, a short score for piano with a little bit more complex voices and ties combinations. I have also created a colour image highlighting the points of interest. You can also listen to the audio version of the short composition at the end of the article. The following terms from the LilyPond lexicon must, of course, be regarded: oneVoice: a single voice line voiceOne: the upper melody line of a polyphonic composition voiceTwo: the lower melody line of a polyphonic composition And now let’s have a look at the LilyPond code Here’s the complete LilyPond code in which you will find each line commented and, in particular, the crossing points shown in the score below.: \version "2.22.0" \layout { \context { \Voice \remove Tie_engraver } \context { \Staff \consists Tie_engraver } } global = { \key g \major \

LilyPond, ties and voices

Image
LilyPond: ties and voices In the default LilyPond configuration, it is not possible to tie a note in a single-voice with the same note but belonging to a contextual multi-voices environment. I recently had to resolve an author’s passage involving just such a problem and asked for help to the amazing LilyPond community. So I learned a new “trick” that I would like to share with everyone: you can change the context in which ties operate. More in particular: it is possible to make ties work from the voices context to the scores context. In this way, ties can also be engraved switching from single voice to a multiple voice. An easy example: tie from a single voice to multiple voices not engraved In the following example I report a very simple code fragment with an “unterminated tie” warning: \version "2.22.1" \relative c' {\key c \major \time 4/4 c d e f~ % implicit oneVoice % start multiple voices << { f g8 a b4 c } % implicit voiceOne \\ { c