Offline

Hey Chiptune Fans!

So for the past year I've been working on the soundtrack for a game called Silver Grapple (not sure what the rules are on promotion here) and have been entirely emulating (to a tee may I add) the NES VRC6 chipset via Plogue's Chipsounds. I'm looking to do something special for one or two of the tracks, but Chipsounds isn't able to accurately emulate the way NES hardware dealt with its DPCM samples. so I want to do everything I can to MAKE it emulate it. I can load in individual samples to play on individual midi notes (can't pitch them) but what I need to know is:

1. What were the size and quality limitations on DPCM samples?
2. How were they programmed and tuned, such the famous SunSoft Bass!?
3. Were there any limitations on how many samples or how heavily a sample could be used?

Basically what I plan on doing is loading the samples into Chipsounds and (following your guidelines) ensure that they are programmed in a way that I could nearly 100% perfectly recreate the song using Famitracker and an actual VRC6 chip (something i'm not doing now because time and lazy)

Any help you can give would be ENORMOUSLY appreciated, so thank you in advance, oh and I'll try and get your usernames in the credits or something, you helped so you definitely deserve it.

Offline
Praha, Czech republic
puddingmama wrote:

Hey Chiptune Fans!

Hi

The nesdev wiki is the definitive reference on this: http://wiki.nesdev.com/w/index.php/APU_DMC. It's also extremely technical, so I'll try to sum everything up.

puddingmama wrote:

1. What were the size and quality limitations on DPCM samples?

If you know how regular PCM works, let's start from there. Imagine you've got a 7-bit PCM channel. Now, instead of being able to change to any other value each sample, the DPCM channel can only increase or decrease by one from the previous value (so it also acts as something reminiscent of a typical lowpass filter). That also means that if your sample contains silent parts, these are actually converted to a sequence of +1 / -1 / +1 / -1.
A picture can probably do way more to illustrate the difference (top: PCM, bottom: in DPCM)

(I've used a snare sample)

puddingmama wrote:

3. Were there any limitations on how many samples or how heavily a sample could be used?

In theory, you can use bankswitching and just continually stream new sample data (you can verify that in FamiTracker btw). In practice, ROM chips were not free, so games usually had a few one-shot samples and since they didn't want to bankswitch during playback either, these had to fit in a specific memory range, $C000 - $FFF9, just about 16kB. At the standard rate (33143.9 Hz), that gave you about 2 seconds.
So to answer your question - there are no theoretical limitations, but if you'd like to maintain the feel of actual old game soundtracks, you'd use short samples.

puddingmama wrote:

2. How were they programmed and tuned, such the famous SunSoft Bass!?

The DPCM channel has a rudimentary way of playing the sample back at different rates that approximate some musical notes. I believe sunsoft bass used exactly that technique. I'd suggest you look at the pitch table in the nesdev document I've linked, especially at the note column, to see how dirty that actually was :].
Nowadays, it's also common to just have different samples for different notes and play them all at the maximum frequency. It all depends on what you're trying to achieve.

puddingmama wrote:

Basically what I plan on doing is loading the samples into Chipsounds and (following your guidelines) ensure that they are programmed in a way that I could nearly 100% perfectly recreate the song using Famitracker and an actual VRC6 chip (something i'm not doing now because time and lazy)

I'd say just load the samples to FamiTracker, have them all played once, export that to WAV and then load the results into chipsounds. It's a bit of extra work, but worth it if you'd like to sound authentic.

EDIT: Oh, and just a small clarification, it's actually the 2A03 chip (that's the NES CPU with integrated sound circuitry) that has the sample channel.

Last edited by kvee (Jul 6, 2017 8:00 am)

Offline
Geneva, NY
puddingmama wrote:

...but Chipsounds isn't able to accurately emulate the way NES hardware dealt with its DPCM samples...

No, that's not true. Chipsounds' DPCM emulation is spot on. Take a look at the 2A0X.sfz file (C:\Program Files\Plogue\chipsounds\Programs\01. Pure Chip\) in a good text editor (Notepad++, etc) and go down to somewhere around line 160. You'll see this:

<region> key=36 sample_freq=261.6255653006 sample=*com.Plogue.DAC.6Bit.Linear.DPCM|$DIR/drums/joe_8bit/KickJoe1.raw

This is your hack heaven. If you have .dmc or .raw samples you want to use, you can stick them in the referenced folder (C:\Program Files\Plogue\chipsounds\Data\drums), copy this line and change the "key=" number and sample name. I've done it a ton over the years.

Offline

So you guys are AMAZING!!!!! Thanks to your advice I've managed to to create a whole fucking piano part using just 10 samples! Honestly you've helped me create the chiptune of my dreams!

So the game is called Silver Grapple, its out on August 26 and I'm making sure you both get listed in the credits, I couldn't have done this without you! heres a link if you want to look http://store.steampowered.com/app/59508 … r_Grapple/ (i really hope I'm allowed to post that, I'm not sure about the rules on promotion here).

If you guys have emails I'll gladly send you on the soundtrack as well, least I can do!

Offline
Praha, Czech republic

PM'd