Is it worth noting here that footnotes also double up when marking a note
that gets tied across the barline? It's separate from accidentals, but
surely similar in that the completion heads engraver is creating a
duplicate note and applying attached objects to both?

\footnote #'(1 . 1) "I'm seeing double" cis\breve

\layout {
  \context {
    \Voice
    \remove Note_heads_engraver
    \consists Completion_heads_engraver
  }
}

-David

On Sun, 1 Mar 2026 at 20:51, Werner LEMBERG <[email protected]> wrote:

>
> [Replying only to bug-lilypond]
>
>
> Hello Tina,
>
>
> sorry for the very late reply.
>
> > I’ve found weird behaviour with the completion heads engraver
> > wrt. to forced accidentals:
>
> Please add images to such e-mails, which makes it quicker and easier
> to follow.
>
> > %%%
> > \new Voice \with {
> >   \remove Note_heads_engraver
> >   \consists Completion_heads_engraver
> > } { cis''!1*3 }
> > %%%
>
> See attached image.
>
> > What is happening here is that forced/cautionary accidentals work by
> > setting an event/grob property (for which then the accidental
> > engraver checks).
> >
> > But the Competion heads engraver creates all note heads from copies
> > of the same event, which means that indeed the above would be
> > equivalent to
> >
> > %%%
> > { cis''!1~ cis''!1~ cis''!1 }
> > %%%
> >
> > This I think is almost never what we’d actually want to see.
>
> Agreed.
>
> > Since I currently use the Completion heads engraver for a project I
> > wrote a patch which simply sets the forced-accidental/cautionary
> > properties to #f after creating a note head, meaning the properties
> > would be true at most until the first note head.
> >
> > This is probably not a good fix, but I don’t understand the code
> > well enough to quickly come up with a better solution for now.
> >
> > Leaving this here for discussion
> >
> > 1. Surely this is to be seen as a bug?
>
> Yes.  This is issue #4011.
>
>   https://gitlab.com/lilypond/lilypond/-/issues/4011
>
> > 2. What would be a good fix? Potentially it would make sense to have
> > an Accidental event attached to the note head or something?  [...]
>
> Please add your comments and suggestions this issue!
>
>
>     Werner
>
>

Reply via email to