To extract sounds (or graphics) from a ROM, you’ll need the ndstool and ndssndext.
First extract the game data from ROM:
ndstool -x -d data <filename>.nds
This will create a new directory data
containing all the game data. In there you’ll most probably find a file *.sdat
somewhere. This is a sound archive format. Now run this through the ndssndext
(I had to use WinE):
wine ndssndext.exe sound_data.sdat
This creates a new folder which contains more folders with the actual contents from the .sdat
-file. These can be MIDI files and/or (converted) WAV files.