DPCM Volume Editing

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
DPCM Volume Editing
by on (#56603)
Lets say I got a drum sample, ripped from a game. Unfortunately it's too quiet and it ain't noticeable in the mixdown. I thought of editing the DPCM file with a hex-editor, but I don't know which hex values affect the volume. (I'm using Hex Workshop Trial) I tried using AND command to increase all values (by 1) but the result obviously wasn't satisfying.

I use Famitracker and yes, I also use the Zxx effect on those.
Re: DPCM Volume Editing
by on (#56605)
Eightbit Allstar wrote:
Lets say I got a drum sample, ripped from a game.

Lawsuit?

Quote:
Unfortunately it's too quiet and it ain't noticeable in the mixdown.

First ask yourself why it isn't too quiet in the original game. Then try making other instruments in the mix quieter. Or play drums on triangle/noise at the same time as the sample.

Quote:
I thought of editing the DPCM file with a hex-editor, but I don't know which hex values affect the volume. (I'm using Hex Workshop Trial) I tried using AND command to increase all values (by 1) but the result obviously wasn't satisfying.

DPCM does not work that way. Think of a wave that can go from 0 to 63. Each 0 bit in the file means the wave steps down by 1; each 1 bit means it steps up by 1. There is a way to make an existing file louder, by repeating each bit, but you probably won't like it because it ends up twice the size and you have to play it an octave higher.
Re: DPCM Volume Editing
by on (#56607)
tepples wrote:
Eightbit Allstar wrote:
Lets say I got a drum sample, ripped from a game.

Lawsuit?


It might be FLAGGED!

tepples wrote:
Quote:
Unfortunately it's too quiet and it ain't noticeable in the mixdown.

First ask yourself why it isn't too quiet in the original game. Then try making other instruments in the mix quieter. Or play drums on triangle/noise at the same time as the sample.


It depends. I do not really like to use those exact music instruments that were in the game, I rather want to use my own ones because I think they fit better. "The game" has very "thin" leads while my leads tend to have more "punch". I'm already making the leads as quiet as possible but it doesn't help as much. :)

tepples wrote:
Quote:
I thought of editing the DPCM file with a hex-editor, but I don't know which hex values affect the volume. (I'm using Hex Workshop Trial) I tried using AND command to increase all values (by 1) but the result obviously wasn't satisfying.

DPCM does not work that way. Think of a wave that can go from 0 to 63. Each 0 bit in the file means the wave steps down by 1; each 1 bit means it steps up by 1. There is a way to make an existing file louder, by repeating each bit, but you probably won't like it because it ends up twice the size and you have to play it an octave higher.


Size isn't a big deal (for now). I may want to try this out. So you mean all I do is copy the data of the soundfile and place every bit to it's respective "companion"?

Like: F834 B730 FE94 turns into F834 F834 B730 B730 FE94 FE94

by on (#56608)
no. like 10110100 becomes 1100111100110000

by on (#56609)
You'll probably have to make a program to do that.

Or you can decode the samples, increase the volume and encode them back. I think there are tools to encode and decode samples, aren't there?

by on (#56612)
What about making drums exclusively with the other 4 channels ?
If you could tell which drum it is and from which game it was taken it might help.

by on (#57358)
Quote:
I think there are tools to encode and decode samples, aren't there?


Here you go:
http://nesdev.com/dmcconv005.zip Instructions: http://nesdev.com/DPCM_HowTo.txt
http://nesdev.com/81v2.zip

by on (#57472)
I figured it out, kinda.

Turns out Audacity is a better choice than Steinberg Wavelab. I have no clue why, I even exported from Wavelab with any setting possible (sample rates, bitrate, LAME & Fraunhofer etc.), still bad DPCM samples. Audacity on the other hand got it right the first try. :)