2

I tried previously suggested solutions, and they didn't work. I am trying to merge noteheads to draw a melody guideline. In the code below I show them to demonstrate the effect, in the final version they will be hidden.

\version "2.24.3"
\language "italiano"

\score {
    \new PianoStaff <<
        \new Staff = "right" \relative do'' {
            <>
            \key re \minor
            \numericTimeSignature
            \time 3/4
            <<
                {
                    sold8-- (sol16 sold la4) r4
                    \oneVoice
                    <\single\override NoteHead.color = "firebrick" sib re mi sol sib>8-> [
                    <la dod mi sol la>->
                    <fad do' re fad>->]
                    <sol, do! sol'>16-- [(la' <fad, do' fad>8--)] r8
                }\\
                {
                    re'4~ 16 dod (mi sol la dod mi sol)
                }\\
                {
                    s2 s8 s16
                    \change Staff = "left"
                    \stemDown
                    %\hideNotes
                    la,
                    \showStaffSwitch
                    \once \omit Stem
                    \once \omit Flag
                    \change Staff = "right"
                    \once \override NoteHead.color = "seagreen"
                    sib8
                    \hideStaffSwitch
                    %\unHideNotes
                }
            >>
        }
        \new Staff = "left" \relative do {
            \key re \minor
            \clef bass
            <<
                {
                    fa4 (mi)
                }\\
                {
                    la,2
                }
            >>
            \clef treble
            dod'16 mi sol la
            <sol, re' mi sol>8_> [<la dod mi sol>_> \clef bass <re, la' re>_>]
            <la mib'>_- [<re, la' re>_- ] \clef treble
            la'''16 sib
        }
    >>
}

I highlighted not merged noteheads:

enter image description here

1 Answer 1

3

Try ignoring note column collisions:

                %\hideNotes
                la,
                \showStaffSwitch
                \once \omit Stem
                \once \omit Flag
                \change Staff = "right"
                \once \override NoteHead.color = "seagreen"
                \override NoteColumn.ignore-collision = ##t % <-- new
                sib8
                \hideStaffSwitch
                %\unHideNotes

Since it's so usual to want to hide a single note head, I have this defined in global variables file:

hideNoteHead = \once {
  \omit Stem
  \omit Dots
  \omit Flag
  \hideNotes
  \override NoteColumn.ignore-collision = ##t
}

Then I can just write:

\hideNoteHead sib8
1
  • This is magic. Thanks!
    – facetus
    Mar 5 at 1:08

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.