Nintendo DS sound effect/sample replacing?

Mario123311 Sep 19, 2019.

  1. Mario123311
    OP

    Mario123311 Member

    Newcomer
    1
    Apr 25, 2016
    United States
    So, I've been trying to make a little mod for Sonic Colors that replaces Roger Craig Smith's voice with Jason Griffith, However upon doing so with Tinke and repacking the soundbank, The sound is all slowed down and distorted, It's like that when I reopen the soundbank in Tinke as well and play after packing/saving.

    Anybody know a workaround for this at all? It's a noobish, question I know - But I honestly would like to get this small patch out there. Here's the footage of what happened once I packed and saved my soundbank, I ripped the samples from Sonic Rush so I really don't get why it's messing with everything. (Granted I converted them to .wav first)
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23
    Nov 21, 2005
    United Kingdom
    If things are slowed down then chances are the frequencies don't match -- play a 22KHz track at 11KHz and you have basically halved the speed. While most devices will stick to the bog standard 44KHz (double the highest frequency normal humans can hear, needs to be double for reasons of sampling) or maybe 48KHz for some things the DS did use all sorts of different things here to presumably save space and decoder resources -- while young* humans can hear up to 22KHz most vocal ranges are far lower than that (typical male voice range being 100Hz to 8KHz, and often quite a bit less than that) and instruments are often also limited (pianos usually top out around 4200Hz apparently) and thus the DS made use of that.

    *see mosquito tone for a fun one there.

    I don't know however what Tinke would have done as far as reading what it should be and converting it accordingly, or indeed what it does when it rips it. Your job would either be to match the frequencies required (audacity should be able to do it happily if you need to set export frequencies to whatever, or merge channels to make a mono track) or tell the game to use the new/proper frequencies and other settings instead (if it imports directly like that then should be fairly easy, it getting trickier when you want the game to do things it did not normally do).
     
    Dartz150 likes this.
  3. Mario123311
    OP

    Mario123311 Member

    Newcomer
    1
    Apr 25, 2016
    United States
    Both samples (new and old) are 11025 though. I'm confused...
     
  4. Mario123311
    OP

    Mario123311 Member

    Newcomer
    1
    Apr 25, 2016
    United States
    Just tried again extracting the sdat, replacing the clips using Nitro Studio and then reimporting the new sdat with Tinke, Now whenever I play a level the game is completely silent yet whenever I play the sounds in Tinke they playback just fine. Seriously, what is going on here? If you want to test ingame yourself, This bank is supposed to go under the sound_data in "gmcom".
     

    Attached Files:

  5. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23
    Nov 21, 2005
    United Kingdom
    Tinke is not a DS (or that game on the DS) so uses what we know of the format to play things back, and I also don't know what the programs in question would have done to the samples along the way (I tend to go manual for this sort of thing). The game+hardware is the ultimate arbiter of things here after all.

    Could be a stereo-mono thing -- if the source was stereo and now plays back mono it would still drag it out as it tries to play channels back to back and would sound distorted and drawn out there.
     
  6. Mario123311
    OP

    Mario123311 Member

    Newcomer
    1
    Apr 25, 2016
    United States
    I am actually testing the game in DESMUME though, So I really don't know what gives or what other tools I could look into to outright replace the sound files in question.
     
  7. Mario123311
    OP

    Mario123311 Member

    Newcomer
    1
    Apr 25, 2016
    United States
    Does nobody know of any other tools I could use? I have no idea what the hell Tinke is doing but it keeps corrupting the sdat once I modify and repack the SWAR folder inside it with Sonic's voice clips.
     
  8. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23
    Nov 21, 2005
    United Kingdom
    There are not many tools aimed at rebuilding or inserting.

    It is pretty much tinke, vgmtrans (make sure to get the new fork), possibly MKDS course modifier and maybe crystaltile2 that have abilities with noting in all this (not played with Nitro Studio but you reckon it). A few others like vgmtoolbox to generate the SMAP files can be handy, as might any that extract files and display data. Most other tools are aimed at playback, extraction and conversion to common formats. There are some older tools as well (I think Tahaxan got a few things, kiwi.ds (guy that wrote up the first main SDAT spec) had a tool which tried to rebuild, I think lowline's console tool had a bit and there are a handful of others but most of those are even more broken than the ones mentioned before or that you are already using.

    As mentioned I normally go manual and insert the files myself with a hex editor or something*, and also correct any settings the header might display. I will guide this editing with another tool that tells me where things are but it is still manual. I do this mainly as all the tools mentioned have an endless list of quirks and oddities where going manual takes longer but I know exactly what happened to get there.

    *hopefully it is smaller and you can pad it out to match size, otherwise you repoint everything following it or maybe shuffle it to the end (don't recall the full SWAR format right now and if it can do that, works for other aspects though), expand the file and change the pointer for that one file to the end. If you are lucky there might be a redundant sound in there that is not used (I think it was one of the Castlevania games which still had the E3 trailer voiceover buried within it) and thus can be overwritten without troubling the final game if you do need more space.

    As far as emulators go it is still a piece of code pretending to act like hardware, running a game that manages the interactions with that hardware. The emulation might be inaccurate (doubt it here if it plays the original games fine, not to mention you presumably still want the hack to work with an emulator) and introduce its own problems but for the most part treat it like it is hardware.
     
Quick Reply
Draft saved Draft deleted
Loading...