Recently, I released spc2midi-tsuu, an open-source SPC-to-MIDI converter.
spc2midi-tsuu converts SNES SPC sound files to Standard MIDI Files (SMF). It is strongly inspired by the classic spc2midi by GIGO and Hill. I respect the original spc2midi very much, but I wanted to make a new converter with a workflow that makes MIDI editing easier. VGMTrans is also an excellent tool, but for SPC files I wanted to explore a different conversion approach, especially around pitch slides and the MIDI editing workflow.
spc2midi-tsuu is based on SPC playback emulation and focuses on MIDI editing, especially easier MIDI program assignment.
The tool is open source and available here: removed link
Please note that spc2midi-tsuu does not provide or distribute SPC files, ROMs, commercial game data, or converted MIDI files.
Questions, suggestions, and bug reports are welcome.
😍😍😍
I will definitely be testing this out as soon as I can. If you haven't read this forum, I've been using spc2midi since early 2021 for my SNES MIDI Remaster Project.
As you probably know, it was never finished and has many issues with the exported MIDI files. A huge chunk of time spent on this project is figuring out how to correct the problems to get good sounding playback.
I even considered writing my OWN version of spc2midi, but don't have nearly enough knowledge about the inner works of the SPC700 to properly interpret the inner workings of the SPC files.
This is a very promising development, and I can't wait to try it out!
A couple of comments so far:
- Having the sample hex IDs like the classic spc2midi will be beneficial for visually identifying which instruments are currently playing in the GUI. I've built a collection of spreadsheets for the soundtracks I have completed and many that I plan to do. The hex IDs mostly carry between all of the songs in a soundtrack, making it much easier to see at a glance which instruments each song will be using. I see "3BC9" in this particular soundtrack? Chances are it will be "instrument X". I do see the hex IDs when clicking the EDIT button for a channel, but for channels with multiple instruments, edits to the channel often are being applied to the wrong instrument, and similarly, clicking edit for the channel will bring up different instruments if the instrument changed since last time clicking the channel edit. (I think I didn't understand how it was laid out at first and may have accidentally clicked the wrong edits)
- Related to this, a build-up list of instruments in the files will also be helpful, again like the classic spc2midi. It will add instruments to the list as it encounters them during playback. (Again I misinterpreted some of the layout... old habits...)
- MIDI instrument names should also include the patch number. Currently they are all listed in order by number, but only show the name. I'd like to be able to type instrument numbers to jump straight to them in the list.
- I'd like to be able to click a channel in the bottom section to open the edit for that instrument as well
- Scrollbars may be needed in areas where the visible items take up more space than available
- I scrolled in the instrument selection list with the keyboard, and the list does not follow the selection, so the selected item was eventually not on screen
- An option to restart the song without losing edits will be beneficial, especially on short songs or songs that have an intro bridge that does not repeat
- Perhaps having a "quick instrument" dropdown on the main window would be good. For what I am doing, I'd like to be able to set default options for most things and then for most future work just quickly set instrument patches without needing the full edit window. One thing that I do like about classic spc2midi is that the window is very compact
- An output file time length option is a must! And perhaps a "output this many loops" option? I generally do two loops, manually cut from a 5 minute export, and then need to manually add a 10-second fade out on the end.
Things that I really like so far:
- Being able to play both the MIDI and the SPC in the same program is very nice! I typically need to use both spc2midi and spcplay simultaneously and try to line things up by clicking at just the right time.
- I like the dynamics display in the lower right (though I haven't figured out what all of the symbols mean 😆 ) My guess is it is trying to use a font I don't have? I'll include a screenshot. I have things like a fish, a christmas tree, a flower...
- I like the quick mute/solo options
- I like the toggles for SPC and MIDI playback. Possible to add that for each channel?
There will be more feedback as I have some more time to mess with it. I have not yet analyzed to contents of the single file I exported, and I haven't yet tried any files with percussion.
I'm very happy that you have decided to work on this project! I wish I knew about it sooner 😀
I'm currently looking at the internals of the resulting MIDI file.
After some tweaking of octaves in my editor to match what I was already working on previously, I have to say it sounds pretty darn good.
- I do see that you have not included the GM System On SYSEX, perhaps that can be an option.
- Classic spc2midi also applies a reverb and chorus that you presently do not write to the MIDI file. Can those be added as well? I've completed 13 soundtracks thus far started with classic spc2midi, and would like to keep my releases fairly consistent.
- It may just be a fluke of this particular song, but the first note in each track does not have any sort of pitch bend until partway through. Can you check on that and see if it is accidentally being left out?
I also note that for expression, you are only using the MSB value, which I think is actually beneficial, since most devices ignore the LSB value. By not including it, the number of MIDI commands in the file drops quite a bit reducing both file size and data that would need to be transferred/processed in a live MIDI environment.
Using your new spc2midi-tsuu vs the classic version instantly eliminates some of the repetitive tedium at the start of each new soundtrack, including re-configuring my MIDI setup every time I start spc2midi, as well as then having to load each file in Anvil Studio to convert to MIDI type 1 and then manually delete all of the unused tracks/channels.
Another thing that I really like so far is that the resulting file is a much higher resolution than classic spc2midi. It typically creates files with 31.5 BPM, which some editors can not properly handle. Your version, with my test file, is doing 240 bpm which should give much finer control.
And final observation for now, your pitch bends and volumes seem to be more accurate. Classic spc2midi does all pitch bend in increments of 50, no matter what. It also has very strict step levels of volume that don't always work out well, especially with lower volume levels. Yours seem to be ... normal!
I'm including both versions of the file I tested out.
The "classic" version has undergone a significant amounts of post-conversion work. It has been loaded and saved with my editor after various other edits and such. (not the final version)
The "tsuu" version was exported, and all I've done is loaded it with my editor, converted to GS, and changed patches and adjusted octaves on a few instruments (all of which were also done on the classic version).
First of all, thank you very much for your detailed comments and feedback!
- An output file time length option is a must!
You can change the SMF output length from the "Option" menu > "MIDI Output Configuration". You can also change the BPM there.
Please note that automatic loop-length detection for arbitrary SPC files is extremely difficult, so for now, please set an appropriate output length manually in the configuration.
- MIDI instrument names should also include the patch number. Currently they are all listed in order by number, but only show the name. I'd like to be able to type instrument numbers to jump straight to them in the list.
- I'd like to be able to click a channel in the bottom section to open the edit for that instrument as well
I agree with these ideas! I added these features in spc2midi-tsuu version 0.2.41. Could you try the new version?
- Having the sample hex IDs like the classic spc2midi will be beneficial for visually identifying which instruments are currently playing in the GUI.
Thank you for pointing this out. As you mentioned, the hex IDs in classic spc2midi appear to represent the starting address of each wave sample. I will consider showing this hex ID in the GUI, possibly together with the current SRN display.
- An option to restart the song without losing edits will be beneficial, especially on short songs or songs that have an intro bridge that does not repeat
- Perhaps having a "quick instrument" dropdown on the main window would be good.
Thank you for these useful suggestions. I will consider adding these workflow improvements in a future release.
- I do see that you have not included the GM System On SYSEX, perhaps that can be an option.
That makes sense. I will consider adding an option to insert GM System On SysEx into the exported MIDI file.
- Classic spc2midi also applies a reverb and chorus that you presently do not write to the MIDI file. Can those be added as well?
Thank you for pointing this out. spc2midi-tsuu currently has an "Echo as Reverb" option, but it may not behave the same way as classic spc2midi. I will check the current reverb output behavior and consider adding a chorus send option in a future release.
- I like the dynamics display in the lower right (though I haven't figured out what all of the symbols mean 😆 )
The dynamics display is intended to show numeric information, so if it is showing symbols such as a fish, a Christmas tree, or a flower, that is probably a font or rendering issue in my tool. I will check the implementation of the dynamics indicator.
- I scrolled in the instrument selection list with the keyboard, and the list does not follow the selection, so the selected item was eventually not on screen
- Scrollbars may be needed in areas where the visible items take up more space than available
Thank you for reporting this. The keyboard scrolling issue appears to be a UI bug in the current tool.
For the scrollbar issue, could you tell me which part of the UI needs a scrollbar? For example, is it the instrument selection list, the edit window, or another area?
- It may just be a fluke of this particular song, but the first note in each track does not have any sort of pitch bend until partway through. Can you check on that and see if it is accidentally being left out?
This may be a bug. I will check whether the initial pitch bend before the first NoteOn is accidentally being omitted. If possible, please tell me the SPC/song name and the track/channel where you noticed this behavior.
Thank you again for the detailed feedback. It is very helpful for improving spc2midi-tsuu.
Thanks again for your many useful comments and suggestions.
I have released version 0.2.49, which includes the following features and fixes based on your feedback:
- Added hexadecimal sample IDs to help identify each BRR sample. The sample display now defaults to the hex address format, and you can click the sample label to switch between the hex address and SRN display.
- Added a quick instrument selection dropdown near the top of the main window.
- Added an option to insert a MIDI reset SysEx at the beginning of the exported MIDI file. GM1 System On, GM2 System On, GS Reset, and XG System On are supported. The default is None.
- Changed the font used for the numerical dynamics display to avoid the symbol-font issue.
Could you check whether these features work as you expected? Please let me know if you have any questions or if something still does not behave correctly.
The following features are not implemented yet, but I will consider adding them in a future release:
- Reverb and chorus output
- An option to restart the song without losing edits
I will also continue investigating the following issues:
- The instrument selection list does not scroll to follow the selected item when using the keyboard.
- Scrollbars may be needed in areas where the visible items take up more space than available.
- The first note in each track may be missing an initial pitch bend value.
Thank you again for the detailed feedback. It is very helpful for improving spc2midi-tsuu.
You can change the SMF output length from the "Option" menu > "MIDI Output Configuration". You can also change the BPM there.
Ahh, I missed seeing this the first time around. Perfect!
I've tested out v 0.2.46
Scrollbars are now exactly where needed, instrument numbers are great, clicking instruments with dropdown list is great, clicking in the bottom to edit is great!
I also see the added MIDI target mode, which is also nice, and the values in the lower right are now numbers instead of symbols.
Thank you for responding with updates so quickly, and thank you for making this program 🤩
Two further things:
Can you add a config file so settings can be saved between sessions?
The Device Settings for Audio Output do not appear to match what Windows lists. See attached screenshots. The very first time I loaded the previous version, I was not able to get any MIDI output until I quit and reloaded, and it has worked fine ever since. I do get output now, just the names do not match. Not sure if that would be an easy fix.
This may be a bug. I will check whether the initial pitch bend before the first NoteOn is accidentally being omitted. If possible, please tell me the SPC/song name and the track/channel where you noticed this behavior.
The file I tested with is 12 Ice Forest.spc from the Super Ghouls and Ghosts archive at
https://www.zophar.net/music/nintendo-snes-spc/super-ghouls-n-ghosts
From best I can tell, classic spc2midi does have some bend before all of the starting notes. It creates type 0 files, so it's a bit hard to figure out in text form since they are all mixed together.
A few more comments after testing a little more, now with 0.2.49 (now with hex display, yeay!),
Can you change typing the number in the instrument list to jump to it rather than filtering? It is tricky if you type the wrong number and just need to go up or down one.
Can percussion in the list have either an indicator or different color background?
I've tested track 4 of the same soundtrack, 4 Haunted Graveyard.spc, and a lot of the notes near the beginning never stop playing. Upon further investigation, I've noticed that the "expression" option has vanished from the config setting, and now it is also gone from the previous release? The outputted files no longer contain any expression, and it has vanished from the previously downloaded 0.2.39. Oops, I didn't realize it was in the individual instrument configuration. A default set of settings for the individual configs would be something that would be good to have in the config file. For example, I'll always want the expression option on (though other people may not). I haven't messed around with some of the other individual options yet to see what kind of effect they will have.
Rather strange. In 4 Haunted Graveyard, the string notes never seem to stop when they should. I've run both files exported from your spc2midi-tsuu and the previous file I have been working on. I don't see anything inherently different that might cause this to happen. I tried manually editing various things, like including all of the various initialization controllers (poly mode on, all notes off) and adding in the reverb and chorus controllers, as well as changing all note off commands to use a volume of 20 instead of 0, yet nothing seems to make a difference. I also tried manually changing the BPM and resolution before xporting, and that didn't see to have an effect either 🤔
Copies of two versions included in case anyone else can figure out why it might be happening. I tried playing back using Winamp (CoolSoft VirtualMIDISynth) and MIDIPlayer (BassMIDI VST) both with the same results.
Can you add a config file so settings can be saved between sessions?
spc2midi-tsuu can currently save and load per-song conversion settings as a JSON file (you can save from the "File > Save JSON..." menu), including program assignments. However, it does not yet have an automatic global config file for application settings between sessions.
Also, please note that the JSON format is not yet guaranteed to be stable, so files created by older versions may not always be compatible with newer versions.
The Device Settings for Audio Output do not appear to match what Windows lists.
Thank you for pointing it out. I changed the names of the displayed audio output devices in version 0.2.52. Could you check whether the names now look correct on your system.
From best I can tell, classic spc2midi does have some bend before all of the starting notes. It creates type 0 files, so it's a bit hard to figure out in text form since they are all mixed together.
Thank you for checking this.
Classic spc2midi appears to emit pitch bend values at or before some NoteOn events in order to tune the note pitch. spc2midi-tsuu takes a different approach: it internally estimates the pitch as a fractional MIDI note number and tries to choose the closest MIDI note as the base note. Therefore, in some cases, a constant initial pitch bend is not needed.
However, if the first note really needs an initial pitch bend value, it should be emitted before or at the NoteOn. I will keep checking whether spc2midi-tsuu is accidentally delaying or omitting the initial pitch bend in some cases.
Thank you for the suggestions.
- Classic spc2midi also applies a reverb and chorus that you presently do not write to the MIDI file. Can those be added as well? I've completed 13 soundtracks thus far started with classic spc2midi, and would like to keep my releases fairly consistent.
I have added Reverb Send and Chorus Send output in version 0.2.54.
By default, spc2midi-tsuu initializes both Reverb Send and Chorus Send to 0. This may be different from the default behavior of some GM/GS/XG-compatible MIDI devices or sequencers, but I chose this behavior to avoid accidentally inheriting send values from the previous sequencer or synthesizer state.
Can you change typing the number in the instrument list to jump to it rather than filtering?
I have tried adding a related feature. When you type in the program search box, spc2midi-tsuu now shows a nearby program list based on the search query. This does not completely replace the filtering behavior of the ComboBox yet, but it should make it easier to see the surrounding programs.
Could you check whether this behavior is close to what you had in mind? Please let me know if you have any questions or if it still does not work as expected.
Will it be easier to provide feedback on the github page?
I just did some testing with 0.2.55
In the meantime, as for the name list filtering, though it is slightly more helpful with the list displayed as you have it, it would still be preferable to just have it jump to the list entry so it is still scrollable to the instruments around it.
I am also finding it difficult to quickly perform certain edits/checks of values. I like the main window list that shows all instruments that appear on each channels. Would it be possible to add a toggle to display them currently as you have, but also as an "Alphabetical by hex" display, so each instrument only appears once?
A lot of this goes back to the compactness of the classic spc2midi display, where nearly everything was visible on the main screen. I realize there is a lot more going on with your version, so it would be difficult to cram it all in there in a usable fashion.
As I am currently working on Super Ghouls and Ghosts, all my testing so far has been with that soundtrack. Testing song 22 Ending 2, the pitch detection on some of the instruments is off by a note, but I also have some single notes in the MIDI file that seem to be way off from what they should be. Again, I just gave it a quick listen and have not dug in to the internals of the file yet. I will try to compare it with previous versions of your converter, because I see you have been making tweaks to the pitch detection methods with several of the recent releases.
Also curious, what does SRN stand for?
Does the "Echo As Reverb" use reverb when it is checked, or unchecked? When it is checked, the values for Reverb and Chorus are greyed out. They can only be edited when it is unchecked. I would assume it needs to be checked to enable Reverb and Chorus.
So similarly, does "Envelope as Expression" use expression when checked or unchecked? Again, I assume it will use expression when checked.
I'll test out more things when I have more time.
Keep up the great work. I hope that by the time I am ready to start my next soundtrack, I will be able to use your software 100% in place of the classic version! The amount of time this will save me is MASSIVE. 🤩
Thank you for testing version 0.2.55 and for the detailed feedback.
Yes, GitHub Issues may be easier for tracking individual problems and feature requests. Forum replies are also fine, but if you can open separate GitHub issues for specific bugs or requests, it will be easier for me to track them.
I understand what you mean. The nearby program list is only a partial workaround. What you are asking for is to keep the full program list available, but jump or scroll to the matching program entry so that the surrounding instruments are still visible. I agree that this would be better.In the meantime, as for the name list filtering, though it is slightly more helpful with the list displayed as you have it, it would still be preferable to just have it jump to the list entry so it is still scrollable to the instruments around it.
This will probably require a more custom program selection UI, so it is not fully fixed yet. I will keep investigating this.
I have added a new sample list order option in version 0.2.60. You can now choose from the "Option > Sample List Order" menu to have the list displayed in the current SPC channel-based order, or in hexadecimal sample address order.Would it be possible to add a toggle to display them currently as you have, but also as an "Alphabetical by hex" display, so each instrument only appears once?
One important difference from classic spc2midi is that spc2midi-tsuu does not merge entries only because they have the same hexadecimal sample address. Classic spc2midi appears to use the BRR sample start address as the main practical identifier for a sample/instrument. spc2midi-tsuu, however, uses SRCN as the main key internally.
You are right to ask about this. "SRN" in spc2midi-tsuu was my mistaken abbreviation, and I have changed the visible label to “SRCN” in version 0.2.60.Also curious, what does SRN stand for?
The usual SPC/S-DSP register name is "SRCN", which stands for Source Number. SRCN is the sample number used by the SPC sound driver / S-DSP to select a BRR sample. Internally, the SPC driver writes a sample number to the DSP, and that number selects an entry in the sample directory. The directory entry then points to the actual BRR compressed sample start address and loop address. You can also see SRCN in SNES SPC700 Player. It is displayed as "Src" in the window.
In most cases, one SRCN corresponds to one BRR sample address. However, some songs or sound drivers may have multiple SRCNs that point to the same BRR sample address. Because of this, spc2midi-tsuu keeps both pieces of information: the SRCN and the BRR sample address.
When "Echo As Reverb" is checked, it is enabled. In that mode, spc2midi-tsuu maps the SPC echo information to MIDI Reverb Send automatically. The manual Reverb/Chorus send fields are greyed out because manual send values are disabled while automatic echo mapping is active.Does the "Echo As Reverb" use reverb when it is checked, or unchecked?
When "Echo As Reverb" is unchecked, the automatic mapping is disabled, and the Reverb/Chorus send values can be edited manually.
"Envelope as Expression" works in the same direction. When “Envelope as Expression” is checked, it is enabled, and spc2midi-tsuu outputs MIDI Expression messages based on the SPC ADSR/GAIN envelope. When it is unchecked, this automatic expression output is disabled.
I agree that the current UI may be confusing here. I will consider improving the labels or adding tooltips so it is clearer that checking this means automatic conversion is enabled.
Thank you for reporting this. Since I have recently changed the pitch detection method, it is possible that some samples behave differently from previous versions. If you can identify the sample address/SRCN, channel, or approximate location where the pitch is wrong, that would be very helpful.I will try to compare it with previous versions of your converter, because I see you have been making tweaks to the pitch detection methods with several of the recent releases.
Thank you again for the encouragement. Your feedback is extremely helpful for improving the tool.
A lot of very helpful info in this reply! I'll test it the new version when I get a chance, and I will move to github for specific bugs/requests.
I had an idea that the hex addresses were not always "the same". Makes sense now why some games I would have to tweak pitch on a particular channel and not others. One of the Battletoads games comes to mind, where I believe the guitar sample plays at both regular and -7 pitch. I imagine it is two different source numbers referencing that same address.