[Release] Custom Theme Cwavs

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by xextil, Feb 9, 2015.

  1. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    As its name suggests (?), the function of this simple program is to create a cwav data file from one or several sounds in .cwav/.bcwav format and then import it to a custom theme with YATA (Thanks to Reisyukaku for his great tool!)

    Depending on theme mode, each file can contain up to 6 different sounds and 8 in the case of Flipbooks modes. For now, to convert wav files to cwav/bcwav is necessary a tool from Nintendo SDK that can be found on net... this is not a conversion tool, sorry :wink:

    The program is still in beta, it's possible that some sounds files aren't compatible/not work or emunand crash after apply a theme, so I recommend have an emunand backup ready just in case, though with extdata theme folder (EUR "000002ce", USA "000002cd", JPN "000002cc") is enough.

    [​IMG]


    Custom Theme with Cwavs:



    Forgive my rudimentary english, I hope this be useful to someone :lol:

    Source code: https://github.com/Xextil/CustomCwavs

    Note: Origin WAV file format before convert to bcwav/cwav should be (Otherwise can be not work) :

    PCM unsigned 8-bit
    Sampling rate: 8000 hz
    Audio channels: mono


    Changelog

    - v0.4 Fixed errors
    - v0.3 Added open cwav data file exported from a theme and extract cwavs/convert to Wav option.
    - v0.2 Fixed errors
    - v0.1 Initial version
     

    Attached Files:

    CatmanFan, Sirius64, Warft and 6 others like this.


  2. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Updated to 0.2 to fix some errors.

    And after some tests, I realize that stereo sounds or sounds with sample rate larger than 16000 Hz could case another sounds not work, so before convert the wav to bcwav, it should be adjusted.
     
  3. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    can i export cwav files from a bin which exported by yata?
     
  4. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    With this tool no, I thought include that option, but 3DS .Cwav Dumper already have it, and it's more complete.
     
    Margen67 likes this.
  5. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,101
    4,024
    Oct 7, 2007
    United States
    Levelland, Texas
    I've tried using 3DS .Cwav Dumper . But it fails with the dumped CWAV Bin from an existing theme that already uses them. It outputs BCWAV files like it should but the resulting WAV files I get from 3DS Explorer are silent files with no sound and that's the only program I know of that can convert BCWAV to WAV files.

    I get errors in your program when I attempt to import the bcwav files it exported. I can't really use this for anything because I have no way of converting WAVs into CWAVs and my attempts to get existing CWAVs have failed. :(
     
  6. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Are you using version 0.2? I test a lot of bcwavs and all of them works well.

    To convert bcwav to wav I use the test.exe file that are inside the .rar. With command prompt on the same folder, type "test -o example.wav example.bcwav". If you can play the wav and the program still give you an error, please send me the bcwav file and I take a look at it.
     
  7. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Updated to 0.3. Added open cwav data file exported from a theme and extract cwavs/convert to Wav option.
     
  8. arbalest876

    arbalest876 Advanced Member

    Newcomer
    54
    5
    Oct 7, 2014
    Switzerland
    It's wonderful!Thanks!
     
    Margen67 and xextil like this.
  9. snk3058

    snk3058 Newbie

    Newcomer
    2
    2
    Jan 25, 2015
    Hong Kong
    THX for releasing this:lol:
     
    Margen67 and xextil like this.
  10. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,101
    4,024
    Oct 7, 2007
    United States
    Levelland, Texas
    Ok did manage to make my own wav files and converted them to cwav. I use your program to build the CWAVs.bin file matching the screen types used by the them I put them in. But the end result is a partially bricked home menu. The moment I do something that makes it attempt to play a sound, the 3DS freezes. I can get out of this by hitting the home menu theme options on the top left corner of the bottom screen as soon as the home menu boots up. It will freeze if I do anything else.

    What rate should the wav files be at I have yet to extract bcwavs from an existing theme to get a read on what sampling rate/frequency I should be using.

    EDIT: Ok managed to get your updated program. For whatever reason you changed the name of the exe from the first release or what ever version I had at first and was accidentally running the wrong one. I see the options to extract from cwavs.bin file now.

    However it appears it's an issue with what I'm using to convert my wav files to cwav.

    Do you know of any tool to convert a wav to bcwav/cwav? The current one "BannerTool" which I use to make cwavs for banners works fine for banner sound effects, but it appears to not work with your program. I get an error when I attempt to play them and this doesn't occur if I play a bcwav from a retail theme.
     
  11. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Yeah, I realize after upload last version, my fault.

    I tried to make a cwav from "BannerTool" and I realize why not work with my program. BannerTool don't convert wav to cwav, only encapsulate raw wav data in a cwav structure. With banners it may work, but is not a valid cwav for themes and that's why 3DS crash.

    The only tool I know to convert wav to bcwav is the one from Nintendo SDK :(
     
  12. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,101
    4,024
    Oct 7, 2007
    United States
    Levelland, Texas
    I at one point had the SDK, but have no clue where the tool is. It's mostly source code and stuff.
     
  13. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    It's called ctr_WaveConverter32. On command prompt, you have to type ctr_WaveConverter32 -o example.bcwav example.wav
     
    Margen67 likes this.
  14. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,101
    4,024
    Oct 7, 2007
    United States
    Levelland, Texas
    Thanks I found it. :D
     
    xextil likes this.
  15. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Well, after a lot of tests of different wav formats, I think i'm sure of what should be the origin wav format before convert to bcwav:

    PCM unsigned 8-bit
    Sampling rate: 8000 hz
    Audio channels: mono

    Some wavs with sampling rate of 16000 hz or 16 bit can be work, but many others not, so I don't recommend waste time on trying.
     
  16. Apache Thunder

    Apache Thunder I have cameras in your head!

    Member
    4,101
    4,024
    Oct 7, 2007
    United States
    Levelland, Texas
    The CWAVs from the Legend of Zelda theme use 32khz and I used those with the SDK converter and it worked. Except for the open from sleep sound effect. That one doesn't play for some reason. :P
     
  17. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    Yeah, some sounds with higher sampling rate works, but may cause that others sounds not, it's a matter of try.
     
  18. pokemoner2500

    pokemoner2500 GBAtemp Advanced Fan

    Member
    846
    276
    Aug 14, 2013
    United States
    Whenever I load a cwav and try to make the .bin it just freezes, the cwav is attached!
     

    Attached Files:

  19. xextil
    OP

    xextil Member

    Newcomer
    38
    30
    Mar 12, 2007
    I checked and yes, there's an error in the final function, before close file and the program get stuck. I already upload v0.4 and fix it ;)
     
  20. Saiyan Prince

    Saiyan Prince GBAtemp Regular

    Member
    133
    32
    Nov 15, 2014
    United States
    what firmware ?