ROM Hack Emulation Emulator Record each NDS Channel as Wav?

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
21
XP
49
Country
Mexico
Due not every nds game uses .sdat file, I decided to Rip music of some games recording it in a emulator (DeSmuMe). But, for better ripping results I'd like to record each channel (I'm referring to each of the 16 ADPCM channels that NDS has) separately, DeSmuMe has te capability to enable an disable each ADPCM channel, but it doesn't have an option that let me record each channel separately at the same time, it only records every channel that is enabled mixed in one wav file.
I could try to record a channel one by one, but it will take a lot of time, because I have to repeat that process like 10 times or more (depends of the song).
I'd like to know if there is an emulator, program, plugin, or something that let me do that.
Thanks for reading.
 
Last edited by JOSW28,

CoolMe

That's the way she goes..
Member
Joined
Apr 16, 2019
Messages
7,462
Trophies
1
Age
29
XP
33,115
Country
United States
DS outputs stereo sound, so if the emulator does that too it should generate both channels(when you record it), and you just have to split the signals in an audio software like Audacity and the like.
 
  • Like
Reactions: impeeza

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
21
XP
49
Country
Mexico
DS outputs stereo sound, so if the emulator does that too it should generate both channels(when you record it), and you just have to split the signals in an audio software like Audacity and the like.
I think I explained bad.
I'm refering to each of the 16 APDCM channels that NDS has. Where music and sound effect reproduces.
 

ChiefReginod

Well-Known Member
Member
Joined
Jun 11, 2016
Messages
696
Trophies
0
Location
California
XP
2,502
Country
United States
It can be done, but setting it all up is kind of clunky. In this method you'll need to find the music in .2SF format (do some searches, it's not hard to find archives of this stuff).

1. Install WinAmp.
http://winamp.com/

2. Download the "vio2sf" WinAmp plugin from this page.
https://www.zophar.net/utilities/2sf/vio2sf.html
It's an older version. That's fine.

3. Extract these files from the vio2sf archive:
in_vio2sfu.dll
vio2sf.bin

Put them here:
C:\Program Files (x86)\Winamp\Plugins\

3. Launch WinAmp (or restart it).

4. Options > Preferences > 2SF Decoder > (You can mute all but your desired channel here)

5. To output to WAV, go to Options > Preferences > Plugins > Output > Nullsoft Disk Writer > Configure

6. Now just select your format and file destination and press the Play button on the file you want to convert to WAV. The progress bar will start moving but you won't hear any audio. This is normal since it's writing the WAV file, not playing it.

IMPORTANT: At long as the NullsoftDisk Writer plugin is selected in Plugins > Output, it will save every audio file as WAV instead of playing them. To revert back to playing audio normally, just select "Nullsoft DirectSound Output" or "Nullsoft Wave Output".

There's a more recent vio2sf plugin for foobar2000 by kode54, but it doesn't have the option to mute channels. It's still a good option for just playing 2SF files. And there is a more recent version of the plugin for WinAmp 5, but you would need to compile it yourself. Kind of a hassle, tbh. The older one works well enough anyway.
 
  • Like
Reactions: Rednorka

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
21
XP
49
Country
Mexico
It can be done, but setting it all up is kind of clunky. In this method you'll need to find the music in .2SF format (do some searches, it's not hard to find archives of this stuff).

1. Install WinAmp.


2. Download the "vio2sf" WinAmp plugin from this page.

It's an older version. That's fine.

3. Extract these files from the vio2sf archive:
in_vio2sfu.dll
vio2sf.bin

Put them here:
C:\Program Files (x86)\Winamp\Plugins\

3. Launch WinAmp (or restart it).

4. Options > Preferences > 2SF Decoder > (You can mute all but your desired channel here)

5. To output to WAV, go to Options > Preferences > Plugins > Output > Nullsoft Disk Writer > Configure

