Noise channel fact check

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Noise channel fact check
by on (#128897)
I'm writing up a description of the APU's voices, and I wanted to make sure my noise description was technically accurate:

Quote:
While the noise channel has its own frequency control like the pulses, the composer may only select from one of sixteen preset values. To produce noise, the channel relies on a continuous pseudo-random number generator (RNG) that outputs a repeating 32,767-bit sequence. Triggering the noise channel ‘taps’ into that stream in situ, meaning that two ‘identical’ noise notes are statistically unlikely to be the same. However, the noise is not truly random because its underlying bit sequence is finite and looped. The net effect is that altering the channel’s frequency alters the RNG stream’s playback rate and thus the perceived frequency content of the noise.

The noise channel had a second mode that would radically abbreviate the RNG’s output to only 93 bits, altering the channel’s standard percussive timbre to a metallic buzz. Third-partly developer Capcom in particular used it for sound effects in Darkwing Duck (e.g. dialog), Mega Man 2 (e.g. Metal Blade weapon), and Duck Tales (e.g., entering mirrors). But they also used metallic noise for several musical tracks, including Duck Tales’ traveling music, Code Name: Viper’s third level, and Mega Man 2’s Quick Man stage.


This look OK?
Re: Noise channel fact check
by on (#128898)
Looks OK to me, but the "metallic noise" mode has a repeat sequence of 127, not 93 (or at least I believe so). You can only generate pseudo random sequences of 2^n - 1 with a LSFR.

Metallic noise is used in many many games for both SFX and music, not only those you mentioned. However, some very early famicom lacks this mode, so it'll play normal noise instead. I've never seen one of such models, but playing with Nesticle gives you a good idea of how it might have sounded ;)

This fact means that perhaps some companies (I'd say Nintendo and Konami but I might be wrong) avoided this mode, in order to make sure their games sounds correct on all consoles.

EDIT : Ooops, striked out wrong information.
Re: Noise channel fact check
by on (#128899)
Yeah, I'm only providing a few examples, not an exhaustive list.

Regarding 93 vs. 127, the wiki says:

Quote:
This results in a pseudo-random bit sequence, 32767 steps long when Mode flag is clear, otherwise 93 steps long (the particular 93-step sequence depends on where in the 32767-step sequence the shift register was when Mode flag was set).


Am I misinterpreting that value somehow?
Re: Noise channel fact check
by on (#128900)
Nope, Bregalad is misremembering. Only "maximal period" LFSRs are of the form 2ⁿ-1; other divisors can happen with other sets of taps. They usually have an odd period, though. (The atari 2600's sound unit has a bunch of peculiar periods).

The 93 period one is semirandom, and will significantly change timbre depending on when you switch from white to tonal mode. (It's nigh-impossible to control exactly which you get).
Re: Noise channel fact check
by on (#128907)
The 127 one is on the Game Boy, not the NES. And I think the Game Boy resets its LFSR's state whenever the mode is changed, meaning it's always the same 127.