2010/4/28 Reinhold Kainhofer <reinh...@kainhofer.com>: > No, here you have a dynamic marking and some text markup, which do > not have anything to do with each other, so they are positioned > separately (examples are: "pizz" on the same note as a\p. You > definitely don't want "pp pizz."!)
It won't happen. "pizz" will be printed above the staff, whereas \pp below. :) Actually the case when "you have a dynamic marking and some text markup which do not have anything to do with each other so they are positioned separately" is quite rare (IMHO), at least much rarer than when the text indication is aligned on the dynamic. ex: mp dolce, ff appassionato, "f marcato, sensa cedere", ... I have no examples where I find a text that is printed below the dynamic and positioned separately. I know all these possibilities to make some "horizontally aligning custom dynamics", but I would prefer to have the dynamic and the text indication to be "uncoupled". I.e. to have the possibility to move only the text or only the dynamic. For example, if I add \dynamicUp, only the \mp will be moved above, the "dolce" would stay below, and inversely. Actually I'd like a TextScript property like \override TextScript #'align-on-dynamic = ##t If ##t markups would align on dynamic if present, if false the behavior would stay like it is now (positioned separately). That would also make us avoid creating a lot of "custom dynamics", but instead use "simple markups" (+ override a property). But I admit it is a very specific request, and there are more important things to fix/improve in LilyPond before that. Your function is very helpful like that, it's just that the better it become, the more requesting I am. :D > But it will ignore all \dynamicUp / \dynamicDown commands... The best > is still to use #(make-dynamic-script....), which really creates a > dynamics object (see also the LSR snippet quoted below). > > What I was talking about was not to get the "mp" and the "dolce" next > to each other, but how to get a "mp dolce" in one staff of a full > score align properly with a "mp" in another staff (i.e. the additional > "dolce" should not force the mp away from the note it applies to). Yes, I understand. Although I have (had) a different approach. Where you consider the "mp dolce" as a whole, I consider it as 2 different ideas put together, but that could be "uncoupled" (see above). The result is the same: "mp dolce", with the \mp X-centered below the note and the dolce beside, Y-aligned on DynamicLineSpanner (like if you had written "mp <space> dolce" (space = \hspace #1 ). > I have collected a lot of possible approaches on the LSR: > http://lsr.dsi.unimi.it/LSR/Item?id=393 > > (See the comments in the .ly file for the pros/cons of each of the > approaches). I didn't know you were the author of this snippet, which I found very useful, I used it to discover the solution I used (Solution 5: Dynamic with explicit shifting inside the scheme function). But then I was informed of Graham's #(make-dynamic-extra ...) function, which I use now and which has no drawback at all (to what I know). – the dynamic is considered as a dynamic (in MIDI output too); – the dynamic is correctly aligned (X-centered on the note), without having to play with "translate" values (huge improvement compared to solution 5); – no other drawback. Could you add this to the snippet? I even think that since it do the job correctly and has no (known) drawback, it would make all other solutions "obsolete"... %%% This function was provided by Graham Percival. #(define (make-dynamic-extra dynamic string) (make-music 'AbsoluteDynamicEvent 'tweaks ;; calculate centering for text (list (cons (quote X-offset) (+ -0.5 (* -0.5 (string-length dynamic))))) 'text (markup #:whiteout #:line ( dynamic #:hspace -0.3 #:normal-text #:italic string)) )) ffdolce = #(make-dynamic-extra "ff" "dolce") { a1 a\ffdolce a } %%%%%%%%%%%%%% -- Xavier Scheuer <x.sche...@gmail.com> _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user