People often asks how to get parenthesized noteheads. There is an
example: stencil-hacking.ly but that doesn't adjust the stencil extents
properly, so the parenthesis collides with accidentals and stuff like
that. I have made a version that does take care of this:
Perhaps this functionality should be included in lilypond, it's not so
uncommon to want parenthesis around noteheads... There could be a
\startParenthesizeNoteHeads and \stopParenthesizeNoteHeads command...
(or maybe some shorter names? ;) Or even something like "\override
NoteHead #'parenthesized = ##t" (merge the code below with the default
stencil proc for noteheads)