Randomization in Music

Generate rand0m melodies, then make a song out of it.

"Randomization in Music" is a ongoing (really old) project to create music out of random numbers and sequences,
by Jansen Price.

Since this is ongoing, I plan to have this page updated regularly with different randomization schemes, sample sound files, and occasionally executable files (programs that I use to generate random music).

I. Random Melody Maker

In 1998, I wrote a program in basic to create random songs with varying frequencies (pitches) and note length. The user is asked to enter a melody seed (The randomization seed). The range of the seed can be from -32768 to +32767. The so called "melody seed" is in effect a lookup index for the melody, and a user can reproduce a melody by entering in its melody seed number. The first note of the composition is a frequency ranging from 132 Hz to 1999 Hz. The rest of the notes in the song are chains of intervals either up or down from the previous note.

The randomization sequence works as follows: As stated above, the first note is randomized between 132.00 Hz to 1999.00 Hz. The remaining notes in the are determined by randomization in the following manner: A random number is generated between 0 and 7. If the number is 0 or 1 the next note is raised or lowered a by a semitone, respectively. The numbers 2 and 3 correspond to two semitones up or down respectively. A 4 or a 5 correspond to four semitones up or down, and a 6 or a 7 corresponds to five semitones up or down. If the resulting note reaches below 132 Hz, then the note is automatically raised by 500 Hz. If the frequency of the note is greater than 1999 Hz, then the note is lowered by 1500 Hz.

(A screen shot for random melody#4511)

The next random number in the sequence is a number ranging from 0 to 55, and determines the duration of the note. The duration of the note is measured in system clock ticks (SCT) and there are 18.2 ticks per second. A number 0 to 50 corresponds to the note length remaining the same as the last note. A 51 makes the note length change to .5 (SCT). A 52 or 53 changes the note length to 1 (SCT). A 54 changes the note length to 3 (SCT) and a 55 changes the note length to 7 (SCT).

This pattern repeats over and over for exactly 60 seconds. Thus, every song created by the random melody maker is exactly one minute long. The song information is displayed on the screen in a graph with frequency as a function of time. The colors in the graph correspond to the note lengths. Output is presented through the internal computer speaker in a sinusoidal wave. Since there is no written output for any given song, there is no immediate way to reproduce the songs, other than running the program.

Samples of Random Melody Maker Compositions:

Sorry! The samples are missing!

Song TitleListen

II. Lasi Tuteyrum

Later, in 2001, I made another random melody creator called Lasi Tuteyrum. Lasi Tuteyrum means literally 'number song' in AkeUngan, but now the phrase is taken to mean specifically this particular type of random melody.

This program follows the same idea as Random Melody Maker, where each song has a unique index number which corresponds to the randomization seed used to generate the random numbers. There are a few added features to Lasi Tuteyrum, which I consider make it to be superior over Random Melody Maker. In Lasi Tuteyrum, the user can specify what scale type the song will use from the following choices: Key, Chromatic, and Cho Popala. Key means that a major scale will be used, and there are 8 possibilities for the note values: do re mi fa sol la ti do. (0 is do, 1 is re, and so forth.) The user can also specify the tonic for the song. The tonic does not change the actual values for the notes in the melody, so the song 6734, for example will be the same if the tonic was C or if it was F#. The Chromatic setting means that instead of the eight values as in Key, but all twelve tones of the chromatic scale are possibilities used to generate the random melody. The Key Base in this case will simply specify the tone that starts out at value 0. Cho Popala is a Russian phrase that roughly means 'Whatever happens' (I used Russian simply because I could think of no other term that adequately describes this setting). With the Cho Popala setting, a random frequency is chosen for the tonic and the scale is made up of non-Western (Random) intervals.

The other extra features about this program, comparing with Random Melody Maker, is that the song is output in numbers on the screen so one can write down the song and play it elsewhere on a musical instrument, etc. With the exception of the Cho Popala scale, the numbers refer to specific note values. For Key, 0 = tonic(do) and 1 through 6 correspond to the notes re through ti. (7 = do one octave higher). For Chromatic, again 0 = tonic and the remaining numbers 1 through 12 correspond simply to half steps increasing from the tonic (1=di, 2=re, 3=ri, etc.)

The above image shows an example output for Melody index number 78454. The numbers in rows are the melody's notes. I will use this example to further explain the features of Lasi Tuteyrum. The output screen first displays the Index number that was typed in (78454). The next number is the number of verses in this song (a random number that is different for each seed). A verse in Lasi Tuteyrum simply means a line (but it can be repeated more than once). The next number generated is the number of beats per line. This number can range from 1 to 12. In this example there are 5 beats per line. The next number generated refers to the note length. I did this simply to give variety to the different melodies, but it is a characteristic that can be changed in executing the song with the musician's own personal interpretation. Lastly, you will notice a number preceding the dash on every line. This randomly created number specifies how many times the line is repeated to make one verse. (So the first verse is the line 5 1 0 7 5 repeated twice.)

A bit about musical liberties of the musician: I mentioned that the note lengths are subject to change depending on the choice of the musician. The main idea behind Lasi Tuteyrum is to give a song a backbone or skeletal melody which then can be worked with in order to give influence for additional songs. Musical liberties affecting changes in any Lasi Tuteyrum melody is acceptable and in fact perhaps needed. These changes I call Embellishments to Lasi Tuteyrum. Further information on this subject will be addressed later on in this project.

When Lasi Tuteyrum executes, the program prints the song info to the screen and plays the song three times, just so you can hear it more than once to see if you like it. A new instance of the program must be run in order to hear additional (or a repeat of the same) melodies.