Hello,

I’ve written a music function which applies some tweaks on dynamics to offset them. Unfortunately, it’s not possible to use the offset music function on X-offset, because it is a mutable property. Thus I have to add a displacement for DynamicText so that it is not aligned to its baseline, but to the ‘center’ like normally. Now, it would help if the music function could find out by itself whether to apply this displacement, depending on which grob it is applied to. As an example (attached also):
%%%%%%%%%%
\version "2.19.27"

test =
#(define-music-function (ev) (ly:music?)
   (tweak 'color red ev))

{
  c''-\test \> g'-\test \f
}
%%%%%%%%%%
How can I modify the function so that only the DynamicText is colored, the Hairpin isn’t?

TIA, Simon
\version "2.19.27"

test =
#(define-music-function (ev) (ly:music?)
   (tweak 'color red ev))

{
  c''-\test \> g'-\test \f
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to