7

I am trying to engrave Mendelssohn's "Variations sérieuses". I need to tie notes from different voices. Here is the desired effect:

enter image description here

You can see that the last A is tied to the next from a different voice. As prescribed, I was going to create an additional note A and hide it. However, LilyPond refuses to merge it, even if I specify \mergeDifferentlyHeadedOn:

enter image description here

I highlighted the notes I am trying to merge into one. Here is the corresponding code:

\version "2.22.2"
\language "italiano"

\layout {
    \context {
        \Voice
        \consists "Melody_engraver"
        \override Stem #'neutral-direction = #'()
    }
}

common = {
    \key re \minor
    \numericTimeSignature
    \time 2/4
}

right_voice_one = \relative do'' {
    \voiceOne
    fa8 [mib re
    \mergeDifferentlyHeadedOn
    <\single\override NoteHead.color = "firebrick" la dod>~] |
    dod re4 re8 |
}

right_voice_two = \relative do' {
    \voiceTwo
    sol'4 fa8 mib~ |
    mib[
    \change Staff = "left"
    \stemUp
    re do! sib]
    \change Staff = "right"
    \stemDown
}

right_voice_three = \relative do'' {
    sib4.
    \once \override NoteHead.color = "seagreen"
    la8~ |
    \stemDown
    la8 [_(sol fa mi)]
}

right = \relative do'' {
    \common
    <<{\right_voice_one}\\{\right_voice_two}\\{\right_voice_three}>>
}

left = \relative do' {
    \common
    sib,2_~ |
    sib8 [sib' la sol] |
}

\score {
    \new PianoStaff <<
        \new Staff = "right" \with {} \right
        \new Staff = "left" \with {} { \clef bass \left }
    >>
    \layout { }
}

Also, how to make the last slur not to intersect the beam?

Update

Thanks, everyone, for really useful answers. Here is my final version:

enter image description here

Update 2

If you want to engrave it yourself, and modify according to your taste, here is the full text of my version:

\version "2.22.2"
\language "italiano"

#(set-global-staff-size 18)

\header {
    title = "Variations sérieuses"
    composer = "Felix Mendelssohn"
    opus = "Op. 54"
    % Удалить строку версии LilyPond 
    tagline = ##f
}

\paper {
    #(set-paper-size "letter")
}

\layout {
    \context {
        \Voice
        \consists "Melody_engraver"
        \override Stem #'neutral-direction = #'()
    }
}

общие = {
    \key re \minor
    \numericTimeSignature
    \time 2/4
    \partial 4
    \tempo "Andante sostenuto"
}

правая_голос_один = \relative do'' {
    \voiceOne
    la4(~ |
    la8 sold) re'4->(~ |
    re8 dod) fa (mi |
    re do!) do8. (sib16 |
    la4) la->(~ |
    la8 sold) sol4(~ |
    sol8 fad) <sib, sib'> (<fad' la> |
    sol fa! mi8. fa16) |
    \partial 4
    \oneVoice
    <la,! do fa>4 |
    \bar "||"
    \break
    \partial 4
    \voiceOne
    \set Score.currentBarNumber = #8
    <la' do>4~ |
    <la do>8 [(<lab si>) <lab si> <sol si>] |
    si (do) <si re>4~ |
    <si re>8 [(<sib dod>) <sib dod> <la dod>] |
    \oneVoice
    <mi sol dod> (<re fa re'>)
    \voiceOne
    fa'4~( |
    fa8 [mib re <la dod>)] |
    dod (re4) re8( |
    dod re)
    \oneVoice
}

правая_голос_два = \relative do' {
    \voiceTwo
    fa8 (mi) |
    re4 sib'!8 la |
    sol4 fa8 sol |
    fa la sol fa |
    mi4 fa8 (mi) |
    re4 mib8 (re) |
    do4 s4 |
    re8 [re do sib] |
    s4 |
    fa'8 mib |
    re4. re8 |
    fa mi sol (fa |
    mi4.) mi8 |
    s4 <sib' re>8 <la do> |
    sol4 fa8 \change Staff = "левая" \voiceOne mib~ |
    mib[
    re do! sib]
    \change Staff = "правая"
    \stemDown
    \voiceTwo
    mi fa
    \oneVoice
    <mi sib' mi>16 [r  <sol la dod>-.] r |
    \partial 4
    <fa la re>16-.r r8
}

правая_голос_три = \relative do'' {
    \voiceThree
    s4 |
    \repeat unfold 7 {s2} |
    s4 | s4 | s2 | sol4 s4 |
    s2 | s2 |
    sib4.
    \once \omit Stem
    \once \omit Flag
    \voiceTwo
    la8~ |
    \stemDown
    la8 [_(sol fa mi!)]
    \voiceThree
}

правая = \relative do'' {
    \общие
    <<{\правая_голос_один}\\{\правая_голос_два}\\{\правая_голос_три}>>
    \bar "||"
}

