[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