PowerNoise employs LFSR-based synthesis for the noise channels, using linear-feedback shift registers for sound generation.
a linear-feedback shift register is one method used for random number generation.
it works by shifting a sequence of binary numbers (bits), taking the last bit into the output. then one of the bits is either pushed back into the register, or combined with another, doing a XOR (exclusive or) operation and then being pushed back.
think of it as a conveyor carrying glass bottles. each bottle may be empty or carrying water.
the bottle at the end is taken. if there's water, then the output is 1. if it's empty, the output is 0.
depending on the LFSR configuration:
- a bottle is pushed into the conveyor. it is either empty or filled with water depending on the bottle at a specific position in the conveyor (this is called a "tap"), or
- two bottles at specific positions ("taps") are looked at and combined as follows:
- if the bottles are identical, an empty bottle is pushed.
- if one bottle has water but the other is empty, a watee bottle is pushed.
the process is repeated indefinitely.
PowerNoise uses either one or two taps for the LFSR, configurable via the Control macro.
the LFSR must be initialized before it can produce sound. the Load LFSR macro allows you to do so.
by default the LFSR is configured to produce square waves, by having a single tap in position 1 and an alternating LFSR pattern.