[Top][All Lists]

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

Re: Including tweaks in a variable

From: Jan-Peter Voigt
Subject: Re: Including tweaks in a variable
Date: Thu, 1 Mar 2018 16:42:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hello Michael,

it works if you add \etc to the variable (in lily-dev 2.19.x IIRC):
smNote = \tweak font-size #-2 \etc
That way smNote becomes a music-function that takes the note as argument and the tweak is applied.
If you are using 2.18 you have to create the function like this:
smNote = #(define-music-function (m)(ly:music?) #{ \tweak font-size #-2 #m #})


Am 01.03.2018 um 15:33 schrieb Michael Stickles:
This should be simple, but I just can't seem to get it to work.  I'm working on re-doing a lot of our church music, and use variables extensively to help make the .ly files more readable. There are a lot of places where one vocal part splits and we want the "secondary" notes to be smaller, resulting in code like this:

<f  \tweak font-size #-2  f,>1

What I want to do is replace the "tweak" section with a variable, like this:

smNote = \tweak font-size #-2

<f  \smNote  f,>1

But this results in errors:

error: unknown escaped string: `\smNote'
error: wrong type for argument 3.  Expecting symbol list or music, found #<Book>

(the "smNote" definition is at the end of the variables section, and the first line after the variables section is "\book {" )

Some online searching came up with a few suggestions, but none of them worked for me. Given that they worked for the original posters, I'd guess I implemented them incorrectly, but I can't figure out what I'm doing wrong. Ideas?

lilypond-user mailing list

reply via email to

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