Hi James, On Thu, Sep 6, 2012 at 5:00 PM, james <james.lilyp...@googlemail.com> wrote: > I don't really understand it, but I can modify the examples of how to create > custom dynamics to get what I want. > I have a document with several examples like: > rinforzamf = #( > make-dynamic-script ( > markup #:line ( > #:left-align > #:normal-text > #:whiteout > #:italic "rinforza" > #:hspace 0 > #:whiteout > #:dynamic "mf" > ) > ) > ) > And a macro that left-aligns it: > leftalign = { \once \override Dynamics.DynamicText #'self-alignment-X = #-1 } > > Heretofore, I've just been manually adding the \leftalign before the > \rinforzamf (for example). Is there a way to get both of these in one command? >
With the following definitions, you can get what you want with a single command. Also, you can define other such combinations. (BTW, I commented out two lines in the markup definition which I don't think are needed.) HTH, David %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \version "2.17.1" #(define (rinforza text) (let* ((text (markup #:line ( ;#:left-align #:normal-text #:whiteout #:italic "rinforza" ;#:hspace 0 #:whiteout #:dynamic text))) (my-dyn (make-music 'AbsoluteDynamicEvent 'text text))) (set! (ly:music-property my-dyn 'tweaks) (acons 'self-alignment-X -1 (ly:music-property my-dyn 'tweaks))) my-dyn)) rinforzamf = #(rinforza "mf") rinforzap = #(rinforza "p") \score { \new Staff << { c'1 d' c' d' } \new Dynamics { s1*2\rinforzamf s1*2\rinforzap } >> } _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user