[Quoting Gilles THIBAULT, on August 22 2008, 18:11, in "Re: Using one identi"]
> Sorry i don't really understand this parser behaviour but i only
> know i have to care with it ...
Ah, that's something I understand...
The parser compiles the first expression:
aNotes = \relative c' { c1 e g }
N
aNotes = \relative c' { c1 e g }
#(define dummy #f)
#(if (not (defined? 'bNotes))
(define bNotes aNotes))
\score {
\bNotes
}
When the 'define dummy' is removed, it doesn't work anymore.
The doc say it is due to "parser lookahead" :
http://lilypond.org/doc/v2.11/Documentation/
Johan Vromans <[EMAIL PROTECTED]> writes:
> Dan Eble <[EMAIL PROTECTED]> writes:
> aNotes = \relative c' { ... }
>
> %%From template:
> \score {
> #(if (not (defined? bNotes))
> (define bNotes aNotes))
> \bNotes
> }
>
> The intention is clear, but LilyPond/Scheme refu
Meanwhile, I'm still struggling with the easy task of using one
identifier for another:
aNotes = \relative c' { ... }
%%From template:
\score {
#(if (not (defined? bNotes))
(define bNotes aNotes))
\bNotes
}
The intention is clear, but LilyPond/Scheme refuses to compile it
Dan Eble <[EMAIL PROTECTED]> writes:
> I have a framework for creating collections of many short pieces.
> [ ... ]
A very interesting approach, and very illustrative for the powers of
LilyPond programming! I learned a lot from your examples.
Meanwhile, I'm still struggling with the easy task of
Johan Vromans squirrel.nl> writes:
>
> Dan Eble faithful.be> writes:
>
> > These two functions should help.
>
> Thanks! I can use this.
>
> > You will either need to define your optional music to be empty when
> > it is not required, as in this example, or provide a function to
> > create em
Dan Eble <[EMAIL PROTECTED]> writes:
> These two functions should help.
Thanks! I can use this.
> You will either need to define your optional music to be empty when
> it is not required, as in this example, or provide a function to
> create empty music if it is not already defined.
I would be
Johan Vromans squirrel.nl> writes:
>
> Hi,
>
> In a template file I want to check if a particular identifier has been
> defined, and act accordingly.
These two functions should help. (Suggestions for improvement would be
appreciated.) You will either need to define your optional music to be
Hi,
In a template file I want to check if a particular identifier has been
defined, and act accordingly.
For example:
\score {
\allMusic
\layout {
}
}
\score {
\unfoldRepeats \allMusic
\midi {
}
}
In the MIDI block, I would like to use identifier allMusicForMID