6. Now just select your format and file destination and press the Play button on the file you want to convert to WAV. The progress bar will start moving but you won't hear any audio. This is normal since it's writing the WAV file, not playing it.

IMPORTANT: At long as the NullsoftDisk Writer plugin is selected in Plugins > Output, it will save every audio file as WAV instead of playing them. To revert back to playing audio normally, just select "Nullsoft DirectSound Output" or "Nullsoft Wave Output".

There's a more recent vio2sf plugin for foobar2000 by kode54, but it doesn't have the option to mute channels. It's still a good option for just playing 2SF files. And there is a more recent version of the plugin for WinAmp 5, but you would need to compile it yourself. Kind of a hassle, tbh. The older one works well enough anyway.
Thanks for replying, unfortunately the game that I'm trying to rip the music doesn't have any 2sf files ripped yet (and I don't think it'd ripped, because it's and oscure and very rare game), and It's that the reason why I would like to record it by emulator.
 

ChiefReginod

Well-Known Member
Member
Joined
Jun 11, 2016
Messages
696
Trophies
0
Location
California
XP
2,502
Country
United States
Yeah, I couldn't find that one either.

But I did find this tutorial to do all of this with vgmtrans and FL Studio:



Basically, you'll be exporting the MIDI file from the ROM with vgmtrans. You'll also be exporting a soundfont file in a format that FL Studio can use (this contains the unique sounds of each instrument since none of that is saved in MIDI). Then you just Import the MIDI file into FL Studio and set it to use the .DLS soundfont.

I just tried it out with a few of my DS ROMs and it actually worked as promised. I'm gonna make heavy use of this myself. :D

The hard part will be using FL Studio if you're not yet familiar with it. I don't know if exporting to WAV is supported in the trial version. Also note that each individual song has its own soundfont, so you'll need to export the MIDI and DLS file for each and every song.
 

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
21
XP
49
Country
Mexico
Yeah, I couldn't find that one either.

But I did find this tutorial to do all of this with vgmtrans and FL Studio:



Basically, you'll be exporting the MIDI file from the ROM with vgmtrans. You'll also be exporting a soundfont file in a format that FL Studio can use (this contains the unique sounds of each instrument since none of that is saved in MIDI). Then you just Import the MIDI file into FL Studio and set it to use the .DLS soundfont.

I just tried it out with a few of my DS ROMs and it actually worked as promised. I'm gonna make heavy use of this myself. :D

The hard part will be using FL Studio if you're not yet familiar with it. I don't know if exporting to WAV is supported in the trial version. Also note that each individual song has its own soundfont, so you'll need to export the MIDI and DLS file for each and every song.

Thanks for the suggerence. But, the game isn't compatible with VGMTrans, because it doesn't use .sdat file as sound storage instead of that, it uses and strange filename with the extension ".mus". So I can't do this
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
First do check https://gbatemp.net/threads/the-various-audio-formats-of-the-ds.305167/ and make sure it is not a known format otherwise (.mus would be a new extension to me but extension is normally just a mild suggestion/convenience, bust out the hex editor and see what it starts as or has early on). Unless it is ported from some other platform I would not expect a game like this to go full custom and instead just use another known format, go direct to the (AD)PCM the DS hardware understands or some common one.

Beyond that I don't know any emulators or builds thereof that dump channels offhand to wave files, nor external programs you might readily hook for it. There are many open source emulators
If it does come to pass that you have to rip things manually do bear in mind you a) have cheats, b) savestates, c) ROM editing* and d) might well be able to silence audio even if you don't understand it**.

*in the classic scenario of standing still somewhere in a level with no enemies or whatever to do loop back then level editing to remove enemies might be the easier option rather than trying to understand and audio format.

