ROM Hack Emulation Emulator Record each NDS Channel as Wav?

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
19
XP
19
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

...
Member
Joined
Apr 16, 2019
Messages
1,131
Trophies
1
Age
26
XP
1,761
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
19
XP
19
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
442
Trophies
0
Location
California
XP
1,562
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.
 

JOSW28

Member
OP
Newcomer
Joined
Oct 13, 2021
Messages
6
Trophies
0
Age
19
XP
19
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
442
Trophies
0
Location
California
XP
1,562
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
19
XP
19
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
34,333
Trophies
2
Website
trastindustries.com
XP
23,415
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
19
XP
19
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.
 
General chit-chat
Help Users
  • KennieDaMeanie @ KennieDaMeanie:
    And if you're that dedicated to spend that much monthly you could make room for the equipment
    Gift
  • Veho @ Veho:
    But you wouldn't have a personal trainer.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    Do you really need one? People can jog and lift gallons of water if they had to
    Gift
  • Veho @ Veho:
    Anyway, if the guy/girl actually works with you, let's say an hour per visit, three times a week, four weeks per month, that's a pretty low hourly rate.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    I lost tons of weight just by having a job
    Gift
  • Veho @ Veho:
    I gained a ton of weight simply by having a job where I sit down and stress eat all the time.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    You can pay me $90 a month to yell in your face over that
    Gift
  • Veho @ Veho:
    Yeah okay. But I want actual yelling. I want the "Full Metal Jacket" drill sargeant thing, the whole time.
    Gift
  • Veho @ Veho:
    No goofing off.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    I can taze you for an extra $10
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    10,000 volts of goodness
    Gift
  • Veho @ Veho:
    That really stimulates the muscles.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    My thermostat is acting all fuckery I keep having to raise the temp every time like it's not staying where I put it
    Gift
  • Veho @ Veho:
    Put on a sweater you wimp.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    Why when I have porn
    Gift
  • AncientBoi @ AncientBoi:
    gay porn. yesssssssssssssssssssssss
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    Mad gay
    Gift
  • Veho @ Veho:
    He's trying to start a fire by rubbing two sticks together.
    Gift
  • Veho @ Veho:
    But he only has one.
    Gift
  • Gift
  • AncientBoi @ AncientBoi:
    hahahahaha
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    Women have two holes why can't me have two penises
    Gift
  • Gift
  • godreborn @ godreborn:
    there is a deformity in which a man can have two penises, but I forgot the name of it. it was a trivia question in trivial pursuit. haha
    Gift
  • AncientBoi @ AncientBoi:
    how trivial of you to point it out @godreborn. hahaha jk
    Gift
    AncientBoi @ AncientBoi: how trivial of you to point it out @godreborn. hahaha jk