Best way to extract DLS/etc from DS ROM

Discussion in 'NDS - ROM Hacking and Translations' started by Spikey699, Sep 15, 2014.

  1. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    Hey folks,

    At first, this sounds like a 'Google that yourself' question, but bear with me, please :)

    I've been trying to find the *most accurate* way possible to extract DLS from a ROM's SBNK.
    (NOTE: I know that pulsewaves [PSG's?] will not be extracted, nor ADSR information.)
    As my test, I used Godot's theme from Phoenix Wright 3.
    Incidentally, my goal is to use the DLS's to identify instrument channels for DS SSEQ's I have converted to MIDI, and doing so accurately. Would love to convert those pulsewaves accurately, but have no idea where to begin.. Any advice there would be great too.

    Anyway.. I tried VGMTrans. It only extracted 4 instruments in the DLS (excluding pulsewaves there are 6). However it did so accurately.

    I tried the Nitro2DLS application. It put everything in one giant DLS, worked great for some pieces, failed on Godot.

    I tried MKDS Course Modifier, it extracted all 6 instruments, including drums, but for some reason the loop points in the individual waves in the DLS were missing (only happened with this program), resulting in short notes being played.

    If the MKDS one would be fixed with the loop points, it would be usable. Alternately if anyone knows how to get a more accurate rip out of VGM Trans, I'm all ears.

    Any other suggestions or programs to use, I'm sure there are plenty who know more than I do about this, so please inform me! :)

    Regards,
    - Spike
     
  2. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    VGMtrans is your friend. It does it best.
     
  3. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    As I said in my OP, VGM Trans is inaccurate, it only extracts 4 of 6 non-pulsewave instruments, in this case, missing electric piano and drums.

    I did a lot more research last night atfer I posted this thread, I managed to extract the SWAR/SWAV (which I thought was in the SBNK file, but is obviously not!). Those contain all the samples needed per SSEQ/MID it seems, so worst case scenario, I can use MKDS's non-looping DLS's and make do, or use VGM Trans's incomplete DLS's and fill in the gaps.

    Still, any further advice would be very helpful. :)
     
  4. haxan

    haxan GBAtemp Regular

    Member
    251
    48
    Jul 26, 2011
    in my room?
    i don't understand what you said about the looping issue.
    do you mean that the track doesn't loop or that the track loops but sounds out of place?
    if it loops and sounds out of place use Audacity, it helped me with some looping issues when i changed the soundtrack of devil survivors and devil survivors 2.
     
  5. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    Have you tried the latest build of VGMtrans? I've built the github source from scratch if you want to try it: https://dl.dropboxusercontent.com/u/34957059/VGMTrans.exe
     
  6. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    Thanks very much TF. I appreciate you working with me, I know I sound kind of obstinate, but I just want to get over this minor hump. I will check it out hopefully tonight.

    Haxan: The looping issue is not the track itself, as in, it's NOT a traditional 'eng of song' loop issue at all, it's actually the WAV samples themselves in the DLS 'soundfont' bank. The ones that MKDS exports don't have the correct 'loop' point (loop is probably a confusing term, but it's the only one I can think of), so that instead of a player playing a normal note, the instruments all hang because the sample doesn't decay (?) correctly.
     
  7. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    TF: Tried it, it was the same. A bug in Trans maybe? It's definitely missing some SWAV's from the SWAR bank.
     
  8. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    Perhaps set up a ticket on the github for it (That's the source I built) and discuss it with them.
     
  9. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    Did it, thanks.

    Any other suggestions, fire away. Any suggestions, TF, about the PSG/pulsewaves in DS tracks?
     
  10. Gericom

    Gericom GBAtemp Advanced Fan

    Member
    857
    908
    Jun 30, 2011
    Netherlands
    MKDS Course Modifier beta 11 supports it (it is not 100%, but it works). It can export it to dls aswell.
     
  11. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    Thanks Geri. But on MKDS modifier DLS's, as I wrote earlier:
    Referring to MKDS:
    The looping issue is not the track itself, as in, it's NOT a traditional 'eng of song' loop issue at all, it's actually the WAV samples themselves in the DLS 'soundfont' bank. The ones that MKDS exports don't have the correct 'loop' point (loop is probably a confusing term, but it's the only one I can think of), so that instead of a player playing a normal note, the instruments all hang because the sample doesn't decay (?) correctly.


    If that was fixed, that would help enormously.

    To put it a different way, why does playback within MKDS work almost perfectly (just the pitch of the PSG is a little off), but when I extract the DLS, load it, and play the converted MIDI outside of MKDS, it sounds wrong?


    BTW, that's your program right? Brilliant, thanks for your hard work.
     
  12. Hiccup

    Hiccup GBAtemp Advanced Fan

    Member
    913
    276
    Nov 21, 2009
    Hmm... isn't VGMToolbox / VGMStream anygood?
     
  13. Gericom

    Gericom GBAtemp Advanced Fan

    Member
    857
    908
    Jun 30, 2011
    Netherlands
    What program are you using for playing dls with midi? (when playing in mkdscm, it uses the same dls)


    Yes it is. Thanks! I am working on a new tool: Every File Explorer. It is going to have all features of mkdscm plus a lot more!
     
  14. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    I have used multiple programs, but I convert the DLS to SF2, use BASSMIDI Driver (it lets you use soundfonts on a non-SB card), and use it with my regular MIDI sequencer as a MIDI port, Voyetra Digital Orchestrator Pro. Very useful :)

    I've checked the WAV's in a sample editing program, and the ones VGMTrans and others extract define the loop point per each sample, only the ones from MKDS do not, which causes the short, clipped notes.


    And, I'm excited about Every File Explorer! :)



    Hiccup: As far as I'm aware, VGMToolbox only allows you to extract SDAT files.

    VGMStream would allow you to extract individual samples, but I have no idea how to make a useful soundfont/DLS (that would synch up correctly to the MIDI instruments/program changes) out of a bunch of WAV's.



    Incidentally, Ace Attorney Investigations, which does not utilise pulsewaves AFAIK (except for some old music for certain character themes like Gumshoe), works fine with VGMTrans for DLS banks. I'm guessing there's a link there..
     
  15. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,674
    Sep 1, 2010
    I'm really hoping you get that fixed 100%, because I'd really make use of that. In fact, it'd become my new DLS exporting application, because VGMTrans can't export them.

    Edit: I can't seem to find the dls file export option... I must be missing something...

    Unfortunately, no. VGMToolbox just rips to various formats (Such as the DS 2SF format that can be played in Winamp). VGMStream is just a plugin for Winamp/Foobar 2000 that plays streamed audio files from games.
     
  16. Spikey699
    OP

    Spikey699 Member

    Newcomer
    12
    0
    Apr 2, 2013
    United States
    TF:
    After you load the ROM, go to the files folder, and double click on sound_data.sdat.
    Then go to the Bank folder, and you can right-click the SBNK files and select "Convert to DLS".