Pvoss 1/f noise generator


superclass: Pattern


This class implements the classic Gardner-Voss algorithm for 1/f noise. This type of signal is noteworthy for algorithmic composition because of its self-similar (fractal) qualities.


See also: Pmcvoss


Pvoss(lo, hi, generators, length)


lo, hi lower and upper boundary of values (default: 0.0 and 1.0)

generators number of random number generators to use (default: 8)

length number of values produced (default: inf)


The higher the number of generators, the smoother the signal.


// plot

(a = Pvoss.new.asStream.nextN(350)).plot(minval: a.minItem.floor, maxval: a.maxItem.ceil);


// for pitch (non-tempered) -- default number of generators

p = Pbind(

\midinote, Pvoss(48, 72),

\dur, 0.125

).play;


p.stop;



// for pitch (non-tempered) -- fewer generators = 4

// leaps between notes are larger on average

p = Pbind(

\midinote, Pvoss(48, 72, 4),

\dur, 0.125

).play;


p.stop;