NDS Sound Extractor is a command line program to extract sound sequences and samples as .midi and .wav from a DS ROM. The original site for it does not have the program anymore, so you may get it from here: .
Usage : ndssndext.exe [options] <file...> Options: -x extract files only(no decoding) -s show processing status --help show this usage
You can also drag an .nds ROM onto the program and it will automatically create a folder and extract mid and wav files inside subfolders named Sequence, Stream and WaveSample.
Extracting Raw Data
ndssndext.exe -x file.nds