How to get a good dmc without noise??

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
How to get a good dmc without noise??
by on (#47921)
Hello everyone.
I made a program to play dmc, but there are a lot of noise. I used DMCconv.exe or 81.exe ,for example

DMCconv.exe zzm.wav zzm.dmc
or
81 zzm.wav zzm.dmc

zzm.wav is 44100hz --16bit --mono

by on (#47923)
For one thing, 44100 Hz is too high for this channel. The highest you're going to get is rate $F, which is about 33500 Hz. For another, delta modulation just has slope overload and granularity as. Try playing with the EQ so that there isn't as much treble in the loud parts.

by on (#47943)
Hello tepples!Thanks for your reply :D
Which Sampling rate is better? if I use "DMCconv" to convert music,the wav file must be 44100Hz-16bit-mono.Have you a good idea?
How to use your tool "81.exe", there are nothing intro document for it.
I see other people used it like is "81.exe zzm.wav zzm.bin 300", what's means about "300"? I think it is sampling rate right? but why doesn't write 331 (33.14KHz),Can you tell me your email ? I want to show my demo for you, or Can you send a song your fixed to me ?

by on (#47949)
zhengyaxin_8bit wrote:
Hello tepples!Thanks for your reply :D
Which Sampling rate is better?

The NES supports these sample rates:

4182 Hz
4711 Hz
5265 Hz
5594 Hz
6259 Hz
7047 Hz
7920 Hz
8364 Hz
9421 Hz
11188 Hz
12606 Hz
13984 Hz
16887 Hz
21310 Hz
24861 Hz
33148 Hz

Quote:
How to use your tool "81.exe", there are nothing intro document for it.

There are some comments in the source code:
Code:
81 by Damian Yerrick: compresses pcm wav file
usage: 81 infile outfile [upsample_pct [amplitude]]
example: 81 song.wav song.dmc 100 24

Code:
This program compresses 8-bit .wav samples into the 1-bit
delta modulation format that the Famicom and NES use to store
sampled sound.  While compressing, it scales the volume to a
more NES-friendly range and oversamples the sound.  Tip: set
oversampling to 414% for 8 kHz samples or 300% for 11 kHz samples.
Play them back on the NES at speed $F (33 KHz).


Amplitude can be up to 32; it's a tradeoff between granular noise and slope overload. Lower values are quieter with more granular noise; higher values are louder with more slope overload.

Quote:
I see other people used it like is "81.exe zzm.wav zzm.bin 300", what's means about "300"? I think it is sampling rate right?

It's the oversampling ratio. For example, 100 is 100%, and 300 is 300% (or three times as slow). I used 300% on an old PC made in 1995 with an 8-bit Sound Blaster that couldn't record at higher than 11 kHz to get my recording up to 33148 Hz.

Quote:
Can you tell me your email ? I want to show my demo for you

Unless it's something that needs to be private, I'd prefer to keep it on the forum. Can you upload your demo to megaupload?

by on (#47954)
How to upload my demo to megaupload on this forum?
Under your way ,I made dpcm again,but there have still a lot of noise,

Now ,my wave file is 11KHz-8bit-mono,
"81.exe zzm.wave zzm.bin 300 32"

I try to fix zzm.wav by cooledit --noise reduction and Graphic Equalizer function . But it doesn't I wanted.

How to correct used EQ? :cry:

by on (#47955)
There is no way you'll get a non-noisy sound out of the DPCM channel using 1-bit samples. No matter what you'll do everything will sound horrible (at least for me it did), the only way is to use $4011 so you can have full 7-bit resolution (usually at the cost of almost all CPU time).
how to reduce the noise
by on (#47978)
As we all know that we can not avoid the noice completly.Is there any way to reduce the voice to the utmost extent.??

by on (#47990)
Thanks for everyboby! :lol:
Under your help, I successed make a music ! The noise isn't happend by pcm.

But I have still a question about dpcm, why in this mode ,the noise is so big, have you a good idea for it?

by on (#47997)
You're trying to compress audio to 1 bit per sample. In order to pull that off successfully, you need a much stronger algorithm than the +2/-2 of DPCM. You need at least MP3, and the NES can't play MP3 without a lot of hardware on the cart. So unless you're designing a game around stopping and saying something (e.g. Big Bird's Hide and Speak), you might just have to live with the noise. It's an NES, not a PlayStation.

by on (#48006)
zhengyaxin_8bit wrote:
But I have still a question about dpcm, why in this mode ,the noise is so big, have you a good idea for it?


It's very dependent on the shape of the sound waveform. Delta Pulse Code Modulation, the 'delta' means it only records the changes in the waveform (one bit - wave only goes up or down). So of the simpler sound chips, a square wave would be reproduced the worst. A triangle-shaped wave would reproduce the best.

It's kind of tough to get a clean sound out of it. Maybe a low-pass filter could help. Reducing volume seems to help some samples sound better, but increases the noise.

by on (#48083)
Tepples : I was about to embark on writing my own WAV->DPCM tool but stumbled across this thread while looking for info on DMCCONV.

Nice job, saved me some considerable work. :)

Compiled first time in Xcode (OSX) too. Nice.