The MIDI Forum

  Friday, 19 November 2021
  2 Replies
  1.4K Visits
I have been working on a project for a while. I am converting Super Nintendo (SNES) SPC audio files in to MIDI files, mainly using a program called spc2midi 0.023j

It creates the MIDI files by interpreting the input to the SNES sound chip (SPC700) in to MIDI data. An SPC file is a rip of a specific game's sound code and samples packaged to be playable in an audio player. This is not a direct 1:1 MIDI conversion, as the SPC700 uses custom sound programs per game, so spc2midi has to do some wizardry to get decent results, like running a FFT transform on the audio samples in an SFC file to make a best guess at the correct pitch for instruments. It also does its best to determine if a sound should be a melodic instrument (more than one pitch in the original file) or percussion (single, repeated pitch). Fortunately, many other things do generally match up, like volume control, attack, decay, and, perhaps very helpfully, the audio is placed on a maximum of 8 channels.

The process is not perfect, and the conversion software is old and hasn't been updated since 2004. I have to load each game audio file individually, make notes of which memory addresses each file uses for instruments, then cross-reference with the actual SPC file in my player of choice (Winamp, Timbres Of Heaven soundfont) to try to find a MIDI instrument that best matches up with the sound from the game. I have a spreadsheet of most of the games I wish to convert, with 7/13 complete for data. Some games the instruments need the pitch manually adjusted per track (one track the pitch might be fine, another might require a drop of 60 semitones). A few games I have a tossup between which instrument to use for a particular address. It has been a very time-consuming process. Each SNES instrument needs to be properly selected as MIDI instrument or percussion (not always correctly auto-determined), its attack and decay enabled, actual MIDI instrument assigned, pitch and/or volume set (if required), and the song length needs to be set for the export. Nothing can be saved as a preset for the next file, so it all has to be manually redone every time.

Now to the actual question:

** Recommendations on what I can do to clean up these files, and make them more presentable in a MIDI editor?

My current process will be as follows:
0 - Figure out all of the instrumentation
1 - Export MIDI file using spc2midi
2 - Repair MIDI file using Anvil Studio's repair option
This removes some unnecessary note off events, fixes some out of range values, and a few other things
3 - Delete all extra unused channels from the MIDI file in Anvil Studio

And that's what I have at the moment. The resulting files sound good, but they are visually not ideal for editing, as they do not line up to normal measures on a piano roll in an editor. I tried using Anvil Studio's "quantize" option, but it didn't seem to make a difference. There was a comment when I posted a work-in-progress file in a previous thread about an excessive amount of pitch bending, but that is inherent to the way that particular game sound engine was programmed, and may be a common "feature" of these files when they are finished.

This process also kicked off my desire to write my MIDI instrument changer, quattj's MIDI-MIS (which I started working on in March, and still have some work to do on, since I went back to work full time over the summer so it fell by the wayside. And my actual ORIGINAL intent was to write my OWN spc to MIDI utility, but then I learned what I didn't know :p ). I will be using my instrument changer to make further instrument changes on the "finished" files, as spc2midi can only assign GM instruments, and I have found I can get better results using GS or XG instruments. For example, many SPC tracks use a Euro Hit sound, which is only available on higher bank numbers in place of the standard Orchestra Hit, and some games will sound a lot better using alternate drum kits. (This will require me to finish my GS/XG SYSEX Reset insertion code)

I'm including a screenshot of spc2midi English translation (I'm using the Japanese version because it is newer) and my spreadsheet so you can see some of the process. The numbers on the left are the memory addresses of the instruments. The numbers in the grid are manual pitch settings. I'll also follow up with a set of MIDI files if I finish one of the games any time soon. I've included the first track from the game from the spreadsheet so you can see the current "end result" (both SPC and MIDI). When all is said and done, I plan on creating mp3s from the finished files and uploading them to YouTube, plus uploading the actual MIDI files (and maybe spreadsheet) on my Google Drive for other people to use/modify/enjoy.

If you are interested to see the inner workings of an SPC file, this player is very nice/accurate, and has a bunch of different display modes that can show you pretty much everything real-time, and you can visually see while it's playing how things can be interpreted in to MIDI.
with a huge archive of SPC files at

And if you want to get Super in to it (see what I did there??)
spc file specs
and SPC700 specs and reference
2 months ago
Ahh, and the "Tempo" in the spc2midi screenshot is actually the pitch.

And I would like to know how I can add a fade to the end of each MIDI file, as that option was never implemented in the converter, and most songs should fade out at the end.
2 months ago
Hmm, and it seems there is still an issue I need to work around for a few of the tracks (songs).

Some things have volume too low (track 7a) so pieces of the music are missing (tuba) because the volume ends up becoming zero. To compensate, I raised the volume of all the instruments to 70 in the converter, which until a short while ago seemed to be a good solution. I am finding now, however, that doing so loses many volume differences that SHOULD be present, because all of the volume levels now get pegged at max instead of having variation. I tried backing it off, but even back down at 30 some instruments are maxing out and being squashed, so losing dynamic range, and any lower and I lose that one instrument again. It appears to be a problem with the emulation that occurs in the converter. The missing tuba sound should be mostly center-balanced in the stereo signal, but only the left side makes noise on part of it, at maybe half volume of the other tuba part that plays properly.

Is there some way I can use an editor (and recommendations) on fixing this tuba part? I'm guessing I'd need to isolate the instrument somehow and boost the volume and pan the sound more to center only on that part.

I can mute all of the other instruments in the converter and have a MIDI file that only plays the tuba, but combining it back in to the other file is not something I think I am currently skilled enough to be able to do, unless perhaps I put it on a new track in the MIDI file?
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!