What’s up with this snippet?

Tina Petzel <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.general
Message-ID <[email protected]>
Hi all,

I was pointed to this official Lilypond snippet for a sharp on a turn:

https://lilypond.org/doc/v2.26/Documentation/snippets/expressive-marks-_002d-creating-a-delayed-turn[1]

What this snippet is doing is to place the turn on a hidden note featuring the accidental and then 
using suggestAccidentals with a ton of overrides to get the sharp under the turn.

This is not only obviously quite a fickle way to get this done, it also adds issues such as Lilypond 
handling this as a regular accidental. Guess the only advantage is that this handles change of 
accidentals on transposition (but there are better solutions to that).

The reasonable way to do this would of course be something like

\relative c'' {
  \after 2*2/3 \turn c2( d4) r |
  \after 4 \turn c4.( d8)
  \after 4
    -\tweak stencil
      #(grob-transformer
        'stencil
        (lambda (grob orig)
          (ly:stencil-combine-at-edge
           orig Y DOWN
           (grob-interpret-markup grob (markup #:center-align #:fontsize -5 #:sharp))
           0.2)))
    -\turn
  d4.( e8)
}

which is the clean way that is properly extensible to similar such applications (accidentals above 
turn, accidentals on other ornaments, ...).

Is there any reason for having this snippet?

Cheers,
Tina

--------
[1] https://lilypond.org/doc/v2.26/Documentation/snippets/expressive-marks-_002d-creating-a-delayed-turn
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQS0sdUK2Lu8of48K2+FHhaCPe7BywUCaik/iQAKCRCFHhaCPe7B
y3BCAQCmhz5YoayPdCUqQpnAxu7s6B1fpbL6gi4lvtByXmiUkgD/XKD/tz83PGt7
LKMZvuYc9uruKaaSxOWScVy4rJ5/gAg=
=7JGC
-----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.