fbpx
  Friday, 19 November 2021
  29 Replies
  19.7K Visits
51
Votes
Undo
  Subscribe
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.
https://github.com/dgrfactory/spcplay
with a huge archive of SPC files at
https://www.zophar.net/music/nintendo-snes-spc

And if you want to get Super in to it (see what I did there??)
spc file specs
http://snesmusic.org/files/spc_file_format.txt
and SPC700 specs and reference
https://en.wikibooks.org/wiki/Super_NES_Programming/Loading_SPC700_programs
https://wiki.superfamicom.org/spc700-reference
1 week ago
·
#20564
0
Votes
Undo
good...
1 week ago
·
#20563
0
Votes
Undo
Great posts! Thanks
11 months ago
·
#16971
0
Votes
Undo
Oh, yes, I removed all the test versions from public view. I forgot I had a link here.

But good news, check this thread for the currently completed soundtracks!
https://www.midi.org/forum/15496-snes-midi-remaster-project-now-online

I'll check out yours when I get a chance. I planned on doing Castlevania 64 and Legacy of Darkness in a similar fashion to my SNES project, but this is taking plenty of time, and figuring it all out again for N64, well I'll probably be a senior citizen by then :p
11 months ago
·
#16970
0
Votes
Undo
Hey Jason, just stumbled across this thread again (haven't been getting notifications for replies :( ).
Looks like you made lots of progress! (Would like to check the YouTube link but it's private.)

For my own project, I am doing something very similar: extracting music from Nintendo 64 games. There are existing tools for this (Subdrag's N64 Sound Tool) but the data still requires a lot of cleanup.

I am not mapping the instruments to General MIDI, but preserving the game soundbank as SoundFonts. I embed a little instruction in the MIDI files (Meta text event) to point to a SF2 SoundFont file.

Check out the results here: https://mmontag.github.io/chip-player-js/browse/Nintendo%2064%20(SoundFont%20MIDI)

Player Settings allows you to tweak the sound, such as reverb.
1 year ago
·
#15344
0
Votes
Undo
Feel free to check out my first SNES MIDI Remaster Project WIP video upload!

I am playing my WIP MIDI files back using a program called MIDITrail, and recording the video with XBox game bar set at the highest settings it will allow. I'll probably have this up until I release my first officially complete soundtrack.

Currently, there are still a few issues with the ends of some of the tracks. I'm using Bavi's script to add the fadeouts.
https://midi.org/forum/15301-applying-expression-to-expression

A couple of them I must not have dragged the expression controllers far enough, because there is a quick burst of sound at the very end. I'm also having an issue where certain tracks are getting extended past the point where I am snipping them. I'm hoping it's just a setting in Cakewalk that I have to turn on or off. Most of the time it doesn't make much difference, but one track is 5 seconds longer than it should be. I also need to update track names and such in the MIDI files, and do some miscellaneous cleanup. One song I had to use a combination of Bavi's expression-fadeout script on 5 of the tracks and manually selecting three tracks and applying the expression controllers, otherwise those three tracks never faded out.

I will be uploading a complete soundtrack video to my YouTube account for each game I finish. I will also be hosting the finished MIDI soundtrack files on my Google Drive, along with an instrument list for each song (via a screenshot from MIDI-MIS) and a description of the process used to create the MIDI files and video from start to finish.

SNES MIDI Remaster Project Test Super R-Type WIP
https://www.youtube.com/watch?v=1eELPMK-NcU
1 year ago
·
#15253
0
Votes
Undo
Given that Cakewalk adds a setup measure to a file on purpose (Thanks for checking, Bavi) I may end up leaving them mostly as is after running them through Cakewalk. I know that currently, it usually takes my softsynth a split second to load all of the appropriate patches and whatnot, so my tracks don't always play smooth/correctly at the very beginning, so this added "setup measure" may actually be a good thing. Additionally, since I am first creating the files with a very incomplete piece of software, and then editing it multiple times with various other pieces of software, it seems maybe having Cakewalk rearrange the events may be helpful as well to make the file more... logical? It also appears that Cakewalk makes it easy to rename tracks and other naming info, like song name, album, etc. So I will probably end up using it as the second-next to last step in my process. I ran a repair check with Anvil Studio on the resulting file after Cakewalk was done with it, and it found and removed some extra unneeded stuff created by Cakewalk (I forgot what specifically, but I think a few pitch bends, some expressions that ended up after the last note of the song, maybe a few other little things). And then Sekaiju as the final step to remove all of the sequencer specific meta data that Anvil Studio insists on putting all over every file.

So I guess my next step is to try it out on the whole soundtrack and see if I can make my first official release for the SNES MIDI Remaster Project!

Stay tuned...
1 year ago
·
#15217
0
Votes
Undo
I found a Cakewalk INI file setting that will avoid most of the note movement issue. I posted a reply in your Cakewalk Forums thread.

[...]

Using the Sekaiju steps to make a fadeout in many MIDI files might be not fun.]

I'll check out the Cakewalk file when I get a chance.

As for the Sekaiju method, I wish it were easier ;) I was originally using Sekaiju to do the percussion portions, but even for that it was roughly the same process and number of steps to grab the percussion from the "old track", move it to the percussion track, and convert it in to actual percussion (not to mention all the additional times I would forget a key step and have to redo it all over again when I messed it up). For the amount of times I have to do this, a more efficient method is a must. I'm glad I figured out how to do that part in Anvil Studio at least.
1 year ago
·
#15216
0
Votes
Undo
Very thorough breakdown indeed!

As mentioned previously, in your MIDI file, the 8th to 11th note tracks are all for Channel 10 percussion sounds. Some of these tracks contain various volume events before the first note. Perhaps those volume events were originally intended to affect Channel 10 notes found on the other tracks.


For this particular one, those were all part of the original in-game Track 8, which is why they all bear the same name. Because of the way I have to save the percussion separately to retain the dynamics, it looks like the volume events (mostly?) duplicate between all of the former pieces of Track 8. I thought Anvil Studio would compensate when merging them together. Perhaps it has a "merge track" option that might neaten it up a bit.

I actually wouldn't mind Cakewalk adding a measure of "silence" at the beginning, if it could be proven that it was consistent across all tracks, but I'm not sure all notes and dynamics ended up where they should be, just shifted by one measure? I'd have to give it a realllll careful listen...
1 year ago
·
#15215
0
Votes
Undo
I found a Cakewalk INI file setting that will avoid most of the note movement issue. I posted a reply in your Cakewalk Forums thread.

The attached text file has some steps to do a fadeout in Sekaiju. (How to draw a fadeout line in one track and duplicate it to the other tracks, or just draw a fadeout line in each track.) If you are only doing one file, the Sekaiju steps are a little more work than the Cakewalk method. However, I reviewed this entire thread to get up to speed on your project, and I see you want to edit many MIDI files. Using the Sekaiju steps to make a fadeout in many MIDI files might be not fun.

sekaiju-fadeout.txt
1 year ago
·
#15213
0
Votes
Undo
Oh no! I don't use Cakewalk very often, I forgot it can rearrange and move events like this. It looks like Cakewalk decided there wasn't enough time at the beginning to send all of the initial setup events, so Cakewalk moved all the notes one measure later. Additionally, when you open a MIDI file, I think Cakewalk likes to store things in its own kind of internal format. So when you save back to the MIDI file, events can get rearranged or moved compared to the original MIDI file.

As an alternative for you, I'm thinking of posting how to do a fade-out in Sekaiju. It's a little more work, but it shouldn't rearrange or move events in your MIDI file.

The rest of this post is technical discussion, mainly about what Cakewalk rearranged.


Anything wrong?

is anything inherently wrong with the order of these events [...]?

My only recommendation is to put the track name at time zero and before any events that would get sent out to the MIDI port (that is, before any event with a MIDI channel number or any System Exclusive event). I remember reading somewhere that some MIDI file software might only search for a track name until it reaches an event for MIDI output or it encounters a non-zero delta time. So if the track name comes after an event for MIDI output, some software might not show the track name.


First track

the first track (technically track 2)

You should be aware that in a Format 1 MIDI file, in the actual bytes of the file, the first track (the first MTrk chunk) is used for events like tempo, time signature, and key signature, and can't contain any notes.

Often, MIDI file editors (including Cakewalk) do not show this first track in their track list window. They reserve their track list window for tracks that can contain notes. You might have to use another window or a timeline header to see things like the tempo, time signature, or key signature events. For example, in Cakewalk, in the View menu, you can open the windows called Markers, Tempo, or Meter/Key to view things that are stored in the first track of the MIDI file.

Any time you or other people use different kinds of software to examine a MIDI file, you have to be careful when discussing which track you are referring to. In my comments below I will call the actual first track in the MIDI file "the conductor track", and I will call the tracks after that "the first note track", "the second note track", and so on.


Cakewalk view notes

As mentioned above, Cakewalk will put various events from the conductor track into their own special windows: Markers, Tempo, and Meter/Key.

Cakewalk will put the Track Name from the conductor track, Copyright events from any track, and Text events at time zero from any track into its Notes window (View menu, Browser command, Notes tab). It won't show them as events in the Event List window.

Cakewalk will consider the Track Name and initial Bank and Program Change events in a note track as a track property. It won't show them as events in the Event List window, only as values for the track in the Track List window.

Cakewalk will combine note start and note end events into a single "Note" event that has a start time, velocity, and duration.

Cakewalk will combine the Control Change events used for sending a RPN or NRPN into a single "RPN" or "NRPN" event the Event List.


With your MIDI file

Cakewalk rearranged many of the initial setup events.

It looks like Cakewalk decided there wasn't enough time at the beginning to send all of the initial setup events, so Cakewalk moved all the notes one measure later.

Some of the tracks have volume events before the first note event. In general, Cakewalk didn't move volume events before the first note event (except if it was very close to the beginning, it might move it one beat later). But at the point the first note event happens, Cakewalk moved the first note and every following event in the track one measure later.

In particular, the 8th to 11th note tracks are all for Channel 10 percussion sounds. Some of these tracks contain various volume events before the first note. Perhaps those volume events were originally intended to affect Channel 10 notes found on the other tracks.


More details

It looks like Cakewalk rearranges the order of initial setup events when you open the file, but at this point the events still have the same measure:beat:tick timestamps, they've just been rearranged into a different order within the events at same timestamp.

Once you save the file and re-open it in Cakewalk (or look at it in other MIDI file software), you will see Cakewalk has moved some events to a new measure:beat:tick timestamp:

Some of the initial setup events were moved around 1 to 3 ticks later.

Some of the initial setup events were moved 1 beat later.

All of the note events were moved 1 measure later, and any event after the first note event in each track was also moved 1 measure later.

Any other event before the first note event in each track was not moved.

It moved the Copyright event from the first note track to the conductor track.


Example pictures

I used Sekaiju to look at the file "02 Solo Sortie WIP2.mid" before and after I edited it with Cakewalk.

Note: In Sekaiju I changed the setup options to number the tracks starting with 0. So the "conductor track" is shown as track 0 and "the first note track" is shown as track 1.


1-event-lists.png

These event lists show the beginning of the 1st note track before and after saving the file in Cakewalk.

The Copyright event (marked with an asterisk) was moved to the conductor track.

The initial setup events were rearranged, and some of them moved 1 to 3 ticks or 1 beat later.

The first note and everything after it was moved one measure later.


2-piano-rolls.png

These piano rolls show the 10th note track notes (the very small lines in the top panes) and Volume events (bottom panes). The left window is before and the right window is after saving the file in Cakewalk. You can see Cakewalk moved the note events and the volume events after the first note event one measure later. The volume events before the first note event weren't moved.


3-track-lists.png

These track lists show the 8th to 11th note tracks.

In the right pane of the Track List, Sekaiju draws vertical lines to represent events like Control Change or Pitch Bend. The height represents the value, or a little circle represents zero. In your MIDI file these vertical lines are usually Volume messages.

In the right pane of the Track List, Sekaiju draws horizontal lines to represent notes.

If you look closely, you can see where the first note and other events were moved 1 measure later.

8th note track: there's a new gap at measure 1.
9th note track: there's a new gap at measure 27.
10th note track: there's a new gap at about measure 31.
11th note track: there's a new gap at measure 1.

As mentioned previously, in your MIDI file, the 8th to 11th note tracks are all for Channel 10 percussion sounds. Some of these tracks contain various volume events before the first note. Perhaps those volume events were originally intended to affect Channel 10 notes found on the other tracks.


Slightly related - Reordering simultaneous note start and note end

Previous threads here have mentioned rearranging the order of simultaneous note start and note end events for the same pitch and channel:

Reordering simultaneous events
SMF Format 1 Tracks and Channels

I now think this is an artifact of how some MIDI editors store notes. If a MIDI file editor combines the note start and note end events that are in the MIDI file into an internal format "note" event that has a start time and duration, then when it saves that back to a MIDI file, it will put the note end before the note start at the same time on a track. If there's a note start and note end for the same pitch and channel on different tracks, then the re-saving doesn't rearrange the file events, but when it plays the notes, it will play the note ends on every track before the note starts at the same time on every track.
1 year ago
·
#15198
0
Votes
Undo
I've messed around with it some more. I am able to do exactly what I need, but now it is messing up the beginning of my songs after I add the expression fade out to the end. The tracks are getting misaligned starts, with some of them being delayed about 3.5 to 3.8 seconds. I've posted on the Cakewalk forum to see if anyone has any suggestions on why that might be happening. In the meantime, is anything inherently wrong with the order of these events from the first track (technically track 2)? No testers find any errors.

[ 156] MTrk:
[ 165] 0: b1 00 12 -- Bank Select MSB
[ 169] 0: b1 20 00 -- Bank Select LSB
[ 173] 0: c1 75 -- Program Change (Jungle Snare Drum)
[ 176] 0: ff7f -- Sequencer Specific: 05 0f 09 08 40
[ 185] 0: ff7f -- Sequencer Specific: 05 0f 06 47 65 6e 65 72 61 6c 20 4d 49 44 49 20 2d 20 56 69 72 74 75 61 6c 4d 49 44 49 53 79 6e 74 68 20 23 31
[ 226] 0: ff03 -- Sequence Name: 02 Solo Sortie USE.mid
[ 252] 0: ff02 -- Copyright: Converted by spc2midi
[ 277] 0: b1 7b 00 -- All Notes Off
[ 281] 0: b1 7f 7f -- Poly Mode On
[ 285] 0: b1 79 00 -- Reset All Controllers
[ 289] 0: b1 65 00 -- Registered Parameter Number MSB
[ 293] 0: b1 64 00 -- Registered Parameter Number LSB
[ 297] 0: b1 06 0c -- Data Entry MSB (RPN 00 00: Pitch Bend Sensitivity)
[ 301] 0: b1 26 00 -- Data Entry LSB (RPN 00 00: Pitch Bend Sensitivity)
[ 305] 0: b1 07 43 -- Channel Volume MSB
[ 309] 0: b1 27 54 -- Channel Volume LSB
[ 313] 0: b1 0a 1b -- Pan MSB
[ 317] 0: b1 5b 1e -- Effects 1 Depth
[ 321] 0: b1 5d 0a -- Effects 3 Depth
[ 325] 0: e1 38 3e -- Pitch Wheel
[ 329] 0: 91 49 64 -- Note On
[ 333] 1: b1 0b 7f -- Expression Controller MSB
[ 337] 1: b1 2b 7f -- Expression Controller LSB
[ 341] 2: 81 49 14 -- Note Off


Here's what I'm left with after Cakewalk has a go. You can see that events have been re-arranged, and timing has been modified.

[ 667] MTrk:
[ 676] 0: ff03 -- Sequence Name: 02 Solo Sortie USE.mid
[ 702] 0: ff7f -- Sequencer Specific: 05 0f 09 08 40
[ 711] 0: ff7f -- Sequencer Specific: 05 0f 06 47 65 6e 65 72 61 6c 20 4d 49 44 49 20 2d 20 56 69 72 74 75 61 6c 4d 49 44 49 53 79 6e 74 68 20 23 31
[ 752] 0: b1 7b 00 -- All Notes Off
[ 756] 0: b1 7f 7f -- Poly Mode On
[ 759] 0: b1 79 00 -- Reset All Controllers
[ 762] 0: b1 65 00 -- Registered Parameter Number MSB
[ 765] 1: b1 64 00 -- Registered Parameter Number LSB
[ 768] 2: b1 06 0c -- Data Entry MSB (RPN 00 00: Pitch Bend Sensitivity)
[ 771] 3: b1 26 00 -- Data Entry LSB (RPN 00 00: Pitch Bend Sensitivity)
[ 774] 3: b1 27 54 -- Channel Volume LSB
[ 777] 3: b1 5b 1e -- Effects 1 Depth
[ 780] 3: b1 5d 0a -- Effects 3 Depth
[ 783] 3: e1 38 3e -- Pitch Wheel
[ 788] 241: b1 00 12 -- Bank Select MSB
[ 792] 242: b1 20 00 -- Bank Select LSB
[ 795] 242: c1 75 -- Program Change (Jungle Snare Drum)
[ 798] 242: b1 07 43 -- Channel Volume MSB
[ 802] 242: b1 0a 1b -- Pan MSB
[ 806] 960: 91 49 64 -- Note On
[ 810] 961: b1 0b 7f -- Expression Controller MSB
[ 814] 961: b1 2b 7f -- Expression Controller LSB
[ 817] 962: 91 49 00 -- Note Off
1 year ago
·
#15195
0
Votes
Undo
Oh. I must have changed the default snap setting. The snap tools are to the left of the the play / pause / stop buttons in the toolbar:

https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fstatic.cakewalk.com%2Fdocumentation%2FCakewalk%2FEN%2Fimages%2FTools.19.2.png&f=1&nofb=1
You can click the snap button (A) to turn off the snap to grid function.
Or
You can right-click on the snap amount (D) to choose a different snap setting.

For more information about various buttons and things, you can go to the View menu and choose "Help Module". This will open a window that will explain anything you hover over.
1 year ago
·
#15190
0
Votes
Undo
Fade outs can be done with Volume (CC7) or Expression (CC11), as long as your MIDI sound source responds to Volume or Expression.

It is very easy to do in Cakewalk. Here's an example:

Thanks, I tried it out and it seems to do the trick, with a caveat. The files don't line up nice with editors, so it doesn't line up with the measures at the top. I was able to switch the view to hours:minutes:seconds:frames, which is what I would like to use, but the "Series Of Controllers" and selection snapping seems to only display in measures, so it may take some finagling to get it to line up exactly where I need it, unless there's a way to turn off snapping to measures? So far, 1000% more track fade-out than I had before. :D
1 year ago
·
#15189
0
Votes
Undo
Fade outs can be done with Volume (CC7) or Expression (CC11), as long as your MIDI sound source responds to Volume or Expression.

It is very easy to do in Cakewalk. Here's an example:

1. In the track list window, drag over the the last two measure numbers at the top of the right pane to select the last two measures in all tracks.

2. Go to the Insert menu and select the "Series of Controllers" command.

3. Fill in the options to insert type Controller, Number 11 Expression, Value Range Begin 127 to End 0. (The time range is already filled in based on the selected range. The MIDI Channel doesn't matter*.) Click OK.

*Cakewalk will insert all the controllers for the same channel. But when you opened the MIDI file, Cakewalk recognized that each track has only one channel in it and set a "channel number" property for each track. When you save the MIDI file, the events in each track get changed to the channel number property for the track.

View: cakewalk-fadeout.png
1 year ago
·
#15188
0
Votes
Undo
Hi Jason, I'll be interested to hear how much success you have converting SPC to MIDI. That is a hero's journey. :D

I think I've come as close to perfecting the technique as I can, though I still need to find a solution for...

As for the fade out... this should be as simple as automating the Channel Volume (CC 07).
I really thought the Pro Mix accessory for Anvil Studio was going to let me do this easily, but so far I am running in to a brick wall with it. I can't seem to apply a volume control to all channels simultaneously, and the graph it gives you to edit each channel individually is not precise. It only lets you view the track volume graph in fractions of the total track length instead of by time duration (you can see 1/1, 1/2, 1/3, 1/4, etc). None of my other editors seem to want to let me do it either.

The close to final process (as of July 23, 2022):

0 - Figure out all of the basic instrumentation/pitch/etc (using SPCPLAY, Winamp, spc2midi, and my ears), save in a spreadsheet
1 - Export "all melodic instruments only" as a GM MIDI file using spc2midi at normal length +10 seconds for fade out (if a looping track)
2 - Export multiple "individual percussion only" (*set as melodic, Grand Piano) GM MIDI files using spc2midi at normal length +10 seconds for fade out (if a looping track)
3 - Edit melodic file with Anvil Studio to repair (if needed) and delete all empty channels
4 - Edit all individual percussion files with Anvil Studio to repair (if needed) and delete all empty channels, then switch channel type from melodic to percussion
5 - Edit all individual percussion files with MIDI-MIS to assign the correct percussion sound to each file
6 - Load melodic only MIDI file in to Anvil Studio
7 - Merge each modified now-fully-percussion MIDI file in to the melodic file to create a complete file including all instruments and percussion
8 - (fade out last 10 seconds of each looping track... somehow)
9 - Load the complete GM MIDI file in MIDI-MIS
10 - Convert from GM to GS, and assign GS instruments as necessary

This process will work for most games that I want to do. Some, as mentioned above, are much more complex so will require a ton of extra work applying effects and stuff to get them as close to the originals as I can. The oldest games are generally the easiest, because the programmers hadn't yet figured out how to fully exploit the sound hardware. I am not going to worry about tidying up the "viewability" of the final MIDI files. My biggest concern is that they play properly and sound how I want them to.

I have Super Castlevania 4 and Super R-Type nearly complete using the new process. The WIP files from earlier are all being redone, so they are forever frozen in time as a stepping stone to where the new ones will be.

See the attachments for a sample. I included the "building blocks" of Super R-Type "Solo Sortie", the combined GM file (WIP) and the nearly final GS file (WIP2). The final file is tuned specifically to the soundfonts I am using, which can be seen in screenshot 5.

Hear the original song:
https://www.zophar.net/music/nintendo-snes-spc/super-r-type
Track 2 Solo Sortie

Hear my versions as I hear them:
GM version
https://drive.google.com/file/d/1xMX_a5hSOk2tSgHwknsERxcwHavKnFjv/view?usp=sharing

"Final" GS version
https://drive.google.com/file/d/1PvioL4ofN5v2X89XgvnjuGQS37I8hEID/view?usp=sharing

I am open to any suggestions on how I can fade out the last 10 seconds of each finished MIDI file without killing myself doing it :p
1 year ago
·
#14356
0
Votes
Undo
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


Figured I'd give an update as I am progressing. As usual, the more I know, the harder things get.

The converter does a pretty bad job with percussion. Running a converted file through Sema's test-midi-files shows invalid (255) values whenever there should be a Note Off for percussion. While investigating the cause, I discovered that the ONLY thing it moves to the percussion channel is the Note On event. All other items (note off, velocity, etc) are all left on their original channels. I have been trying to find workarounds for it for a while now. I added custom code in to my MIDI editor to try to automatically re-assign the Note Off events, but it is not really accurate. I can only set the Note Off to the same value as the most recent Note On, so some things get multiple offs while others get none.

I just found a very slow, painful, but ultimately quality solution!

All standard melodic instruments are converted correctly, including the full ADSR envelopes. So I thought "What if I mute all percussion, and export just a MIDI file of the melodic portion?" So far, so good. "Okay, what if I mute all of the melodic portion, and export just the percussion? But! ... Set each percussion sound to a unique melodic sound instead, and change it later?" So I just tried it out. It's very time consuming. But here's the new "current process" (with bonus of no longer needing to run the Anvil Studio repair because there are no longer any invalid percussion values, because as far as the converter is concerned, there is no percussion!)

0 - Figure out all of the instrumentation/pitch/etc
1 - Export melodic only MIDI file using spc2midi
2 - Export percussion (*set as melodic) only MIDI file using spc2midi
3 - Modify percussion MIDI file using Sekaiju (so far, unless I find a better option) to re-map all sounds on to percussion channel
4 - Adjust key of each "instrument" (using Sekaiju) to be on its correct percussion sound
5 - Load melodic only MIDI file in to Anvil Studio
6 - Merge the modified now-fully-percussion MIDI file in to the melodic file
7 - Delete all extra unused channels from the MIDI file in Anvil Studio

I've done one track so far, and it came out loads better than any attempt prior to now. I just need to come up with a more streamlined way of keeping track of which percussion instruments are which, as things start to get messy when you move them over from a melodic channel, and I think some of the ones in the track are incorrect (proof of concept, but I can easily change them later with my editor). An added bonus to this method is that for things with "combined" percussion (for example, the high/low whistles in Mario Kart) I can now see both high and low in the note display and reassign the high to high and low to low, where previously I would have had to manually figure out what was what if I didn't just give up and make them all the same.

I'm attaching my first "successful" percussion transplant, plus my previous version of the same track (with the caveat that some percussion sounds may be incorrectly chosen, I just fixed the cowbell :p)
1 year ago
·
#13827
0
Votes
Undo
Aye aye aye. So the converter leaves all percussion expression on the original channel it was on in the game (somewhere on 1 to 8). I haven't noticed too many issues with that (but maybe I just didn't pay enough attention? Could fix some issues I am having with the game I just finished mapping out instruments for). I'm testing out converting a game now where there's lots of volume control on the percussion, and without it it just sound like a big pile of noise. Luckily with this particular game (this testing music track anyway) the percussion is all on channels 2 and 5. I tried several different editors to see if I could successfully move the percussion events on to the percussion channel.

Domino broke other things unrelated to it (seems to have lost pitch bending, maybe some other stuff, but the percussion sounds good).

Anvil Studio couldn't do it (except for repairing the track to prepare for use in the other editors).

Sekaiju... did it! After a lot of trial and error, I figured out:

- first I have to start with a file repaired by Anvil Studio, otherwise some invalid data that the converter creates causes Sekaiju to not save the percussion channel after the edits are made, even though it will play everything fine up until you save

- click on a MIDI track that contains the percussion expression events
- go to the edit menu
- Edit Event's Track
- Enter the actual percussion channel's track number
- Viola! And not the musical kind!

Here are 3 tests so you may listen to the difference. I must say, I'm not looking forward to this part of the process, and it may be next to impossible for some games where percussion is mixed together with melodic instruments rather than having it on its own fixed channels, but I'm glad I found a way to do it that will work at least sometimes.

The 3 files are the original conversion, the Domino effect, and the Sekaiju version.

Original SPC version can be heard at
https://www.zophar.net/music/nintendo-snes-spc/super-mario-world-2-yoshis-island
107 Flower Garden
1 year ago
·
#13787
0
Votes
Undo

Hmmmmm, does it work on percussion channels as well? In my post about playing a partial sound, that would actually be the exact effect I need to get rid of the sharp hit on subsequent repeated snare hits... maybe.


It's not the channel that's the key, portamento can be applied on any channel whether it's being used for percussion or not.
It's the sample player that responds to the portamento on command and starts playback after the attack phase (or so I'm led to believe).
1 year ago
·
#13786
0
Votes
Undo
the effect is often used to cut off the attack portion of the waveform from the notes following the first.

Hmmmmm, does it work on percussion channels as well? In my post about playing a partial sound, that would actually be the exact effect I need to get rid of the sharp hit on subsequent repeated snare hits... maybe.
1 year ago
·
#13785
0
Votes
Undo
Yes, perfect sense. I swear I knew that :p Now I'll have to check if it's actually using both, or just pitch bend. I was looking at a bunch of sound engine specs the other day that showed exactly what parameters they allowed, at least in the particular games that used said engines.

EDIT:
Looking at the specs didn't help :p
In the particular engine N-SPC, they have three commands for variable pitch.
Pitch envelope to
"do pitch slide for all of the following notes" starting on normal and ending on new pitch
Pitch envelope from
"do pitch slide for all of the following notes" starting on new pitch and ending on normal
Pitch Slide
"do pitch slide for current note only" starting on normal and ending on new pitch

So it's probably up to the converter to decide how to handle it, which means I am now loading up one of the MIDI files to see what's in there.

I see a lot of pitch bend, no CC 5, 65, or 84, so no portamento in the resulting MIDI files.
  • Page :
  • 1
  • 2
There are no replies made for this post yet.