[...]
But how can I find out whether the tweak is called within a normal or a
tab staff? Within a normal staff, a whiteout should surely be avoided ...
I think you have to do this within the callback, where the context is
available. Once you have a context, you can see if it's a Voice context or
a TabVoice context. I'm sure Neil can help with this better than I can.
But if you do a git grep for context, you'll see lots of examples of how to
get information about contexts....
[...]
No, the tweaks will work only in chord constructs
as far as I know, so I should have a pair of functions
for each feature, i.e.
c4 d \palmMute e f
< c \chordPalmMute e g >4
c4 d \deadNotes e f
< c \chordDeadNotes e g >4
Oh, I wasn't expecting that the new function wouldn't work outside of chord
constructs.
How about using the same function both inside and outside of the chord
constructs, and just including a check to see if the argument is a
NoteEvent. If it is, use the \tweak method, and if it's not, use the
existing method?
I haven't tried this out, but I think it could be made to work, and if it
could, then it would greatly simplify things for the users.
HTH,
Carl