[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Generative music" and "Algorithmic composition"
From: |
Paul Morris |
Subject: |
Re: "Generative music" and "Algorithmic composition" |
Date: |
Wed, 15 Jan 2014 12:22:28 -0800 (PST) |
SoundsFromSound wrote
> Paul, that is a great little bit of code! Thank you for sharing that...I'm
> going to play around with it later today. :)
Glad you like it, but David Kastrup gets the credit for it:
http://lists.gnu.org/archive/html/lilypond-user/2014-01/msg00638.html
I just changed it from a set of 12 chromatic notes to those in C major and
added \transpose. Maybe it's worth adding it to the LSR... hmmm... looks
like there's already a random note generator there:
http://lsr.dsi.unimi.it/LSR/Item?id=274
It generates notes in the current key from (middle) c' up to g''
Here it is after running convert-ly (from 2.14.0 to 2.18.0):
\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
(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 24))))
}
}
-Paul
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Generative-music-and-Algorithmic-composition-tp157896p157955.html
Sent from the User mailing list archive at Nabble.com.
- "Generative music" and "Algorithmic composition", Philip Rhoades, 2014/01/15
- Re: "Generative music" and "Algorithmic composition", Paul Morris, 2014/01/15
- Re: "Generative music" and "Algorithmic composition", David Kastrup, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", Philip Rhoades, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", David Kastrup, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", Philip Rhoades, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", David Kastrup, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", Philip Rhoades, 2014/01/16
- Re: "Generative music" and "Algorithmic composition", David Kastrup, 2014/01/16