On Tue, May 1, 2018 at 11:03 AM, <lilypond-user-requ...@gnu.org> wrote:
> Send lilypond-user mailing list submissions to > lilypond-user@gnu.org > 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*" ela...@flaminghakama.com skype: flaming_hakama Producer ~ Composer ~ Instrumentalist -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user