- Generative music refers to music generated by a system or process that typically uses random procedures or algorithms. The term was coined by electronic music pioneer Brian Eno in the late 1970s to describe his use of a system to create ever-changing music.
- One way to get started composing generative music is to establish a constant pulse and selectively trigger musical events based on that pulse. To keep the programming examples simple, that is the approach we will take in the tutorial patchers that follow.
- In the patcher above, the metro object generates the constant pulse. The rate of the pulse is 4 bangs per second.
- The bangs from metro are sent to a random object, which generates a stream of random numbers (0-4).
- The random numbers are used as control data for a select (sel) object. If the random result is 0, a bang is sent out the 1st outlet of sel; If the result is 1, a bang is sent out the 2nd outlet; If the result is 2, a bang is sent out the 3rd outlet; If the result is 3, a bang is sent out the 4th outlet; if the result is 4, a bang is sent out the 5th outlet. In computer programming parlance, this logic is equivalent to a conditional if-then-else statement.
- The first four outlets of sel are mapped to MIDI pitch numbers that control the pitch inlet of makenote. The 5th outlet is not mapped to a pitch, essentially creating a rest. The five possible outcomes each have 20% chance of occurring.
- Although the pitch selections are random, the pitch mapping has been strategically constructed so as to provide a probabilistic musical logic of its own. The four pitches are the first four notes of a major scale on C4. Using a very limited range of the pitches guarantees a sense of proximity between the melody’s pitches. The use of a segment of a C major scale guarantees a sense of diatonic harmony.
- select (sel)