lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need to generate mass quantities of random notes for practice


From: plasmacarwash
Subject: Re: need to generate mass quantities of random notes for practice
Date: Wed, 6 Jun 2007 14:41:42 -0700 (PDT)


Rune Zedeler wrote:
> 
> plasmacarwash wrote:
> 
>> I'm a newbie and I'd like to create a blithe score of quarter notes
>> purely
>> for practice from middle c up an octave and half to g.
> 
> This .ly outputs 256 random notes.
> It will produce the same 256 random notes each time you run it, but you 
> can create 256 new random notes by simply replacing the randomish number 
> at the top of the file with another.
> 
> 
> \version "2.10.0"
> \score {
> { #(let ((random-state (seed->random-state 1674234)))
>      (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)))))
> }
> }
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 





Glückwünsche! Rune.

I have to take a moment to acknowledge the unique give-and-take of this
forum and the help I've been getting around Lilypond already.

It compells me to get good at this.

Thank-you so much, everbody.

much love,

JWPeek










-- 
View this message in context: 
http://www.nabble.com/need-to-generate-mass-quantities-of-random-notes-for-practice-tf3850288.html#a10997827
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]