How to extract sequences and samples (instruments) from Saga

(and probably Zwei and other Cybersound-using games?)

This is just a heads-up on something I got working, which some of you may know about (or at least the SEQ half, which I posted about years ago). I feel mildly proud that I figured it out, despite its simplicity; that, combined with the fact that there probably aren?t a huge amount of people who care, means I?m reluctant to post it anywhere besides a PD stronghold such as this. :anjou_happy:

I?d long known that Sega Saturn programming whiz Cyber Warrior X had written a tool called SEQ2MID to convert the SEQuence files (*.SEQ) from games using the Cybersound synthesising system to standard MIDI files. However, this was rather useless without the original instruments and because the assignation of Cybersound instruments to MIDI instruments was basically arbitrary and affected by different home pitches for the original instruments, different keys for percussion instruments, etc.

What I hadn?t known, and am now feeling suitably silly about, is that CWX also wrote a program called TONCNV?whose inconspicuous name is probably why I overlooked it?that can convert the actual instrument samples (referred to as TONe files, I guess) corresponding to those SEQ/MIDI files to DLS (DownLoadable Sound, very similar to SoundFont) files. It also comes with DLSMerge, which can merge the MIDI and DLS files into an RMI (Riff MIdi) file that can be played with a few capable applications.

This is all made more amusing by the fact that I only learned of TONCNV from someone on a forum topic I stumbled across while searching for something that was at best tangentially related; this person had claimed that this procedure couldn?t be carried out for Saga and that the game used streaming audio?presumably because they overlooked (1) the Cybersound logo, (2) the presence of numerous SEQ files on the CDs, and (3) the fact that the samples are stored in files named *.BIN, not TON (because who would think about simply trying other files that looked appropriately sized? :P).

What all this means is that you can easily obtain MIDIs and corresponding samples of the music from Saga, and presumably from Zwei and other Cybersound-using games. This makes it trivial to either play the files (which sound almost identical, barring the lack of Cybersound reverb and other effects, and some minor differences in volume and panning)?or, probably more interestingly, to load them into your sequencer of choice and study the compositions, alter instrumentation, remix, etc.?

Being a massive fan of this soundtrack, I was completely elated to get this working and to be able to see the tracks in a state somewhat resembling how they would have looked as Saori Kobayashi and Mariko Nanba were working on them (I can only imagine what their hardware was like!).

The possibilities are endless, basically. :anjou_happy: Especially for those of you who have more talent than I! That said, I?m amusing myself by messing about with instrumentation (that panpipe from ?Atolm Dragon? just demands to be used) to my own limited ability; if I come up with anything passable, I?ll let you know! I also must try this on Zwei once I get access to it.

Looking forward to seeing what you think. :slight_smile:

This sounds like a great discovery, Ancient Weapon. I don’t have much experience with audio files, so perhaps you can enlighten me: is it possible to import the audio into a music application such as Garage Band for editing? It would be awesome to make some new tracks based on the style of Panzer Dragoon Saga’s soundtrack. Different tunes, but yet fitting in with the same theme.

I appreciate the compliment, but I don?t know if it?s much of a discovery! It?s at least (one of) the first use(s) of these long-available tools on Panzer Dragoon Saga. I question whether I?m the first person to try TONCnv on different files on the CD until I found the right ones; however, that being said, it?s not as though SEQ2MID itself has historically been widely known or used. Perhaps I ought to practise taking credit for things!

In any case, I?m glad to have worked it out, and I very much hope it can be of use to the community. :anjou_happy: And yes, I?d definitely be happy to see both remixes of the existing songs, either using the same instruments, instruments from other tracks or Zwei, or non-PDS/Z instruments; or new songs using the games? samples. How I?d love to make my own of either category, but I doubt my ability in that regard! But, as I said, that pan flute is calling? :wink:

Indeed, the files can be loaded into any competent sequencer/DAW: load the MIDI file (converted from filename.SEQ by SEQ2MID) into an audio track, then load into that a software sampler capable of loading the corresponding DLS file (converted from filename.BIN by TONCnv). For example, I?ve been using REAPER* for OS X (64 bit) with the shareware VSTi SoundFont/DLS samplers bs-16 for when the MIDI is loaded as a single track and bs-1** for when I put each channel to its own track for greater control.

