supercollider - How do I add a random offset to values in a Pseq? -


given pseq similar following:

pseq([1, 2, 3, 4, 5, 6, 7, 8], inf) 

how randomise values each time? is, not randomly alter 8 values once @ initialisation time, have random offset added each time value sent stream?

here's neat way:

(pseq([1, 2, 3, 4, 5, 6, 7, 8], inf) + pgauss(0, 0.1)) 

first need know pgauss pattern generates gaussian random numbers. can use other kind of pattern such pwhite.

then need know pleasant bit: performing basic math operations on patterns (as above) composes patterns (by wrapping them in pbinop).


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -