DPCM Volume Editing

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
Eightbit Allstar
Posts: 59
Joined: Wed Dec 10, 2008 9:36 am
Location: Austria
Contact:

DPCM Volume Editing

Post by Eightbit Allstar » Sun Feb 14, 2010 12:00 pm

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.

tepples
Posts: 22019
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: DPCM Volume Editing

Post by tepples » Sun Feb 14, 2010 1:03 pm

Eightbit Allstar wrote:Lets say I got a drum sample, ripped from a game.
Lawsuit?
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.
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.

User avatar
Eightbit Allstar
Posts: 59
Joined: Wed Dec 10, 2008 9:36 am
Location: Austria
Contact:

Re: DPCM Volume Editing

Post by Eightbit Allstar » Sun Feb 14, 2010 1:16 pm

tepples wrote:
Eightbit Allstar wrote:Lets say I got a drum sample, ripped from a game.
Lawsuit?
It might be FLAGGED!
tepples wrote:
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:
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

User avatar
Anders_A
Posts: 88
Joined: Mon Nov 27, 2006 11:56 pm
Location: Sollentuna, Sweden

Post by Anders_A » Sun Feb 14, 2010 2:06 pm

no. like 10110100 becomes 1100111100110000

User avatar
tokumaru
Posts: 11766
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sun Feb 14, 2010 2:13 pm

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?

User avatar
Bregalad
Posts: 7890
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Sun Feb 14, 2010 3:13 pm

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.
Life is complex: it has both real and imaginary components.

CartCollector
Posts: 122
Joined: Mon Oct 30, 2006 8:32 pm

Post by CartCollector » Sun Feb 28, 2010 6:32 pm

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

User avatar
Eightbit Allstar
Posts: 59
Joined: Wed Dec 10, 2008 9:36 am
Location: Austria
Contact:

Post by Eightbit Allstar » Wed Mar 03, 2010 10:48 am

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. :)

Post Reply