**volume command, if there is a loop back then looping silence, reducing apparent size to zero with pointers, if there is silence in a track then copying that across the track, if the instrument library are wave files then replacing those with silence... many things and approaches here depending upon what you are doing.
 

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
21
XP
49
Country
Mexico
First do check https://gbatemp.net/threads/the-various-audio-formats-of-the-ds.305167/ and make sure it is not a known format otherwise (.mus would be a new extension to me but extension is normally just a mild suggestion/convenience, bust out the hex editor and see what it starts as or has early on). Unless it is ported from some other platform I would not expect a game like this to go full custom and instead just use another known format, go direct to the (AD)PCM the DS hardware understands or some common one.

Beyond that I don't know any emulators or builds thereof that dump channels offhand to wave files, nor external programs you might readily hook for it. There are many open source emulators
If it does come to pass that you have to rip things manually do bear in mind you a) have cheats, b) savestates, c) ROM editing* and d) might well be able to silence audio even if you don't understand it**.

*in the classic scenario of standing still somewhere in a level with no enemies or whatever to do loop back then level editing to remove enemies might be the easier option rather than trying to understand and audio format.

**volume command, if there is a loop back then looping silence, reducing apparent size to zero with pointers, if there is silence in a track then copying that across the track, if the instrument library are wave files then replacing those with silence... many things and approaches here depending upon what you are doing.
Thanks for replying.
I've already seen your post, but I didn't found the file that the game uses.
The only thing that I could notice of the ".mus" file, is that at the start of it, there are written the name of several ".pcm" files that there are in the .nds file too, which are the samples of different instruments that the music uses. Also, at some point, it starts a sucesion of different values where the most present value is FF, but sincerily I don't understand it.
I've already noticed that that DeSmuMe have source code, but sincerily I don't understand almost of its code. I'd try to modify it, but there's a high probability that I couldn't do it.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • RedColoredStars @ RedColoredStars:
    You use paper towels too? :rofl2:
  • sp3off @ sp3off:
    Better keep the safe place 'safe'
  • RedColoredStars @ RedColoredStars:
    Bounty. The quicker picker upper? lol
  • K3Nv2 @ K3Nv2:
    Aloe vera now with rgb
  • sp3off @ sp3off:
    On a serious note, have you tested your ISP DNS answer time ?
  • sp3off @ sp3off:
    Last time i've checked, my ISP was like 5/6 ms slower than Cloudflare x)
  • RedColoredStars @ RedColoredStars:
    yeah. I've tried changing dns too.
  • K3Nv2 @ K3Nv2:
    Check cpuid make sure ram sockets are detected
  • sp3off @ sp3off:
    (and i'm fibered, 5gb shared downloads, 1gb upload)
  • K3Nv2 @ K3Nv2:
    Or even in bios
  • RedColoredStars @ RedColoredStars:
    its mostly when starting firefox that it's noticible slower. Opening and loading the homepage. Tried fresh installs and all.
  • K3Nv2 @ K3Nv2:
    Knowing your system specs would help
  • sp3off @ sp3off:
    if you're in win 11, have you checked which graphical processor Firefox was using ?
  • RedColoredStars @ RedColoredStars:
    after it's open, its a bit slower too at loading pages, but not as noticeable as the initial startup and homepage loading
  • sp3off @ sp3off:
    can make a little difference
  • RedColoredStars @ RedColoredStars:
    You mean as in hardware acceleration on or off?
  • K3Nv2 @ K3Nv2:
    Went to make cup noodles, spilled boiling water on me then the kettle decided to pop
  • K3Nv2 @ K3Nv2:
    Don't know why I saw a kettle with wifi
  • RedColoredStars @ RedColoredStars:
    Will try that now
  • sp3off @ sp3off:
    ouch @K3Nv2 hope nothing's too bad !
  • RedColoredStars @ RedColoredStars:
    xda a good site. My go to site for phone shit. :)
  • K3Nv2 @ K3Nv2:
    Females have burnt me worse
  • ZeroT21 @ ZeroT21:
    females don't exist
  • SylverReZ @ SylverReZ:
    @ZeroT21, Tamales exist.
    +1
    SylverReZ @ SylverReZ: @ZeroT21, Tamales exist. +1