[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interactive Lilypond
From: |
Guido Amoruso |
Subject: |
Re: interactive Lilypond |
Date: |
Mon, 29 May 2006 11:26:57 +0200 |
Il giorno dom, 28/05/2006 alle 16.03 +0200, Nicolas Sceaux ha scritto:
> Guido Amoruso <address@hidden> writes:
>
> > 2. Creation of music expression. I'd like to be able to do something
> > like
> >
> > "(define music (parse-string "{c'' dd'}")"
> >
> > in order to build scores both interactively and programmatically. I
> > know there is "ly:parse-string", but I don't understand how it
> > should work. This would be sure interesting in non interactive
> > use cases, too.
>
> Look at scm/parser-ly-from-scheme.scm, where the #{ #} syntax is
> implemented.
> (define music #{ c'' dd' #}) should do it.
Thank you! I had not understood what "read-hash-extend" does...
Cool! :-)
Anyway, that does work from file only: in the interactive session it
segfaults, perhaps I'm missing some initialization, because
"(ly:output-def-parser $defaultpaper)" returns a Parser without a Lexer:
#<Lily_parser (no lexer yet) >
I'm getting the wrong parser? Or can I initialize the lexer, too? Can it
be fixed? Maybe I'm still missing something else...
Ciao,
Guido