e: Scheme question: symbol to music

2008-11-13 Thread Roman Stawski
[EMAIL PROTECTED] wrote: Roman Stawski <[EMAIL PROTECTED]> writes: Take a look at http://lsr.dsi.unimi.it/LSR/Item?u=1&id=493 Nice! Is there a way to get rid of the "warning: no such internal option: target"? I asked Nicolas Sceaux the same question when he helped me set this up. Apparent

Re: Scheme question: symbol to music

2008-11-13 Thread Johan Vromans
Roman Stawski <[EMAIL PROTECTED]> writes: > Take a look at http://lsr.dsi.unimi.it/LSR/Item?u=1&id=493 Nice! Is there a way to get rid of the "warning: no such internal option: target"? > This lets you have constructs such as > > \ifTargetIn #'(foo) { > ... > } A limitation is that it wor

Re: Scheme question: symbol to music

2008-11-13 Thread Johan Vromans
Graham Percival <[EMAIL PROTECTED]> writes: > Hmm. I guess I don't quite understand what you were asking; I > can't see why \tag wouldn't work. Using \tag requires that all the variables are defined, and the variables that need (not) to be processed must get a tag. leadWords = \lyricmode { S

Re: Scheme question: symbol to music

2008-11-12 Thread Roman Stawski
Johan This is the sort of thing I was playing with earlier on this year. Take a look at http://lsr.dsi.unimi.it/LSR/Item?u=1&id=493 This lets you have constructs such as \ifTargetIn #'(foo) { ... } In this case the symbols are switched on/off on the command-line but you could always change

Re: Scheme question: symbol to music

2008-11-12 Thread Graham Percival
On Wed, Nov 12, 2008 at 11:47:04PM +0100, Johan Vromans wrote: > Graham Percival <[EMAIL PROTECTED]> writes: > > > On Wed, Nov 12, 2008 at 05:28:37PM +0100, Johan Vromans wrote: > > > What I'm trying to achieve is to have input lines processed > > > selectively based on whether certain symbols are

Re: Scheme question: symbol to music

2008-11-12 Thread Johan Vromans
Graham Percival <[EMAIL PROTECTED]> writes: > On Wed, Nov 12, 2008 at 05:28:37PM +0100, Johan Vromans wrote: > > What I'm trying to achieve is to have input lines processed > > selectively based on whether certain symbols are defined. > > Umm, use \tag? I use this for other purposes: allMusic

Re: Scheme question: symbol to music

2008-11-12 Thread Johan Vromans
Nicolas Sceaux <[EMAIL PROTECTED]> writes: > A more idiomatic way to do it: Nice. This gives me the following snippet: % \ifDefined #'symbol % Returns the music expression defined by symbol, % or a void expression if symbol has not been defined. ifDefined = #(define-music-function (par

Re: Scheme question: symbol to music

2008-11-12 Thread Nicolas Sceaux
Le 12 nov. 08 à 05:48, Carl Sorensen a écrit : Johan Vromans squirrel.nl> writes: Stupic question, I assume... In a scheme function I have a symbol that is the name of a lilypond expression. How can I get its music value? E.g. ifDefined = #(define-music-function (parser location sym)

Re: Scheme question: symbol to music

2008-11-12 Thread Graham Percival
On Wed, Nov 12, 2008 at 05:28:37PM +0100, Johan Vromans wrote: > What I'm trying to achieve is to have input lines processed > selectively based on whether certain symbols are defined. Umm, use \tag? See "different editions from one source" in NR 3. Cheers, - Graham __

Re: Scheme question: symbol to music

2008-11-12 Thread Johan Vromans
Johan Vromans <[EMAIL PROTECTED]> writes: > Stay tuned, it'll get even better... If it would only work... What I'm trying to achieve is to have input lines processed selectively based on whether certain symbols are defined. For example, I have a file "highstaff.ly": \new Staff = High <<

Re: Scheme question: symbol to music

2008-11-12 Thread Johan Vromans
Mark Polesky <[EMAIL PROTECTED]> writes: > Wow! Someone should add this to the LSR! Stay tuned, it'll get even better... -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Scheme question: symbol to music

2008-11-12 Thread Mark Polesky
Wow! Someone should add this to the LSR! - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user

Re: Scheme question: symbol to music

2008-11-12 Thread Johan Vromans
Carl Sorensen <[EMAIL PROTECTED]> writes: > You need to use the procedure primitive-eval to evaluate a symbol YES! That's the trick. Thanks! -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-

Re: Scheme question: symbol to music

2008-11-11 Thread Carl Sorensen
Johan Vromans squirrel.nl> writes: > > Stupic question, I assume... > > In a scheme function I have a symbol that is the name of a lilypond > expression. How can I get its music value? > > E.g. > > ifDefined = > #(define-music-function >(parser location sym) >(symbol?) > >(if

Scheme question: symbol to music

2008-11-11 Thread Johan Vromans
Stupic question, I assume... In a scheme function I have a symbol that is the name of a lilypond expression. How can I get its music value? E.g. ifDefined = #(define-music-function (parser location sym) (symbol?) (if (defined? sym) ??? return the value of the expression ???