lilypond-user
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
variables for numbers
From
:
Flaming Hakama by Elaine
Subject
:
variables for numbers
Date
:
Thu, 10 May 2018 13:51:33 -0700
On Tue, May 1, 2018 at 11:03 AM,
<
address@hidden
>
wrote:
Send lilypond-user mailing list submissions to
address@hidden
I'm having difficulty understanding how to use a variable that stores a number, for use with a \raise command.
I have numerous markup definitions similar to this one:
sottoVoce = <>^\markup \raise #1.3 { \italic "sotto voce" }
mezzoVoce = <>^\markup \raise #1.3 { \italic "mezzo voce" }
{ \sottoVoce a'1 \mezzoVoce c''1 }
And I'd like to use a variable for the raise value, instead of repeating #1.3 for each definnition.
Here are three MWE's of failed approaches.
% The common sense approach
raiseDistance = #1.3
sottoVoce = <>^\markup \raise \raiseDistance { \italic "sotto voce" }
{ \sottoVoce a'1 }
% Based on the line-width example on
http://lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables
%{
myWidth = 60 % a number to pass to a \paper variable (the unit is millimeter)
Depending on its contents, the variable can be used in different places. The following example \paper {
line-width = \myWidth
}
{
c1
}
%}
raiseDistance = 1.3
sottoVoce = <>^\markup \raise \raiseDistance { \italic "sotto voce" }
{ \sottoVoce a'1 }
% Based on
http://lilypond.org/doc/v2.19/Documentation/extending/lilypond-variables
%{
twelve = 12
twentyFour = #(* 2 twelve)
%}
raiseDistance = 1.3
sottoVoce = <>^\markup \raise #(raiseDistance) { \italic "sotto voce" }
{ \sottoVoce a'1 }
Does anyone have either a suggestion for how to do this, or the appropriate place to RTFM?
The examples on
http://lilypond.org/doc/v2.19/Documentation/notation/substitution-function-examples
all are of functions that consume a value. There are no examples of using a variable that is a number.
Thanks,
David Elaine Alt
415 . 341 .4954 "
Confusion is highly underrated
"
address@hidden
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
variables for numbers
,
Flaming Hakama by Elaine
<=
Re: variables for numbers
,
foxfanfare
,
2018/05/10
Re: variables for numbers
,
Thomas Morley
,
2018/05/10
Re: variables for numbers
,
foxfanfare
,
2018/05/10
Re: variables for numbers
,
Flaming Hakama by Elaine
,
2018/05/11
Prev by Date:
Re: LilyPond and FontForge
Next by Date:
Re: shaped notes
Previous by thread:
FW: shaped notes
Next by thread:
Re: variables for numbers
Index(es):
Date
Thread