Hello David,
Am 05.01.2012 13:50, schrieb David Kastrup:
Ah yes. ly:parse-file does not help either?
yes it does, thanks ... but ...
--snip--
#(define-public includeLoc (define-music-function (parser location
file)(string?)
(let ((outname (format "~A.ly" (ly:parser-output-name parser)))
(locname (car (ly:input-file-line-char-column location))))
(if (or (string=? outname locname)(string-suffix? outname
locname))
(ly:parse-file file))
(make-music 'SequentialMusic 'void #t))))
--snip--
I nowadays store the music in a scheme structure saved as a singleton in
a self-made module. If the included file refers to this singleton, the
music will appear ... great!
Before this, I created variables
--snip--
music = \relative c' { c4 e g c }
\includeLocal "test-music.ly"
--snip--
and used a file
--snip-- (test-music.ly)
{ \music }
--snip--
This does not work ... the var "music" is not known in the file included
with ly:parse-file.
There has been a function ly:parser-parse-file in 2.12 - and if my
memory doesn't trick me, there has been discussion on devel why and how
to remove it.
This might or might not have been useful in this context.
So a question remains: How could I carry defined variables between
inside-outside ly:parse-file ?
Cheers,
Jan-Peter
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel