[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying to evaluate a music expression in scheme
From: |
Nicolas Sceaux |
Subject: |
Re: Trying to evaluate a music expression in scheme |
Date: |
Sat, 21 Jun 2008 12:33:22 +0200 |
Le 19 juin 08 à 05:44, Carl D. Sorensen a écrit :
[...]
I need to know the name of the function to call so I can write
something like this:
(load-predefined-diagram "\chordmode {c}" ((string-fret1) (string-
fret2) (string-fret3) (string-fret4)))
then
(let ((notes (this-is-the-function-I-need "\chordmode{c}"))
will return the same list of note events as is passed to determine-
frets, so I can use it as a hash-index
for writing the diagram to the hash table.
Does this-is-the-function-I-need exist? I have looked at
ly:interpret-music-expression, but this looks like
it's aimed at the top-level music expression. If the function does
exist, what is it called? If it doesn't, can
anybody give me a pointer as to where I might go to get some ideas
about how to create it?
Usually, one have access to LilyPond syntax from scheme code
using the #{ #} construct.
(let ((music #{ \chordmode { c } #}))
.. do something with music ..)
A `parser' object must exist where you use this code.
If this is not exactly what you're looking for, you may have a
look at scm/parser-ly-from-scheme.scm for inspiration.
Nicolas