So one of my projects for 2020 was going to be doing a stream of a nuzlocke run of Pokemon Shield. I was then going to take the stream videos and edit them to more polished videos. The pandemic both put recording sessions as well as me working on the videos on hold, but nonetheless, I have three of them out as of writing, and you can go to my YouTube channel if you'd like to watch.
The real reason I wanted to do this video was to have an excuse to write music for it. I decided to write chiptune covers of famous British music. This led me to do something incredibly clever combining programming with music. I have just discovered this was a complete waste of time.
So to begin, while I am not being very rigid with emulating the limitations, I am aiming to make the covers sound like the DMG sound chip of the original Game Boy, which the first Pokemon games were released on. This chip, like most chips of this era, only supplied 4 independent channels, each with a limited type of waveform supported. There were two pulse channels that played square waves, a wave channel that could play wavetable and/or samples, and a noise channel that made pseudo random noise.
This is rather limited. The song I picked, 500 Miles (I'm Gonna Be) by the Proclaimers, has 7 "tracks" in my transcription of it, though I only chose 5 of them to represent in my version. There's a strummed rhythm guitar, two vocals, a bass, and the drums. But since 5 is more than 4, I need to do some tricks to fit everything. And there is a particular trick chiptunes did and do to emulate multiple notes being played at the same time. They played the notes separately, but really fast one after each other. That is, fast arpeggios.
Now, I don't particularly want to actually implement this by writing assembly for the Game Boy, so I am using by using a VST instrument that emulates the chip. The instrument I was using, Plogue's chipsounds has a lot of different features, but the one I settled on was the wave sequencer. It basically lets you kick off a program of notes when a note is pressed.
So for the strummed guitar, which was playing simple power chords, which are made up of a root note and the note 7 semitones above it, the fifth, it would play those two notes very quickly when the note was started in the midi file. This was the case throughout the entire song (or rather there are some non-power chords, but so few I decided to just ignore them), so I could program this into chipsounds by hand easily.
But the other tracks I was going to do this for, the two vocal tracks would require more work. The power chords were always the same intervals, but the two vocal tracks varied intervals and in fact, didn't always sing solo or always sing harmony. It's kind of the main gimmick of the song, the two brothers singing call-and-response interspersed with harmony.
I could by hand go through and categorize every interval, but instead I decided that while I was not going to write assembly, I could write a little C# to do it. I used Dry Wet MIDI a library that lets you read in MIDI files and use C#'s LINQ features to query the events within them as well as write new MIDI files.
My program went through the two vocal tracks, finding all the times in the song when the two vocals are in harmony. It determined the interval of the harmony, and then figured out how big a range of notes hit that harmony. Then for each interval, it reassigned those notes to a different range of MIDI notes. So each unique interval was reassigned to a different range of the MIDI notes.
For example, fifths (7 semitones between notes) got pushed up 4 semitones above the root note, stretching from MIDI note 60 to 65. My program would tell me this by creating a file describing all of this, that I could then program into chipsounds's wave sequencer: for the notes from 60 to 65, play them 4 semitones higher than notated, and arpeggiate between the root and the note 7 semitones above that.
This worked like a charm, you can hear the final results in the second and third videos. I was even looking into doing them for more complicated harmonic songs where there were more than 2 notes at the same time.
Yesterday, a friend pointed out that chipsounds has another feature, the arpeggiator. It literally takes in the MIDI notes and arpeggiates them if there are multiple notes. No programming necessary.
Well, I still feel it was still pretty clever ignoring that.
