> Music Algorithms > Generating > Random Rhythms | ||||||||
Random RhythmsMuch attention in these tutorials has been placed on the note pitch, however this demo explores aleatoric (randomly influenced music/art) note durations. To hear the result play this midi file. Click here to view or download source Humans are quite susceptible to changes in timing, and the apparent disorganisation of this random series of rhythms confirms this. To read a comprehensive background of randomness and automatic processes in music composition with computer check out chapter 10 "Automata" in Joel Chadabe's book "Electric Sound: The past and promise of electronic music." Prentice Hall, 1997. Lets have a closer look.
Lines 1-4 import useful packages that we need to use in the program.
In this section score, part, and phrase objects are declared.
24 notes are added to the phrase. Each note is of the same pitch (snare
drum for General MIDI instruments on channel 10) and MIDI channel.
The phrase is added to a part, which in turn is allocated
to the score. A score object is required for passing to the MIDI file
conversion class.
As with other jMusic demo files, this code creates a MIDI file from the
score. |
||||||||