A question about wav to dpcm converting/sampling.

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
A question about wav to dpcm converting/sampling.
by on (#19733)
(bear in mind i'm not the most technically minded individual here)
Is there a limit to the wav size input/ dpcm size output? I've been messing around with that nice little "wav to dpcm converter" application (v1.0.0, 2004...), and i'm assuming it won't bother handling wavs that are too large for NES/nsf consumption. Although I don't know if this is actually true, just that it at least won't playback longer wavs and it crashes when trying to convert them.

Of course the limitation would make sense for people using it for what it's really meant for, but i'm more interested in simply achieving that sound quality, whether or not it has anything to do with real NES limitations. Is there a similar program that would have no problem handling something like a 5 second long sample, or so? And one that could possibly output to wav that sounds like it is that quality?

I've recently been getting into sample based trackers (modplug), and while I probably should learn this whole NSF business soon, I have no concern atm about fitting within limitations as I am just about getting the general sound. And i'm totally loving this dpcm converter, but it would be even sweeter if it could handle bigger/longer samples. If that's doable. :)

by on (#19734)
I wrote 81, a PCM WAVE to NES DPCM converter. I have used it to convert a minute and a half long sample spread over numerous MMC3 banks. Go to nesdev.com and look for "sample converter by Damian Yerrick".

by on (#19735)
The sample converter by Bananmos also has a 1-to-8-bit converter. I don't think they save to .wav though, just a raw 8-bit sample format. I know they load into FastTracker 2 just fine as .SMP files because I've done that before.

by on (#21810)
I think the ultimate would be a program exactly the same as this DPCM Converter that saves things to wav files. As far as Trackers are concerned, we only need to sound to be authentic.

Bucky, I've never had a problem opening full songs in the DPCM converter. Just so long as they are in wav file. The only way I know to get them back to wav files while still sounding like DPCM files is to open up an Audio Editing program and record the sound live as it is playing from the converter.

One thing I am a little unsure of, and perhaps some of you NES heads can enlighten me about, how do I get an optimal sound when converting to DPCM. Is there a certain volume level the wav file has to be, or something like that? My problem is this:

When I record vocals into wav format, then use the DPCM converter, they usually come out completely as static. Sucks. I want it to sound like "BLADES OF STEEL!". That's the dream.

by on (#21812)
Norrin_Radd wrote:
I think the ultimate would be a program exactly the same as this DPCM Converter that saves things to wav files. As far as Trackers are concerned, we only need to sound to be authentic.

I've tried that before. I converted the song "Max 300" to a DPCM file, and it was 400 KB. Given the prices of ROM during the NES's commercial era, no game could afford that much room for DPCM samples. For some definitions of "authentic", mono CD-quality audio could be considered "authentic" because it could be played through the Famicom's audio input.

Quote:
Bucky, I've never had a problem opening full songs in the DPCM converter. Just so long as they are in wav file. The only way I know to get them back to wav files while still sounding like DPCM files is to open up an Audio Editing program and record the sound live as it is playing from the converter.

If you use my sample converter, it will spit out a decomp.wav which approximates the sound that would be produced if the NES were to play back the compressed audio.

Quote:
One thing I am a little unsure of, and perhaps some of you NES heads can enlighten me about, how do I get an optimal sound when converting to DPCM. Is there a certain volume level the wav file has to be, or something like that? My problem is this:

When I record vocals into wav format, then use the DPCM converter, they usually come out completely as static. Sucks. I want it to sound like "BLADES OF STEEL!". That's the dream.

Could you zip up your .wav files and send them to me so that I can look at them?

by on (#22459)
Ok, so I've started making music with FamiTracker, so I actually need to know how to make DPCM samples now, not just make wavs that sound like them. Tepples, I am really exited to use your program for this, but I really have no idea how to convert the files. Any chance you could quickly point form the steps for me?

Starting with, how to get the file recognized in the program.

That would really rock!

by on (#22462)
If you want to convert your WAV files, you can check out this thread on 2a03:

http://www.2a03.org/forum/viewtopic.php?id=284

It is the MML / MCK Beginners guide, but the ZIP listed there contains dmcconv005.zip. It is a DOS command line program that is pretty easy to use (there is info on how to use it near the end of that thread).

NC

by on (#22464)
Norrin_Radd wrote:
Ok, so I've started making music with FamiTracker, so I actually need to know how to make DPCM samples now, not just make wavs that sound like them. Tepples, I am really exited to use your program for this, but I really have no idea how to convert the files.

From the command prompt, do this:
Code:
81 bass.wav bass.dmc

The sample rate of bass.wav should be 4182, 4710, 5264, 5593, 6258, 7046, 7919, 8363, 9420, 11186, 12604, 13982, 16885, 21307, 24858, or 33144 Hz.

by on (#23042)
Norrin_Radd wrote:
Bucky, I've never had a problem opening full songs in the DPCM converter. Just so long as they are in wav file. The only way I know to get them back to wav files while still sounding like DPCM files is to open up an Audio Editing program and record the sound live as it is playing from the converter.

Ah yeah, that's what I've been doing.
Only the DPCM converter never wanted play full songs for me. For a longer fill I wanted to sample from a new order song, I had to break it into several short wavs, convert them individually, and then piece them back together. :?

I think Tepples explanation will help me getting the converter working though. Thanks! :)

by on (#23051)
bucky o'hare wrote:
Only the DPCM converter never wanted play full songs for me. For a longer fill I wanted to sample from a new order song, I had to break it into several short wavs, convert them individually, and then piece them back together. :?

A DPCM waveform can't be longer than about 32 Ksamples. If you're running at the highest sample rate, this is just under 1 second.

by on (#23136)
Ok, my question then is this. Is there a way to make a wav file sound like a DPCM file. For example, if I wanted my new rock song to have vocals that sound like the guy from Blades of Steel, is there a way to manipulate my raw wav file to sound like an NES DPCM file. Just for the effect of it, outside of chiptunes, and NES limitations.

Is there any way to do that?

by on (#23139)
Norrin_Radd wrote:
Ok, my question then is this. Is there a way to make a wav file sound like a DPCM file. For example, if I wanted my new rock song to have vocals that sound like the guy from Blades of Steel, is there a way to manipulate my raw wav file to sound like an NES DPCM file.

Yes. Use 81 to convert it, and then look at the decomp.wav it spits out. Might it sound like this?

by on (#23235)
SWEET LORD! I got it working! I graduate from Command Prompt for noobs!

I swear, this will be the last dumb question I ever ask.... But where the heck does it spit out the wav file? I've searched my computer for what I called the DMC, and even for "Decomp.wav" but I can't find the wav equivelent to my DMC file.

by on (#23238)
Where did you get 81.exe? I want to go check if the version you downloaded has decomp.wav support.

by on (#23240)
http://nesdev.com/

However, now that you mention it, I might be using the 81.exe. I notice there is also an 81v2.exe. That must be the one I need.

Checking now.

Hmmm. Still no wav file... At least not in the folder I extract it too.

by on (#23241)
Do you know how to cut and paste from a command prompt?

by on (#23242)
I do now ^_^

Quote:
C:\Program Files\81>81.exe
syntax: 81 source.wav dest.dmc 300
oversampling % ^

C:\PROGRA~1\81>81 blood.wav Deathmetal.dmc 300
converting 4936 KB
4936 KB done
done.

C:\PROGRA~1\81>

by on (#23243)
You have the old version.

As of today, I've bundled the new version into the same package as the DPCM ripper.

by on (#23244)
Success! Thanks a lot tepples!