Simple MIDI harmonizer in C major
One way to analyze MIDI note information is to use the modulo operator to determine a note’s pitch class (C, C#, D, etc., regardless of what octave it occurs in).
One way to analyze MIDI note information is to use the modulo operator to determine a note’s pitch class (C, C#, D, etc., regardless of what octave it occurs in).
This patch is one method of outputting a list of integers individually spread out over time. The iter object outputs each integer in the list one at a time. The trigger ‘b i’ sends the integer to the pipe which adds the specified time interval to the current value in the accum which changes the delay time of the next object sent to pipe. The patch could be easily adapted to work for floats as well.
This example demonstrates how to iterate through elements of a message with a delay interval.
This example demonstrates how to separate items in a formatted message.
The coll object allows one to store an indexed collection of messages of any type. In this example, each stored message is a list of five numbers that will be used as pitches of a chord. (Double-click on the coll to view its contents.) The chords are chosen at random, but they have been composed such that they all have a valid function in C minor, and because they are all five-note jazz chords voiced in a similar manner and range, stylistically any one of the twelve chords sounds reasonable following any other.
A chord can be described as a pitch class set. For example, a C dominant ninth chord is the pitch class set {0,2,4,7,10}. Depending on the octave transposition of each of those five pitch classes, many voicings of the chord are possible. This patch take applies a transposition of four, five, six, or seven octaves to each of the five pitch classes to create a random voicing of the chord.
Programming languages all provide some means of generating random numbers. Those numbers aren’t truly random, though. They’re what’s called pseudo-random. They’re actually generated by a known, deterministic process for generating a sequence of numbers, but that process generates a long series of apparently random numbers that doesn’t repeat for a very long time.