When working on projects, I often let my mind stray toward future goals instead of staying focused on the immediate ones. Case in point: I started thinking about making a Tetris clone for my 6502 computer (once it has a video display). Naturally it would need music as well, since I’ve hooked up an OPL2 sound chip already. And of course, the music had to be the famous Tetris Theme (a.k.a. The Peddler).
The first step was to find some sheet music for the song. I found this, but MuseScore wouldn’t let me download it without registering for an account. I’m not about to do that. But, it’s pretty short, so I just entered it into my local install of MuseScore. Here it is for the curious:
And this is what it sounds like, in case you don’t remember:
Listening to this, I felt like it was pretty plain. I wanted to spice it up a bit. So, I added some drums (some tweaks were suggested by Donnett). Also, a retro video game shouldn’t sound like a piano. A square wave would be much more appropriate. With those changes, we get this:
That’s more like it! Much more fun to play Tetris to, IMO. But, it needs just a little bit more. Donnett has been teaching me some music theory, and I wanted to see if I could figure out what chords would sound good in a bass line. With one slight tweak from her (change first chord in second phrase to a 2 instead of a 7), I’m really happy with how it sounds in MuseScore (the chords start at 0:42):
For the musically inclined, here’s the updated sheet music and MuseScore files:
But we’re not done yet! Remember, the point of this whole exercise is to get it running on a 6502 computer with an OPL2 sound chip. To that end, I started looking at tracker programs. I found one called Adlib Tracker 2 that I liked pretty well, and set it up in DOSBox. It’s got a fantastic 90’s-era look, and it’s pretty powerful.
After a little learning curve, I was able to pick out some instruments, tweak them to get them sounding the way I want, and enter the notes. Here’s a video capture of the tracker playing the OPL2 version of my arrangement. (Note that the tempo is a bit slower. I didn’t notice when I was first doing this, but now listening to both speeds, I think I prefer the slightly slower version.)
The last step is to get this ported over to run on the homebrew machine. This was easier said than done. Eventually, I’ll probably write something to process the A2M file format created by Adlib Tracker 2, but this time, I used DOSBox’s OPL capture feature to capture a DRO file. Then I downloaded and compiled the utilities in the vgmtools github repository. It has two utilities I needed: dro2vgm, and vgmtrim. I had previously written a python script to extract the OPL2 commands I need from a VGM file. (By the way, vgmrips.net has a fantastic collection of music from old video games, using OPL2, OPL3, and many other chips.) So, finally, I have this song playing on my homebrew computer!
Pretty good for a 47-year old CPU!
Leave a Reply