The Riff Generator/Harmonizer
Jacob Wittenberg
How it works:
The Riff Generator/Harmonizer reads and interprets MIDI information. When a player strikes a note on the keyboard, the program takes in the note pitch and velocity. Then, based on pre-programmed riffs and harmonies, the Riff Generator/Harmonizer plays what the artist has already programmed. The current version of the program only allows for two different riffs to be preprogrammed; if you hit a note very hard (>126 in MIDI), it triggers one melody, while any velocity less than that causes the program to play a different harmony.
Due to my programming deficiencies, I was unable to make the Riff Generator a harmonizer entirely in one chuck program. As is such, depending on how layered you want the harmonies to be, you must simultaneously run up to 5 chuck programs. Each one is a transposed version of the others to create parallel, but tonally different, lines.
In this manner, the Riff Generator/Harmonizer can be used to enhance performances for pianists or other instrumentalists with MIDI capabilities.
The Code:
(Note: the code is currently preprogrammed with specific riffs. These are very easy to change. Also, ideas from sample code were used and modified)
finalcode.zip (Click to download)
Current Program:
Right now, the program is designed
to play two different riffs. If
you hit the keyboard lightly, it plays a sequence of 10 notes ascending in
fourths and chromatics. By
striking the note harder, it plays a diminished progression that resolves in a
jazzy fashion. It would be best
used in a II-V chord progression.
© Jacob Wittenberg 2009