[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calling a music variable using a Scheme function
From: |
Valentin Villenave |
Subject: |
Re: calling a music variable using a Scheme function |
Date: |
Fri, 24 Jul 2009 10:37:11 +0200 |
2008/12/19 Nicolas Sceaux <address@hidden>:
> Your function does not work as you expect because it just returns an
> empty SequentialMusic. Only the return value of the music function gets
> "inserted" in the current music. Read scm/parser-ly-from-scheme.scm,
> function parse-string-result.
Hi Nicolas, and everybody,
sorry for reviving this discussion, but I'm still struggling with how
to automatically include music expressions using Scheme.
The following snippet doesn't work, for more than one reason;
nevertheless I hope you can see what i'm trying to achieve here, and
possibly give me a clue as to how to achieve it...
%%%%%
musicOne = { c''' }
musicTwo = { c, }
#(define mylist (list "musicOne" "musicTwo"))
includeList =
#(define-music-function (parser location listname) (string?)
(make-sequential-music (for-each
(lambda (x)
(let ((music (ly:parser-lookup parser (string->symbol x))))
(if (ly:music? music) music)
(make-music 'Music 'void #t)))
'listname)))
{
c \includeList #"mylist"
}
%%%%
Regards,
Valentin
- Re: calling a music variable using a Scheme function,
Valentin Villenave <=