Pd running MIDI to an ArduinoBoy controlling a Game Boy running trash80’s mGB software to generate triumphant RPG music in real time.
This simple(-ish) Pure Data patch generates four channels of MIDI, corresponding with the four channels of the Game Boy’s sound: two pulse waves (channels 1&2), a triangle wave (channel 3), and noise (channel 4).
The arpeggio on pulse channel 2 is just a simple sequencer, with some “echos” created with [pipe] objects. The “drums” are created by a sequencer triggering random notes on a sequence too.
The remaining channels are slightly more sophisticated. First, we select a rhythm for each measure, then trigger notes on pulse channel 1 at that rhythm. There are only five notes (from a hemitonic pentatonic scale), and each note has two or three possible harmony notes, to be played by the triangle channel.