|
From: | Rune Zedeler |
Subject: | Re: need to generate mass quantities of random notes for practice |
Date: | Mon, 04 Jun 2007 18:40:30 +0200 |
User-agent: | Thunderbird 1.5.0.10 (X11/20070306) |
Valentin Villenave wrote:
this is simply awesome! I just added it to the LSR, as other users might be interested.
Okie.Though, I would like somebody with rights to change the LSR (cc Graham) to replace the "randomish number" with (current-time) - so that the snippet reads
\version "2.10.0" \score { { #(let ((random-state (seed->random-state (current-time)))) (ly:export (make-music 'SequentialMusic 'elements (map (lambda x (let ((idx (random 12 random-state))) (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch (quotient idx 7) (remainder idx 7) 0)))))) (make-list 256))))) } }This way you get a different result each time you run lilypond. A bit more illustrative :+)
-Rune
[Prev in Thread] | Current Thread | [Next in Thread] |