Re: cine sound board

From: Zonn <zonn_at_concentric.net>
Date: Wed Jun 11 1997 - 13:37:00 EDT

At 02:00 PM 6/10/97 -0500, you wrote:

> It sounds like you used a basic LFSR. The output of that LFSR is colored
noise (as you found out.) You can shape that noise by doing some other
stuff. By putting a Low-Pass filter on it's output (and taking a simple
average) you can make that noise have a Normal distribution. Your LPF
determines the mean and variance of that distribution. This LPF actually
isn't trivial (if you want a good normal distribution) it needs to be
somewhere around 10th and 20th order (I'm not sure what your guys'
backgrounds are, but if you're familiar with the Central Limit Theorem from
Probability, it says that the sum of N independent random distributions is
always Normally distributed as N gets large. What's large? About 20 --
Implying that you need a 20th order filter, give or take....)

Since the goal is not to generate Normally Distributed random numbers, but
to recreate the sounds used in Cinematronics games, I don't think you going
to need a 20th order filter. Cinematronics certainly didn't use one in
Solar Quest, and that game definitely used the Shift register approach in
generating it's noise source.

> Anyways, let me knmow if any of you guys have any info on that noise
generator...

I've seen the S2688 noise generator replaced with a MM5586 (I think that's
right) which was a National Semiconductor chip. At one time (many years
ago) I had the data sheet for one of these two parts (I can't remember
which, maybe none of the above), and I remember it being a 17 bit shift
register with feedback. I believe there was also a noisy semiconductor
noise generator available at the same time, and I don't remember which parts
are which. (Maybe the "Semiconductor" part needed +/- voltages?)

Solar Quest generates its noise with discreet components using the shift
register technique. In hardware you implement a shift register, then
through a few XOR gates you tap into some of the registers outputs to create
a value that is shifted back into the shift registers input bit.

In software the technique is to shift the register to the left, shifting in
a zero on the right. If value shifted out is a zero, you're done. If the
value shifted out is a one, then XOR the register with a mask. This
technique was used a lot to generate random numbers on small CPUs where a
multiply would take too much time.

A proper mask needs to be found that allows 2^n-1 values before repeating
itself. The easiest way to find this is to load the register with the value
'1', then run the generator and count how many values are generated before
'1' appears again. Just keep trying masks until one allows the full 2^n-1
values to be generated.

In hardware or software the value of '0' will lock up the random number
generator and must be avoided. Solar Quest has hardware to check for this
and restart the generator if a zero is detected.

Any of the pins (or register bits) can be tapped as the noise source,
usually it's the value being shifted out that's used.

There are also simple techniques for using the random number generator to
generate "Brown" noise, along with the more standard "White" and "Pink"
noises. "Brown" noise is has a much higher low frequency content and makes
for cool Thunder and Explosion effects. After passing the semiconductor
noise generators through a few stages of low pass filtering, the outputs of
the explosions, used by Cinematronics, more resemble "Brown" noise than any
of the other two types.

-Zonn
Received on Wed Jun 11 10:38:33 1997

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:31:36 EDT