Janek Warchoł writes:
> I think this snippet may be interesting to you
> https://github.com/openlilylib/snippets/blob/master/input-shorthands/late-evaluation-of-variables.ly
It is, indeed... Thanks!
Now, why can this snippet not be found when searching for "lazy
evaluation" and "late evaluation
Josiah Boothby writes:
> Would not a more canonical way be to use tags? Not as elegant maybe,
> but:
>
> aaa = {
> \tag #'first { c4 d e f }
> \tag #'second { f4 e d c }
> }
>
> bbb = {
> a4 a a a
> s4*4
> b4 b b b
> }
>
> \score { << \bbb { s4*4 \keepWithTag #'first \aaa } >> }
>
On Mon, 20 Jan 2014 16:00:59 +0100
Johan Vromans wrote:
> Now I want to re-use bbb with a different value of aaa. Like a real
> variable as known from other programming languages.
>
> aaa = { c4 d e f }
> bbb = { a4 a a a \aaa b4 b b b }
> \score { \bbb }% a4 a a a c4 d e f b4 b b b
>
2014/1/20 Johan Vromans :
> In LilyPond terms, in
>
> namedMusic = { ... }
>
> 'namedMusic' is called a variable, identifier or macro.
>
> Normal LilyPond behaviour is
>
> aaa = { c4 d e f }
> bbb = { a4 a a a \aaa b4 b b b }
> \score { \bbb }
>
> This produces { a4 a a a c4 d e f b4 b b b
"Phil Holmes" writes:
> - Original Message -
> From: "David Kastrup"
> To: "Johan Vromans"
> Cc:
> Sent: Monday, January 20, 2014 3:23 PM
> Subject: Re: Variables as variables
>
>
>
>> That's not "like
- Original Message -
From: "David Kastrup"
To: "Johan Vromans"
Cc:
Sent: Monday, January 20, 2014 3:23 PM
Subject: Re: Variables as variables
That's not "like a real variable as known from other programming
language". If I write
aaa = 3
bbb =
Johan Vromans writes:
> In LilyPond terms, in
>
> namedMusic = { ... }
>
> 'namedMusic' is called a variable, identifier or macro.
>
> Normal LilyPond behaviour is
>
> aaa = { c4 d e f }
> bbb = { a4 a a a \aaa b4 b b b }
> \score { \bbb }
>
> This produces { a4 a a a c4 d e f b4 b b b }
In LilyPond terms, in
namedMusic = { ... }
'namedMusic' is called a variable, identifier or macro.
Normal LilyPond behaviour is
aaa = { c4 d e f }
bbb = { a4 a a a \aaa b4 b b b }
\score { \bbb }
This produces { a4 a a a c4 d e f b4 b b b } .
Now I want to re-use bbb with a different