DPCM-bass

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
DPCM-bass
by on (#18330)
i finally got this (and a decent MML interface for it) working! thought some of you might be interested. some examples:

http://4x86.com/bassref.nsf
http://4x86.com/dmc.nsf
http://4x86.com/newtek.nsf
http://4x86.com/absolution.nsf

by on (#18336)
Sounds good! More natural, not real overpowering the the bass samples I always used.

by on (#18346)
The bass really sounds good but I wonder what DMC stands for? Still though I love the Sing for Absolution sample it has a nice mellow calm feel to it.

by on (#18351)
Delta Modulation Channel or Delta Pulse Code Modulation Channel. Samples played are limited to those whose deltas are generally always +2 or -2, always stair-stepping up or down.

by on (#18353)
And DPCM stands for DynamicPCM right?

by on (#18354)
DPCM == delta PCM
ADPCM == adaptive delta PCM, which changes the step size based on previous step sizes

by on (#18357)
blargg wrote:
Delta Modulation Channel or Delta Pulse Code Modulation Channel. Samples played are limited to those whose deltas are generally always +2 or -2, always stair-stepping up or down.


and this is why triangle waves were generally a good idea since that is how they are made (well basically anyway). the only thing i don't like about this is how lower frequencies are higher in volume (depending on how the lower frequency is reached, but below a certain point it's inevitable that lower freqs are louder and higher are softer... can't get around that without aliasing, so i've just got to accept it!)

by on (#18359)
The high-pass filter in the NES should help compensate somewhat, depending on where you encounter the issue. I haven't looked very closely at how you do this (just listened to the NSFs quickly), but I'm assuming you basically have several looped DMC samples at differen frequencies so that in combination with the DMC rates you can hit every note for a couple of octaves. If this is the case, for the lower frequency samples can you simulate zero samples by alternating between +2 and -2? This would result in a faint tone which might be reduced by randomizing the order of alternations.

With the MML integration it will be a useful technique for freeing up the triangle channel for higher notes of another melody line.

by on (#18369)
I created nsfe files of your samples just now and put your name as the ripper with track lengths and labels on each file.I put all 4 of them in a Winrar archive if you guys want them just let me know and I guess I can email them to you?

by on (#18370)
blargg wrote:
The high-pass filter in the NES should help compensate somewhat, depending on where you encounter the issue. I haven't looked very closely at how you do this (just listened to the NSFs quickly), but I'm assuming you basically have several looped DMC samples at differen frequencies so that in combination with the DMC rates you can hit every note for a couple of octaves.


well "several" being two per octave. since on the $0-$7 scale, the notes (relative to C) you get are C D E F G A B, this leaves out sharps... so with C-sharp as a base, you get C# D# F F# G# A# >C which fills in those gaps nicely. all i did for the next octave is make a sample at one octave higher (one could argue that i could have simply gone higher with the low-octave C and C# notes and added in D and D# as new bases to keep the volume consistent, but D and D# wouldn't have sounded quite as smooth.. C# was a bit rougher than C was, so i didn't stick with that idea). and yeah they're looped, but they loop every 1 second or so (some are shorter).

blargg wrote:
If this is the case, for the lower frequency samples can you simulate zero samples by alternating between +2 and -2? This would result in a faint tone which might be reduced by randomizing the order of alternations.


huh? what about +2 and -2? if you mean resetting the wave or anything, with mml and the way the music is written, i'm pretty limited to 60hz, so anything screwy like that isn't too viable. if that's what you meant.

blargg wrote:
With the MML integration it will be a useful technique for freeing up the triangle channel for higher notes of another melody line.


which is pretty much how i used it in absolution.nsf :)

by on (#18389)
From your description I take it that lower frequency samples have a higher amplitude, since there are more samples per cycle of the triangle. I was suggesting that you could keep the same amplitude by taking the sample for the higher frequency triangle and randomly distributing an equal number of 1s and 0s.

by on (#18397)
so you mean instead of

11111111 11111111 00000000 00000000 00000000 00000000 11111111 11111111 etc,

11111111 01010101 01010101 00000000 00000000 01010101 01010101 11111111 etc.

which would be the same as

FF FF 00 00 00 00 FF FF
to
FF 55 55 00 00 55 55 FF (55 and AA are interchangeable as far as i care, too lazy to look up which 01010101 actually is).

this would create a lower frequency wave that has lower volume/amplitude, but it would also create some nice aliasing that would make it not sound quite like a triangle anymore (or like two triangles, one at a low octave, one at many octaves higher).

by on (#18399)
RushJet1 wrote:
it would also create some nice aliasing that would make it not sound quite like a triangle anymore (or like two triangles, one at a low octave, one at many octaves higher).

That's what the 2A03 built-in triangle wave sounds like anyway.

by on (#18404)
RushJet1 wrote:
(55 and AA are interchangeable as far as i care, too lazy to look up which 01010101 actually is).


I can tell it's 55 because the highest bit is zero (thus below 80). :)

by on (#18411)
Quote:
but it would also create some nice aliasing that would make it not sound quite like a triangle anymore

That's why you randomize the location of the inserted bits. Simplest to just try it and see how it sounds, than imagine it. It probably wouldn't sound that great, but it's worth a shot.

by on (#19253)
Wow, nice work! It sounds just like a second triangle! This is so cool!

by on (#21797)
NICE! These are really awesome sounding Rush!

Ever hear the bass DMC on Track 5 of the Zombie Nation nsf? Funky fresh 8)