Hi Simon,
\once \override TupletNumber.text =
#(tuplet-number::non-default-tuplet-denominator-text 6)
I was wowed by this override and wondered why it was so long.
\tweak TupletNumber.text "6"
works equally well for this situation but I’m sure for other cases the
procedure is needed ;)
Well, that function is defined as:
;; Print a tuplet denominator with a different number than the one
derived from
;; the actual tuplet fraction
(define-public ((tuplet-number::non-default-tuplet-denominator-text
denominator)
grob)
(number->string (ifdenominator
denominator
(ly:event-property (event-cause grob) 'denominator))))
In other words: If given a number, convert it to a string and use it;
only if given #f, take the denominator from the grob's causing music
event. So your tweak is really equivalent (disregarding the standard
differences between \once\override and \tweak).
I'm hard pressed to find a reasonable use for this function. It was
added during work on improving conversion from musicxml; maybe there's a
reason there why, instead of simply setting a text like you do, a
wrapper function is used there. Maybe Werner knows more about this?
Lukas