RedLFSR4BitStream:
Filter:
redSys/Classes (extension) | Red > redUGens

RedLFSR4BitStream
ExtensionExtension

4-bit linear feedback shift register

Description

4-bit fibonacci LFSR. see https://en.wikipedia.org/wiki/Linear_feedback_shift_register

Class Methods

.ar

.kr

Arguments:

freq

Sets the rate of the trigger that will calculate a new value.

iseed

Initial seed. Use 8 (2r1000) to get the common sequence: [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 1], [1, 1, 0, 0], [0, 1, 1, 0], [1, 0, 1, 1], [0, 1, 0, 1], [1, 0, 1, 0], [1, 1, 0, 1], [1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1]]

Returns:

Pseudo random waveform 0/1.

Examples