Your guess is correct about the meaning of the notation. Usually, for strings this implies that you play the lower note briefly at the beginning and then play the double-stop with the upper two notes and hold that for the rest of the duration.
For Lilypond, I can immediately think of two common ways to do something like this.
(1) The simplest is to tweak the notehead and change the lowest pitch in each chord to a notehead for a quarter note.
\set fingeringOrientations = #'(left)
<\tweak duration-log #4 g, d'-0 c'-2>2 <\tweak duration-log #4 g f'-2 b-1>
The duration-log
setting for the notehead uses 4
for quarter-note style, 2
for half-note, etc.
(2) If you have a more complicated situation than this which requires more than a notehead tweak, sometimes you'll need to use multiple voices. If you haven't needed to use multiple voices elsewhere in the score so far, no need to explicitly create them now. The most compact Lilypond notation to create this would be something like:
<< { \set fingeringOrientations = #'(left)
\stemDown <d,-0 c'-2>2 <f-2 b-1>} \\ {g,4 s g s} >>
Note that the << >>
signs are used to indicate music that is played simultaneously, and the \\
separates the voices. By default, when multiple voices are created on a single staff, Lilypond puts the stems of the first voice going up and the second voice going down. Here, forcing the \stemDown
on the first voice will combine it with the (downward) stem of the second voice. (You'll get a "clashing note columns" warning from Lilypond, but the resulting notation will overlap the stems in a way that you want.) Here, the lower voice uses g,4 s g s
where s
is just a "spacer rest" (hidden), where nothing appears. (This is a useful trick to use in many places in Lilypond with multiple voices.) Thus, the lower voice only shows up on the first and third quarters of the measure, which is where you need it.
[EDIT: A more elegant way to combine the voices is described in Paco Vila's answer using \partcombine
, which is a probably a better option if you only have two voices to combine.]
Note that Lilypond will usually reserve space for the hidden s
rests, even if they aren't there, so the second option will result in a more widely spaced version. In this case, the second approach isn't necessary, but in more complex situations it can be helpful to have the two voices (and to tweak spacing if necessary).