[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convert Lilypond syntax to Scheme list
From: |
Thorsten Jolitz |
Subject: |
Re: Convert Lilypond syntax to Scheme list |
Date: |
Sun, 22 Jun 2014 10:34:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Thorsten Jolitz <address@hidden> writes:
>
>> I still wonder if there is a way to get my hands on this internal
>> representation without modifying the music notation, i.e without
>> writing
>>
>> ,----
>> | {
>> | \displayMusic { c'4\f }
>> | }
>> `----
>>
>> in my .ly files?
>
> The normal course of LilyPond is typesetting music. You can supplant a
> different init file if you want to have the Scheme engine do something
> different with the parsed expressions than what you actually wrote in
> the file.
>
> There are a number of hooks getting called when parsing particular parts
> of the input file. Take a look at lily/parser.yy to figure them out.
>
> The parsed expressions are not really the whole story.
ok, I see, the story is a bit more complicated ... simply wrapping
lilypond syntax in a displayMusic block in a program
,----
| {
| \displayMusic { c'4\f }
| }
`----
for producing the desired internal list representation then seems like
the best option. Thx.
>> But nevertheless, this is great ... Lisp rules ;)
>
> Scheme is not actually Lisp.
I still like it if it outputs parser information as nested lists to be
consumed by other lisps 'as-is' ;)
--
cheers,
Thorsten