lfsr Signal Generators:Random (Noise) Generators lfsr lfsr Linear Feedback Shift Register (LFSR). Description Output is a series of pseudo-random positive integers. This is the technique used in so-called "Turing machine" synth modules and is usually used to generate melodic sequences. This implementation is adapted from the firmware for the Ornament & Crime module, as used in the Quantermain and Meta-Q apps. Syntax knum lfsr ilen, iprob [, iseed] Initialization ilen -- length of shift register, valid values are 1-31 (inclusive). The larger the length, the larger the resulting integers in the output. You can use this to constrain the output to a suitable range. iprob -- probability, valid values 1-255 (inclusive). Controls the spread of the output; larger values result in a wider spread of values. iseed (optional, default -1) -- initial state of the shift register, as a pattern of bits. The value is treated as an unsigned integer, so the default of -1 is effectivly all bits on (0b11111111...). Performance knum -- integer output Examples Here is an example of the lfsr opcode. It uses the file lfsr.csd. Example of the lfsr opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Random (Noise) Generators Credits By: &namedave; 2020 Based on code by Patrick Dowling in the Ornament & Crime firmware. New in version 6.16