[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using guile to display music objects created in LilyPond
From: |
Carl Sorensen |
Subject: |
Using guile to display music objects created in LilyPond |
Date: |
Mon, 08 Nov 2004 22:25:04 -0700 |
Trying to display LilyPond music objects in the guile interpreter, and
following up on Nicolas Sceaux
(http://lists.gnu.org/archive/html/lilypond-devel/2004-03/msg00014.html):
I created a file fret-context-test.ly:
mymusic={d}
\score{
<<
\chords{\mymusic}
%\new FretDiagrams {d}
\chordmode{\mymusic}
>>
}
#(top-repl)
When I execute the file, it drops me into the guile interpreter:
address@hidden lilypond-files]$ lilypond fret-context-test.ly
GNU LilyPond 2.5.0.hwn1
Processing `fret-context-test.ly'
Parsing...
guile>
Then I try to copy what Nicolas has done:
guile> (define-module (*anonymous-ly-1*))
#<directory (*anonymous-ly-1*) f6aea420>
So far, so good. Now I want to see what's in mymusic, first as a scheme
object, then by pretty-printing.
guile> mymusic
Backtrace:
In unknown file:
?: 0* mymusic
<unnamed port>: In expression mymusic:
<unnamed port>: Unbound variable: mymusic
ABORT: (unbound-variable)
So it appears that guile doesn't know about mymusic, which was defined
in the lilypond file.
I can load the mus:display functions into scheme.
guile> (load "musdisplay.scm")
But when I try to display mymusic, I get
guile> (mus:display mymusic)
Backtrace:
In standard input:
6: 0* [mus:display ...
standard input:6:1: While evaluating arguments to mus:display in
expression (mus:display mymusic):
standard input:6:1: Unbound variable: mymusic
ABORT: (unbound-variable)
So again, it appears that guile doesn't know about mymusic, which is
defined in the lilypond file.
How can I make this work?
Thanks,
Carl Sorensen
- Using guile to display music objects created in LilyPond,
Carl Sorensen <=