левая_голос_один = \relative do' {
    \voiceOne
    re8 (do) |
    si4 sol'!8 (fa) |
    mi4 re8 (dod |
    re [fa mi re] |
    dod4) re8 (do!) |
    si4 do8 (sib) |
    la4 sol8
    \change Staff = "правая"
    \stemDown
    do |
    sib
    \stemUp
    \change Staff = "левая"
    lab
    sol4 |
    \oneVoice
    fa,4 |
    fa'4~ |
    fa4. sol8 |
    do,4 sol'~ |
    sol4. la8 |
    sib2 |
    sib,~ |
    sib8 [sib' la sol] |
    \voiceOne
    la4
}

левая_голос_два = \relative do {
    \voiceTwo
    re4 |
    mi4 sol4 |
    la re8 la |
    sib fa sol4 |
    la re, |
    mi do |
    re sol,8 (la |
    sib si do4) |
    s4 | s4 |
    \repeat unfold 5 {s2} |
    \repeat unfold 3 {s8}
    \once \omit Stem
    \once \omit Flag
    \voiceOne
    sol'8_~ |
    \voiceTwo
    sol (fa)
    \oneVoice
    sol16 [r la^.] r |
    \partial 4
    re,16^. r r8
}

левая = \relative do' {
    \общие
    <<{\левая_голос_один}\\{\левая_голос_два}>>
}

динамика = {
    \общие
    s4 \p |
    \repeat unfold 4 {s2} |
    s4 s4 \p |
    s2 | s2 | s4 |
    s4 \sf |
    s4. \> s8 \p |
    s4 s8 \sf s8 |
    s4. \> s8 \p |
    s4 s8 \sf s8 |
    s2 |
    s8
    \once \override DynamicTextSpanner.style = #'none
    s8 \dim s8 s8 |
    s4 s8 \p
}

\score {
    \new PianoStaff <<
        \new Staff = "правая" \with {
            midiInstrument = "acoustic grand"
        } \правая
        \new Dynamics \динамика
        \new Staff = "левая" \with {
            midiInstrument = "acoustic grand"
        } { \clef bass \левая }
    >>
    \layout { }
    \midi {
        \tempo 4=66
    }
}
9
  • The funny part is that Musescore lets you tie together notes in different voices.
    – Dekkadeci
    Oct 19, 2022 at 3:20
  • Admittedly, even the measure with the start of the tie in the original looks like it has 3 voices instead of 2 (note the dotted quarter note in the middle), with the note with the tie looking really anomalously notated.
    – Dekkadeci
    Oct 19, 2022 at 3:22
  • 1
    "You can see that the last A is tied to the next from a different voice" - are you sure? To me it looks like the A in the first bar A is intended to be the start of a phrase marking spanning the A A G F E quavers of the second-from-top voice. edit on checking the autograph at IMSLP I am in fact wrong
    – AakashM
    Oct 19, 2022 at 8:35
  • 1
    Of course, musically speaking, there are three voices throughout, and the tie connects two notes that both belong to the second voice. It's only because the top two voices' last eighth notes are stemmed together that you have to define them as belonging to the same voice for the software to function correctly.
    – phoog
    Oct 19, 2022 at 10:11
  • 1
    Musically, yes, they are the same voice. However, the way it is engraved, you must define them as different LilyPond voices because a chord must in one voice.
    – facetus
    Oct 19, 2022 at 13:30

3 Answers 3

7

As Ramillies said the problem with the notes not merging is simply due to both voices being Stemup-Voices. This can be amended simply by saying

\once \omit Stem
\once \omit Flag
\voiceTwo

before the note.

That being said I do not find this way of notating this particularly good. I’d much rather do something like this:

\version "2.22.2"
\language "italiano"

\layout {
    \context {
        \Voice
        \consists "Melody_engraver"
        \override Stem #'neutral-direction = #'()
    }
}

common = {
    \key re \minor
    \numericTimeSignature
    \time 2/4
}

right_voice_one = \relative do'' {
    \voiceOne
    fa8 [mib re
    <la dod>~] |
    dod re4 re8 |
}

right_voice_two = \relative do' {
    \voiceTwo
    sol'4 fa8 \change Staff = "left" \voiceOne mib~ |
    mib[
    re do! sib]
    \change Staff = "right"
    \stemDown
}

right_voice_three = \relative do'' {
    sib4.
    \once \omit Stem
    \once \omit Flag
    \voiceTwo
    la8~ |
    la8 [_(sol fa mi)]
}

right = \relative do'' {
    \common
    <<{\right_voice_one}\\{\right_voice_two}\\{\right_voice_three}>>
}

left = \relative do' {
    \common
    sib,2_~ |
    sib8 [sib' la sol] |
}

\score {
    \new PianoStaff <<
        \new Staff = "right" \with {} \right
        \new Staff = "left" \with {} { \clef bass \left }
    >>
    \layout { }
}

enter image description here

