|
From: | Philip Rhoades |
Subject: | Re: "Generative music" and "Algorithmic composition" |
Date: | Thu, 16 Jan 2014 22:36:16 +1100 |
User-agent: | Roundcube Webmail/0.9.2 |
David, On 2014-01-16 18:08, David Kastrup wrote:
Philip Rhoades <address@hidden> writes:\version "2.18.0" \score { { $(let ((random-state (seed->random-state (current-time)))) (make-sequential-music (map (lambda (x) (let ((idx (random 12 random-state)))(make-event-chord (listYou can forego the above two lines (of course removing the respective closing parens later on) nowadays.(make-music 'NoteEvent 'duration (ly:make-duration 2 0 1/1) 'pitch (ly:make-pitch (quotient idx 7) (remainder idx 7) 0)))))) (make-list 24))))Ok, make-list is a tad-bit more basic and efficient than the iota I employed.I get a GUILE error on line 5 $(letI don't. Copy and paste error?$@(letbut that didn't work either (obviously I don't know what I'm doing . .)Obviously. $ splices a single expression (which is what make-sequential-music produces) into LilyPond, $@ splices a list of expressions.
I recopied and pasted the whole snippet - which gives the same result as right-click and save.
The original has: #(let . . http://lsr.dsi.unimi.it/LSR/Item?id=274 but I get a GUILE error on that too . . Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: address@hidden
[Prev in Thread] | Current Thread | [Next in Thread] |