[size=75]* REAPER is worthy of mention as a fully-featured DAW offered at a great price that secures free updates for two major versions?and with a non-crippled, non-expiring evaluation version?by a great bunch of developers who are disgruntled with modern software licensing such as that employed by the big-name companies they used to work for. I?ll probably spend the $50 for the forthcoming version 4, which will grant me free upgrades until the end of v5.

** Only because these, which in their free versions intentionally occasionally insert artefacts and drop notes, were the only (or at least only decent) ones I could find for OS X. In contrast, for Windows, there are probably free ones as good or better. Note also that the developer offers the freeware bs-0, but this is limited to a mono output; this probably isn?t too bad seeing as the PDS samples (read: the very few I?ve checked) are mono, but it might necessitate manually panning each instrument, etc.[/size]

Hey, thanks for the tip! I managed to grab a few songs from Saga and rebuild them on FL Studio. Not perfect, but pretty close. I’m not sure if it’s the tools’ fault or FL Studio’s, but many effects are missing in the song (things like pitch, panning, ADSR and volume adjustments), so I had to edit them manually. And of course, FL Studio’s samplers are far more advanced and cannot emulate the Saturn’s simpler samplers, more specifically the interpolation method used by the console. Linear doesn’t sound quite like it, but seems close enough.

The seq2mid tool comes with the source code, so I may be able to hack something out of it. The other tool did the job quite well, but didn’t grab the loop points. This wasn’t really a problem, as FL Studio’s built-in sample editor can easily add loops to them. But that maybe because FL cannot read DLS files. I’ll give that REAPER a try later.

EDIT: I managed to get it to sound VERY close to the original now with FL Studio. It comes with a plugin called LSD which can load the DLS file. Still not perfect, but much better than my manual approach.

Yes, the DLS files contain the loop points and I presume things like the volume envelopes and suchlike also. Did this method fix most of the issues you mentioned? I probably lack the auditory prowess necessary to distinguish different interpolation algorithms, but I did notice a few small volume and panning differences even with the DLS files?nothing major, though, by any means.

In any case, you probably have a better idea about the technicalities than me, so let us know if you note anything else!

It may help readers if I specify something implied by your post but that I didn?t mention before: TONCnv can extract the samples from their native file to either a DLS file (combined sample bank) or a set of individual WAV files (non-looping). Of course, the former is most likely preferable, but it?s always good to have options.

Yes, it did solve almost all problems. There are only a couple of things missing from the original sounds: the reverb/delay effects and volume slides, which I had to add manually. The latter is a known limitation of FL Studio.

About the same as my conclusion. :slight_smile: I noticed some issues with volume swells, too?and a few with amusingly exaggerated pitch bends. As we?ve said, nothing that can?t be sorted with a little initiative!

Just grabbed a few Zwei songs. Both the SEQ and TON files are appended to a single SND file, so I had to extract them manually to get the actual files. Same results as with Saga: near perfect execution with a few small issues, most noticeably the lack of envelope on all instruments, some pitch issues and missing reverb and delay effects.

If I had the source code for TONCNV, I could make a few improvements, including adding support for ADSR envelopes and other missing features. I could even merge the two tools into one. If you’re still in touch with Cyber Warrior X, maybe you could get the source code for that tool? A bit of documentation about the TON file format would be even better.

Excellent, thanks for the information! I presume the separation procedure is trivial, but can you outline it? Probably it?s as simple as getting an idea of what the separate files? headers look like and then splitting between them.

Good point about the envelopes; as I said earlier, I doubt I would ever notice either way! Having checked TONCnv?s readme, I see that it warns thus: ?Keep in mind that not all ton files are properly converted. Stuff like Frequency Modulation, ADSR, etc. aren’t really even tackled.?

