[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: improving Janek's \dynamic function (for combo dynamics)
From: David Kastrup <dak () gnu ! org>
Date: 2017-08-29 20:50:14
Message-ID: 87fuca3xq1.fsf () fencepost ! gnu ! org
[Download RAW message or body]
Kieren MacMillan <kieren_macmillan@sympatico.ca> writes:
> Hi Xavier,
>
>> For correct alignment of "dynamic + text" (or "text + dynamic") I used
>> to rely on Graham's "make-dynamic-extra" function, which worked well.
>
> It's hardly perfect, though — for example, the dynamic isn't centred correctly here:
>
> %%% SNIPPET BEGINS
> \version "2.19.64"
> #(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.5
> #:normal-text #:italic string))
> ))
>
> test = #(make-dynamic-extra "fmf" "dolce")
>
> { a1\test }
> %%% SNIPPET ENDS
I like the chutzpah of this off-the-cuff approximation, though.
--
David Kastrup
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic