don't click here

Audio Sample Extraction

Discussion in 'Engineering & Reverse Engineering' started by Lostgame, Oct 10, 2012.

  1. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Hey guys, been quite some time since I've cared to do anything ROM-hacking related, hope everyone here is doing well!

    Since my leave of absence here I've been focusing mostly on coding and making music - I have been asked by several of my friends to do a remix album for video game songs and the very first one I could think of was Collison Chaos Past (I usually listen to the US soundtrack but from what I understand the 'Past' soundtracks are the same). I use Logic Pro and an AKAI MPC 1000 for beatmapping, and I found some great MIDI versions of the song, but without the original samples I'll never really get it, or any of the other Sonic tunes I'd want to remix, down exactly the way I want.

    My question is, how do I extract the PCM samples from the tracker bits for these songs? Surely they're compressed somehow, I really don't even remember where to get started on it, I've got a download of the Sega CD version here and it contains one file ('Sonic.bin') and 35 MP3 files, none of which are the 'Past' audio because these have been created through a tracker, evidently.

    These samples are beautiful and this track is awesome (I'm intending to get my band to do some live instruments, too, but there's particular voices I really want to use, such as the digeridoo-type sound in the background, and the initial intro samples)...I'd love to create some badassery with it, and if you guys could lend me a hand that'd be swell.

    Hope I provided enough detail, I'm on a Mac but I can certainly run a Windows VM if I've got to use some Windows-only utilities.

    - Lostgame

    EDIT: by looking on the wiki, it looks like the PCM samples are contained in 'SNCBNKB1.BIN' and 'SNCBNKB2.BIN' - but I have no idea what to do with those files, or how to extract them from my main '.bin' file I've got.
     
  2. S0LV0

    S0LV0

    Sonic Generations Helpdesk Tech Member
    586
    1
    0
    Spagonia
    Abusing SMPS
    If you're looking to extract specific samples, I suggest you get the in_vgm plugin for Winamp. With that, you can emulate the audio and mute certain channels to isolate the sample you want. Here are the emulation files for Sonic CD. http://project2612.org/details.php?id=625
     
  3. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    So, for the record, I should install a Windows VM and Winamp and I download these _VGM files?

    Hmm, is there no way to extract them from the actual file itself as raw PCM samples that I could get to WAV or AIFF? (sorry, I'm a sample junkie)
     
  4. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    I swear someone on the forums already did this. I have a full collection of the samples and I got it from here. I'll try to remember to bring it with me next time I'm online.
     
  5. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    I dunno if this topic is useful or not.

    Also, the song Cerulean Cove by Tweaker:

     
  6. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Argh, that topic has *exactly* what I need...but the mediafire link is down... :(

    Guess I've got a start anyways.
     
  7. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    The actual samples themselves are in a form of ADPCM specifically designed for the sound processor the plays the samples, extracting from the file itself is a posibility, provided you know the locations for the samples and know the exact method for converting them to raw PCM, anyways, enough of the technical crap.

    Here's a rip I made myself, I don't know the original exact pitch of the samples as I don't believe that information is stored anywhere (considering the samples can be played at any pitch at any time, it's obvious that that information would not be needed here).
     
  8. Valley Bell's smps2mid supports the Sonic CD past tracks if you can extract the SNCBNK files from your disc image. (To extract them, load your disc image in a virtual drive like DAEMON Tools.)

    Here are all seven songs in MIDI format. For some reason they won't play in Winamp or foobar2000 but I have opened them in Sekaiju and do they contain the songs.

    This does not extract the samples but it at least is 100% accurate.
     
  9. ValleyBell

    ValleyBell

    Tech Member
    246
    25
    28
    researching PC-98/X68000 sound drivers
    I think, what you need is this.

    The pitch of the notes is controlled by the SMPS notes, btw, so there is no real "original" pitch.
     
  10. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Okay, cool, this is enough to get me started. Shame it's not simple to get a proper tracker version of it that I could transcode to MIDI with the existing samples. >.< Alas.
     
  11. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    The sample rips was ages ago and the soundfont project went nowhere because I couldn't get the pitches right. I don't have access to my iDisk files right now becuase of issues finding a reliable way to connect my external hard drive to my computer now that the enclosure circuitry is fried. What I did for these games was disassemble the sound driver code to locate where the samples are in ROM, extract them, then conver thtem to wave files. For Sonic CD the wave file conversion is the hard part; for Genesis games that use SMPS the samples play at somewhere around 11025hz so :/
     
  12. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    That's where I got them. No point in reuploading these then.
     
  13. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    Thank y'all for all your help in here! Really appreciate that you guys are still on it after all these years! <3