lilypond-user
[Top][All Lists]
Advanced

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

Re: NR and allocating tweak command to variable


From: Colin Hall
Subject: Re: NR and allocating tweak command to variable
Date: Sat, 30 Mar 2013 09:28:39 +0000
User-agent: mu4e 0.9.9.5-dev6; emacs 24.2.1

David Kastrup writes:

> Nick Payne <address@hidden> writes:
>
>> I was trying to allocate a tweak command to a variable and eventually
>> managed to get it to work after finding what I needed by a search of
>> the lilypond-user archives (
>> http://lists.gnu.org/archive/html/lilypond-user/2011-09/msg00279.html).
>>
>> However, I was initially misled by the NR having a section named
>> "Using variables for tweaks ":
>> http://www.lilypond.org/doc/v2.17/Documentation/learning/using-variables-for-tweaks,
>> but this actually deals with using variables for overrides, and should
>> maybe be renamed as "Using variables for overrides".
>>
>> The code that I got to work is below:
>>
>> \version "2.17.14"
>>
>> fia = #(define-music-function
>>   (parser location grb)
>>   (ly:music?)
>> #{
>>   -\tweak script-priority #-199 -$grb
>> #})
>
> I'd use define-event-function instead, so that \fia can be used without
> a leading - before it.  I'd also use an argument of type ly:event? in
> order to just allow articulations as an argument type (there is no sense
> in tweaking the script priority of a basic music expression like a
> note).

Thanks for the report, Nick, and the advice, David.

I've created a doc tracker for this:

https://code.google.com/p/lilypond/issues/detail?id=3280

Cheers,
Colin.

-- 
Colin Hall



reply via email to

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