Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
Can't say I understand much of it, but the second link has pretty cool image (http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Pcm.svg/250px-Pcm.svg.png). It looks just like the wave channel on the gameboy. In boyscout, a gameboy tracker, you can program this channel to play waveforms that you "draw" in a 32x16 window, resulting in lots of different sounds. Is there any chance we could see something like the gameboy wave channel in famitracker? Or a program where you can "draw" dpcm samples rather than converting existing samples?
Forgive my stupidness if I don't know what I'm talking about.
Duuuh. Yeah. Of course it's PCM. *repeatedly bangs head on desk*
Ahem. So. I don't really get it, still, but I'll try to read up on this some more.
EDIT: Ok, now I understand what DPCM is. So the NES DPCM channel basically plays a "sample" that contains of a table of... er, stuff, that when played rapidly results in sound? And this table contains values ranging from 0-15 (4bit)?
Can .dmc samples be visualized somehow? Like wavefiles in a wave editor?
Actually, DPCM is more like PWM than it is like PCM. Both DPCM and PWM are modulated PCM waveforms, though they're not modulated in quite the same way. Don't let the acronyms fool you into thinking that DPCM is more like PCM just 'cause it has PCM in the name.
DPCM works like this. The NES uses 1-bit DPCM, meaning every bit contains a new sample. To decode the waveform, the NES uses what's called a "delta counter", and it starts at 0. (I think it may not be represented as a 0 in the hardware, but we're not concerned with that yet; we're only concerned with the idea of the algorithm.) Now, a bit can only be 0 or 1, of course, so a value of 0 decreases the counter and a value of 1 increases it. The value of the counter is what gets output to the hardware as the waveform. For example, consider this stream of bits: 11111111 00000000 11111111 00000000 11111111 00000000 11111111 00000000 11111111 00000000 11111111 00000000
See what it does? It goes up for 8 samples, then down for 8 samples, then it repeats the process over and over... the sound wave goes up and down, up and down... it's a triangle wave!
The audio output will be something like this, going bit by bit:
12345678 76543210 12345678 76543210, etc.
You'll notice that only being able to go up and down means you can't get a flat line. If you need a flat line, the best you can do is approximate it by just alternating between going up and down, like 10101010. It also means you can't just jump from the top of the waveform to the bottom; instead you have to make a diagonal line one step at a time. This is why you can't get a square wave with pure DPCM. These two limitations are what give the NES's DPCM channel its distinctive sound (including why it sounds like crap ).
There was a page somewhere that explains all this and has a couple of neat graphs that show you what's going on and what happens to more complex waveforms, but I don't know where it is. ([b]EDIT:[/b] oh, [url=http://www.owlnet.rice.edu/~elec301/Projects99/adda/dmod.html]here it is. Compare the green line to the red line: the green line goes up when the red line is at the top, and it goes down when it's at the bottom. The red line is the DPCM signal and the green line is the delta counter.)
Thanks, furrykef. Interesting that the dmc channel only allows for 1 step up and 1 step down, no flats and no other step lengths. I'd like to see the bit sequence for an actual dmc file (like the konami "hey!" used in e.g. tmnt3)... I wonder how I should go about doing that.
[quote=Dafydd]Thanks, furrykef. Interesting that the dmc channel only allows for 1 step up and 1 step down, no flats and no other step lengths. I'd like to see the bit sequence for an actual dmc file (like [u]the konami "hey!" used in e.g. tmnt3[/u])... I wonder how I should go about doing that.[/quote]
[url=http://img64.imageshack.us/img64/2950/tmnt3hey.png]Intriguing that you should make such a request… :D
(I tried to get it as stretched out as I could, which you'd think would be easier considering I've got two screens here… :/)
P.S.: Sorry for bumping a basically-dead thread, but — I felt I had to.