Re: Using one identifier or another

2008-08-22 Thread Johan Vromans
[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

Re: Using one identifier or another

2008-08-22 Thread Gilles THIBAULT
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/

Re: Using one identifier or another

2008-08-22 Thread Johan Vromans
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

Re: Using one identifier or another

2008-08-20 Thread Gilles THIBAULT
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

Re: Using one identifier or another

2008-08-19 Thread Johan Vromans
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

Re: Using one identifier or another

2008-08-18 Thread Dan Eble
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

Re: Using one identifier or another

2008-08-18 Thread Johan Vromans
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

Re: Using one identifier or another

2008-08-17 Thread Dan Eble
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

Using one identifier or another

2008-08-16 Thread Johan Vromans
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