4
  • Moving the Eb before the barline to the lower staff looks much better than the other options. But why not just move the entirety of the tenor voice to lower staff? Oct 19, 2022 at 13:56
  • 1
    @ElementsinSpace No, I would not do that. All notes in the upper Staff are supposed to be played with the right hand (including that Eb). Moving the whole tenor to the lower Staff will become much less readable as such.
    – Lazy
    Oct 19, 2022 at 14:07
  • I mark your reply as the answer because the question was about technical details of LilyPond, not about how well the engraving reflects the original text. Elements in Space answer is pretty cool, though.
    – facetus
    Oct 19, 2022 at 16:33
  • 2
    @facetus By the way I’ve noted that you tend to use lots of \stemUp/Downs and direction specifiers for e.g. Slurs. You should rather use \voiceOne/Two/Three/Four as this will handle the stem direction, default Slur direction and note collision resolution.
    – Lazy
    Oct 19, 2022 at 20:41
7

In this case I really think it's much easier to read if you don't merge the voices for just a single note; keep the voices clearly separate and use the offset that \voiceThree (the second highest voice) has by default.

Use \override Beam.positions to adjust the height and slope of beams.
(see Manually controlling beam positions)

The \shape command can be used to manually adjust ties.
(see Modifying ties and slurs).

...
right_voice_one = \relative do'' {
    \voiceOne
    fa8 [mib re dod~] |
    dod re4 re8 |
}

right_voice_two = \relative do' {
    \voiceTwo
    sol'4 fa8 mib~ |
    \once \override Beam.positions = #'(-3.5 . -4.5)
    mib[
    \change Staff = "left"
    \voiceOne
    re do! sib]
}

right_voice_three = \relative do'' {
    \voiceThree
    sib4.
    \shape #'((-1 . -1) (-1 . -1) (-0.6 . -1) (-0.6 . -1)) Tie
    la8~ |
    \once \override Beam.positions = #'(0.4 . -0.5)
    la8 [_(sol fa mi)]
}
...

result of adjusted code - showing voices separated and beams adjusted


Prompted by phoog's comment, I tracked down the holograph manuscript of Felix Mendelssohn's Variations sérieuses, Op.54 (on IMSLP):

excerpt of the holograph manuscript - (handwritten version)

You'll notice a number of differences between this handwritten version and the engraved version in your question, including:

  • The B-flat (si-flat) at the start of the first measure is considered to belong to both of the lower voices in the upper staff.

  • The C-sharp (do-sharp) in the upper voice at the end of the first bar doesn't appear to be tied across the barline.

  • The A (la) in the middle voice in the upper staff is not consider to be shared with the upper voice.

  • Most notably, the lower voice in the upper staff crosses to the lower staff at the start of the second bar, rather than after the first note. Initially this looks much better, but unfortunately it obscures the fact that the E-flat (mi-flat) is tied across the bar line.

7
  • I agree that this is clearer, but does it reflect Mendelssohn's notation faithfully?
    – phoog
    Oct 19, 2022 at 10:12
  • 1
    @phoog The engraved version in the question isn't identical to Mendelssohn's, and Mendelssohn's notation isn't perfect either. Oct 19, 2022 at 12:19
  • Indeed it's not. It's obviously a working copy. It's possible (likely) that Mendelssohn didn't cross out the beam extension connecting the G and the B flat when he added the dot to the B flat because he didn't want to make even more of a mess than he already had. But thanks are due in any event for adding the manuscript image. I wanted to think that Mendelssohn had probably stemmed the notes separately, so it's nice to have that confirmed. It also looks like the tied E flat arose after the revision, explaining why that voice switches clefs across the bar line.
    – phoog
    Oct 19, 2022 at 12:30
  • Ah, I wonder if the editor of the edition in the question misread the separate flag for the A eighth as a tie belonging to the C sharp. If you start from that (erroneous) reading, it's natural to conclude that the A should be beamed with the C sharp. Further evidence that the C sharps shouldn't be tied is the slur connecting the second C sharp to the following D. If they had been tied, the slur should have started on the first C sharp.
    – phoog
    Oct 19, 2022 at 12:37
  • @phoog I think you're right about the unintentionally connected stem at the start, and probably right about the flag on the C# being misinterpreted as a tie. But I think the funny curve sticking out of the flat sign is supposed to be a tie connecting the Eb's. Oct 19, 2022 at 13:29
4

I think that Elements in Space's solution is better than the original, but I'll answer the question as asked because it can be interesting from the Lilypond point of view.

First, the reason why Lilypond refuses to merge the notes is simple: only notes with opposite stem directions can be ever merged. So if both stems are up, the merge just won't work and we must resort to some kind of trickery.

You can always forcibly set the relative position of notes in the same column using the NoteColumn.force-hshift property. If we set it to 0, the green note will fall into place and exactly overlap with the red one.

However, the result is still ugly because the stems overlap too and the eighth note flag is still sticking out of it. So we remove them by using \once\omit Stem \once\omit Flag and we get this:

enter image description here

The slurs are still ugly but you could fix them using the \shape command, as pointed out by Elements in Space. I would also use \slurDown for the middle voice.

All in all, the solution looks like this (I include only the parts of the code where a change occurred):

right_voice_one = \relative do'' {
    \voiceOne
    fa8 [mib re
    <la dod>~] |
    dod re4 re8 |
}

right_voice_three = \relative do'' {
    sib4.
    \once\override NoteColumn.force-hshift = #0
    \once\omit Stem \once\omit Flag
    la8~ |
    \stemDown
    la8 [_(sol fa mi)]
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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