lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving tweaks into markup-definition


From: Orm Finnendahl
Subject: Re: moving tweaks into markup-definition
Date: Wed, 17 Sep 2014 01:19:27 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Hi David,

 thanks a lot, that definitely helps! I tried to manipulate the assoc
list of props by consing to it but lacking the knowledge of the
structure of the prop variable didn't get me anywhere. I wonder
whether I could find that information without having to read through
and understand all of the sources of lilypond.

--
Orm


Am Dienstag, den 16. September 2014 um 17:52:47 Uhr (-0500) schrieb David 
Nalesnik:
> Hello,
> 
> On Tue, Sep 16, 2014 at 4:33 PM, Orm Finnendahl <
> address@hidden> wrote:
> 
> > Hi,
> >
> >  here is the next question:
> >
> > Is there a way to move the tweaks in the following code into the
> > markup definition of secs so that they don't clutter up the score?
> >
> >
> The only way I can think of doing this is to add (property . value) pairs
> to the contents of props.  The following works for your tweaks, but it
> won't work for every overridable property: 'color and 'transparent don't
> work, for example.
> 
> I'd be interested to know if there's a better way to do this.
> 
> Anyway, I hope this is useful.
> 
>  %<------------------------------------------------------------
> \version "2.19.5"
> 
> #(define-markup-command (secs layout props numsecs)
>    (string?)
>    (let* ((immutable (car props))
>           (mutable (cadr props))
>           (font-defaults (caddr props)))
>      (set! mutable (assoc-set! mutable 'self-alignment-X -0.5))
>      (set! mutable (assoc-set! mutable 'padding 4))
>      ;(set! mutable (acons 'padding 4 mutable)) ; this doesn't take--why
> not?
>      (set! props (list immutable mutable font-defaults))
> 
>      (interpret-markup layout props
>        (markup
>         #:fontsize -1
>         #:bold numsecs))))
> 
> { r1 \fermata
>   ^\markup \secs #"> 2\"" }
> %<------------------------------------------------------------

> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

[Prev in Thread] Current Thread [Next in Thread]