Using Max to Create Random Music

From vjmedia

I used logic and random number generation to create randomized music. While making entirely random music can be useful, I focused in on a simple musical idea that could be easily programmed. I used the base six chords as a base for the song: I, ii, iii, IV, V, iv. the order of which was determined by logic as well as by RNG. The I can go anywhere, ii to V, ii to iv, iv to I or V, V to I, and iv to ii. The chords always have the third, but the fifth, octave, and third an octave up each have a 50% chance of being played. The melody on top is based on the chord being played, either playing a C note, or a part of the chord at any given time.