Werner LEMBERG <w...@gnu.org> writes: >>> moveDynTweak = >>> #(define-music-function (X Y) (number? number?) >>> #{ \tweak DynamicLineSpanner.outside-staff-priority ##f >>> \tweak DynamicText.X-offset #X >>> \offset DynamicLineSpanner.Y-offset #Y >>> \etc #}) >> >> Should have worked when using -\moveDynTweak ... Since you are not >> using this for anything other dynamic expressions, it would be >> likely better to use define-event-function here, obviating the need >> to write - before \moveDynTweak . > > Thanks! Please check whether > > moveDyn = > #(define-event-function (X Y etc) (number? number? ly:music?) > #{ \tweak DynamicLineSpanner.outside-staff-priority ##f > \tweak DynamicText.X-offset #X > \offset DynamicLineSpanner.Y-offset #Y > etc #}) > > { > g'2 > g'\moveDyn #-1 #5 -\f > } > > is really correct; I will then add this to the documentation.
I think all of your argument names are a bad idea. #X and #Y are usually fixed constants (namely axes) in their uppercase form. There is absolutely no conceivable reason for using this form instead of lowercase letters and/or something more descriptive like xoff/yoff . "etc" is so close to "\etc" that people will tend to "autocorrect". Why not use "event" or "dyn" ? And by the way, the predicate should be the more specific ly:event? , or otherwise construction of a post-event will fail at an unexpected place when a non-postevent is given as argument. It also seems writing -\f rather than \f suggests that it would not work otherwise while it does. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user