Set your panel width and sequence length. Choose MLS, Gold (for odd m: 7, 31, 127), or pseudo-random with a run-length cap. Cell width auto-scales. Shift the sequence with arrows (bit-strings are cyclic).
Sequence types - what they mean
MLS (m-sequence): Mathematically flat spatial spectrum (best theoretical broadband scattering). May contain some long runs of identical bits.
Gold code: XOR of two MLS of the same length; near-flat spectrum with very small ripple. Often nicer run distribution. Only classic 3-valued correlation when m is odd (lengths 7, 31, 127).
Pseudo-random (PRN): Randomly generated 0/1, you can cap the max consecutive bits. Constraints can add mild periodicity reducing diffusion effectivness.
Gold codes enabled for lengths 7, 31, and 127 (odd m). For 15 and 63, pick MLS or PRN.
——
License notice: By Tenson @ DIYAudio.com - I relinquish all rights to this code. You may copy, modify, and share it freely without attribution.