To that end, your proposed revisions sound brilliant. I?d definitely help, but I?ve never been in touch with CWX (unless our paths crossed incidentally on SegaXtreme). And as you have probably noticed, he doesn?t offer a contact method on his site. Perhaps chase him up on SegaXtreme? Or I can try PMing via my really old (and rather embarrassing) forum account, if you really need me to? Either way, I greatly hope you could sort something out!

Exactly, but I’m sure the game uses a better approach. I failed to extract the files from EPISODE2.SND, EPISODE4.SND, INTER23.SND and INTER35.SND, probably because the padding isn’t as obvious as the other files.

I think I remember seeing an e-mail address somewhere, perhaps in the seq2mid text files. I’ll see if I can reach him with that address.

EDIT: it seems he no longer uses that address. The message was returned due to his mailbox being full. Considering it’s from as far back as 2000, I’m not surprised. Guess I’ll have to try the forums then.

Cool, let me know how it goes! :slight_smile:

In other news, here?s what results when collide boredom, a dearth of both talent and skill, and what should be familiar samples?
4shared.com/audio/rYrPoptQ/PDZ.html
It?s an electronic version of the chorus of a barebones song I wrote on guitar. Here?s a somewhat Mega Drive?ish version of that plus the corresponding verse, for the latter of which I wrote a new lead line:
4shared.com/audio/EAIcJzPp/Mega_F.html
Anyone recognise that kick and snare? The other MD game I?m reminded of (by the bass and pluck sounds and how they harmonise) is Hellfire, specifically its win-in-both-gameplay-and-music Stage 3.

Better (read: acceptable) music coming soon! (I can only hope)

Just a FYI. Panzer Dragon Zwei and Saga tunes have already been ripped into the SSF format (like PSF/VGM/SPC etc but for Saturn). You’d probably have more luck extracting those to RAM dumps and then use a hex editor to copy out the ton/seq data. It has sufficient documentation so you know what to look for and where. Or, fire the game up in yabause, and dump the 68k ram, if you don’t have Python installed. In the 68k ram, at 0x0500h you can see the ram mapping which details where are the seq/ton/dsp banks, and how long they are.

In the USA disc:

Episode2.snd:
TON bank 0 at 0x0h, length 0x02f026h
TON bank 1 at 0x02f026h, length 0xde60h
SEQ bank 0 at 0x04d100h, length 0x0129ah
TON bank 2 at 0x05faaah, length 0x013d10h
SEQ bank 1 at 0x0737bah, length 0x04f0h
SEQ bank 2 at 0x073caah, length 0x06e2h
DSP bank 0 at 0x07438ch, length 0x0540h
DSP bank 1 at 0x0748cch, length 0x0540h

Episode4.snd:
SEQ bank 0 at 0x0h, length 0x010000h
DSP bank 0 at 0x10000h, length 0x0540h
SEQ bank 1 at 0x10540h, length 0x04f0h
TON bank 0 at 0x21100h, length 0x02f676h
SEQ bank 2 at 0x50776h, length 0x0500h
TON bank 1 at 0x50c76h, length 0xe000h
TON bank 2 at 0x5ec76h, length 0x016350h

Inter23.snd:
SEQ bank 0 at 0x0h, length 0x60h
TON bank 0 at 0x60h, length 0x046500h
SEQ bank 1 at 0x046560h, length 0x04ech
TON bank 1 at 0x057100h, length 0xde60h
SEQ bank 2 at 0x064f60h, length 0x0200h
TON bank 2 at 0x065160h, length 0xa000h
DSP bank 0 at 0x06f160h, length 0x0540h

Inter35 <-- no such file on the USA disc.

Thanks for the extra info. I haven?t got around to Zwei yet, actually.

Striker, did you ever manage to contact CWX? It?d be good if your suggested features could be added in, even if it?s only for posterity.

I know this is an old thread, but I need help for converting .ssf files to .midi
I don’t need the tone/soundfont, I just need the midi from an .ssf file. I’ve downloaded the .ssf file from the Zophar’s Music Domain I tried downloading SEQ2MID but I really don’t understand how that work, since the exe can’t open on windows 10
Thank you