Completion Heads with forced/cautionary accidentals

Tina Petzel <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.devel,gmane.comp.gnu.lilypond.general,gmane.comp.gnu.lilypond.bugs
Message-ID <2343052.iZASKD2KPV@archbox>
Hey all,

I’ve found weird behaviour with the completion heads engraver wrt. to forced accidentals:

%%%
\new Voice \with {
  \remove Note_heads_engraver
  \consists Completion_heads_engraver
} { cis''!1*3 }
%%%

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. 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?
2. What would be a good fix? Potentially it would make sense to have an Accidental event 
attached to the note head or something?

*But even then, the problem does not appear for articulations and stuff like this*

%%%
\new Voice \with {
  \remove Note_heads_engraver
  \consists Completion_heads_engraver
} { <cis''!>1*3-2 }
%%%

only because the script engraver looks for articulatons attached to note events (that are not 
handed during iteration) and then removed from the original event (which is also not really that 
much of a clean thing). In fact we see the same problem say here:

%%%
\new Voice \with {
  \remove Note_heads_engraver
  \consists Completion_heads_engraver
} { <cis''!-2>1*3 }
%%%

Not sure what’s the best thing to do here ...

Best regards,
Tina
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEET9lQp3Sisy/pK6sBnDUJWyIflYEFAmmDqysACgkQnDUJWyIf
lYEBhhAAhwa+219Z6gveJEJ+yRzrUj0j0fiYSXH1Zn7Q4HOfikXW1F0DWVNyYd5C
HmS0an7jQrG+/qq8PWipw8VRlASRAkhSiTmM17f633RBxfNh3/WntClxu4y5ES1h
QtCZfRVL4Fe2WnVQ3wCZtsTsW53RHtVFHN3Wv6alvaJ99lmEyGWBYgmnEzcMFG17
+xnFzTugjfCw7cuiw279VVKF9y1Tl0mIT2Zzn4KmhSGLulY2GNy2vOAMc6jdxIYp
QVhl9HCIzGNaZ40ZkYPBE57b++2V/bZFsjzomuq0Jo8JQAP8s7FUdy4HbFs5MyX2
OfMzwEly1fPYqnc542fXs3WfnkTyn6+cJu2jjbMD75TBjhG1gMWd9Eg+MAfCcRAj
ptDAElTvuYEFBQJ5MdI4jPxnx7gS5AgSPdIhcEp4EsYjbwqdgzqV9gSr3OwLjeFV
4OxMJ6+FYT535doBjmHmMCog1fSPeNNXAVfGg4hWSNJr/ePQW0St+aqU3kPTmXvY
vBeh5DetsWkFIIm8gDp/4nUe+ehUOHxADg8HE6SJREKRsxa9z5UOKoKi0KynAp9a
AJ1vkusljJnyFvjnSi7yLCy4R0+dMFv30oVtTMCey9WROiDufkZhlMoYAnuDcdvO
HaDIc+9cEHp1qrlvkIjAqoelMUq1xdLfpyNYdHT+6SBKllKoEDs=
=HYfE
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.