Am 04.03.2017 um 22:59 schrieb Kieren MacMillan: > Many scores use dynamics like “pp sub.” or “f dolce” etc. In order to build > such a grob as a DynamicText, I use the following: > […] > 1. I have to define a macro for every single combination in every score. For > ppSub and the like, which will be used often, that’s not so bad… but it’s a > pain for something like “fffff, as ridiculously loud as physically possible”, > which I will hopefully only use once. ;) > > 3. I need a different make-music function for something like “subPP” (i.e., > where the order of dynamic and text is reversed). > > 4. I need a different make-music function when it’s simply a text (e.g., > “cresc. poco a poco”).
Do you know the \dynamic function from openlilylib? You can find it at openlilylib/input-shorthands/easy-custom-dynamics and it is used as follows: { c\p d\dynamic "p" % or \dynamic p (same output as \p) e\dynamic "p e dolce" f\dynamic "più p" g\dynamic "cresc. poco a poco" } The function builds a markup where every word containing *only* p, f, m, s, z, r (f. e. sffz) is printed in dynamic letters and every other word (f. e. poco) is printed in normal-text italics. And it supports underscores for spaces as I just noticed so you could omit the "": { % all of the following have the same output f\dynamic "più p" f\dynamic "più_p" f\dynamic più_p } > 2. I have to manually try-and-errorize the self-alignment-X and hspace > value(s) for each dynamic I define this way. Graham’s original > make-dynamic-extra function tried to handle this issue, but the X-offset > tweak made it impossible to reset post-hoc (e.g. when using the > edition-engraver), so I had to stop using it. I’m not sure about self-alignment-X behaviour but for long dynamics like "ppppp" at start of measure (colliding with bar line) or "p dolce e espressivo" usually setting self-alignment-X to #LEFT and X-offset to 0 works for me. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user