Some technical details
The core of the Max patch is a couple octaves of notes from the Mixolydian scale, represented as MIDI values. Once the toggle at the top is activated, it starts [metro] objects which act as pulsing timers, outputting "bangs" (or instructions for action) at various intervals. The timing of the main [metro] object is randomized by the other [metro] and [drunk] objects to its right.
Every time a "bang" is emitted by [metro], the [urn] object spits out a random number within the range of all possible MIDI note values (0-127). By design, [urn] only picks each number in its set of values once. After all values have been chosen, [urn] will reset and continue choosing random numbers.
The various [sel] objects act as filters, and only allow numbers within the specified scale through. The numbers that make it through are used as the MIDI note to be played. Each time a note is chosen, a randomized velocity (how hard the note is played), and note length are selected as well. All of this is then sent as MIDI data out, for instruments to respond to (in this case Logic Pro's Sculpture modeling synthesizer, run through Waves Enigma).