Noise channel fact check

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

Moderator: Moderators

Post Reply
User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA

Noise channel fact check

Post by noattack »

I'm writing up a description of the APU's voices, and I wanted to make sure my noise description was technically accurate:
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?
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Noise channel fact check

Post by Bregalad »

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.
Last edited by Bregalad on Mon May 19, 2014 12:37 am, edited 1 time in total.
User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA

Re: Noise channel fact check

Post by noattack »

Yeah, I'm only providing a few examples, not an exhaustive list.

Regarding 93 vs. 127, the wiki says:
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?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Noise channel fact check

Post by lidnariq »

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).
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Noise channel fact check

Post by tepples »

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.
Post Reply