Playing EPSS songs without (!) EPSS

As I now implemented possibility to read SPI files as well as export SFZ files in EPSS Editor (see this post), the step did not feel too long to try to play the EPSS sounds with another sound engine. Especially since the new experimental MID player in v1.16 was so out of timing.

But how?

First obvious choice was to try Sforzando, as it is very good at understanding the SFZ file format. In my first tries I exported the instruments for all MIDI Channels in the Dynamite SPI (included in the EPSS for Atari releases) to one SFZ and then tried loading the MID file and play. Not that great of a success as everything played on top of each other, wrong sounds etc.

After some trial and error I found out that the only way I could get this working was:

  1. Export every MIDI Channel sound definition in the SPI as a separate SFZ file. One SFZ file can only define one instrument so there are really no way we could represent our SPI. An SPI file for EPSS could probably best be technically described as: EPSS is a polyphonic multitimbral instrument with multiple samples mapped on notes in multiple MIDI channels. So there were no way this was possible with just one SFZ file.
  2. Somehow combine the SFZ instruments into one polyphonic instrument (or multiple instruments, one per SFZ instrument).
  3. Ensure that the MID file is playing our MIDI channels on the right instrument.

EPSS Editor v1.16 now supports step 1 automatically so it is now just a matter of loading the DYNAMITE.SPI and then export it as a SFZ and we will then get each instrument created automatically as Channel 0.sfz, Channel 1.sfz etc.

Step 2 was solved by finding a SoundFont tool called Polyphone. This tool could load each of my exported SFZ files and then I could copy/paste between them to create one SoundFont containing the instruments as separate Presets, each corresponding to one unique Program Change number. Polyphone then exported it as a SF2 file, which can contain multiple present and multiple instruments.

Of course our MID files never knew anything about Program Change, as it worked on fixed mapped samples to each channel, so I had to fix that. I found MidiEditor (www.midieditor.org) which had exactly what I needed. I loaded our MID file and inserted one Program Change message on each MIDI Channel pointing to the Preset number created in Polyphone, i.e. MIDI Channel 0->Program Change 0, MIDI Channel 1->Program Change 1. The main Dynamite song only used three MIDI channels, so it was easy. Then saved the MID file as a new file.

After that I managed to load the SF2 and the MID into an web based SF2-player (SoundFont MIDI Player (thetimetube.herokuapp.com) and it worked and sounded closer to original, pitches were correct, sounds played in the right order etc. By some reason Polyphone added a Envelope release of 100.1s (see note below) which caused the sounds to overlap, but after manually changing all Release Envelopes to 0.001s, all sounded really good and quite close to the original actually!

Dynamite is a a bit of a technical demo so our GemTwo used our own developed effects, the VVFE, Velocity Variant Filter Emulation. It takes the velocity of the MIDI Note On message, inverts it and multiplies it with 32 (or other values in later versions of EPSS) and uses that as a start offset when playing the sample. So velocity 127 is 0 offset, velocity 64 is 32 * 64 offset etc. Doing that, it could simulate a phase shift of the sound or volume change of a faded off sound, which caused a nice sounding effect without actually having to do any processing of the samples.

EPSS's VVFE can probably be mimicked as well in SFZ/SF2 by creating velocity dependent ranges, each of them having different start offsets in the sample. Might generate too much data depending on how fine resolution is needed. Or maybe there are other techniques in SF2 that can be used? I don't know too much about SF2's advanced abilities yet...

When playing in a standard SF2 player however, the volumes are interpreted as volumes so that works as well but sounds slightly different from the original.

But all in all, Mission Accomplished with room for improvement!

Let me know if you want to try it out yourself to hear, and I can add the files I was testing with to the Download area.

NOTE: Found the cause of this: the loop_mode property was incorrectly set to "One Shot" when exporting the SFZ from EPSS Editor. This causes the sound to always play in full length and ignoring MIDI Note Off. In next version this will be adjusted to "No Loop" which corrects the issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

66 − = 63