SuperCollider CLASSES

PV_BinScramble

Scramble bins.

Description

Randomizes the order of the bins. The trigger will select a new random ordering.

Class Methods

*new (buffer, wipe: 0, width: 0.2, trig: 0)

Arguments:

buffer

FFT buffer.

wipe

Scrambles more bins as wipe moves from 0 to 1.

width

A value from zero to one, indicating the maximum randomized distance of a bin from its original location in the spectrum.

trig

A trigger, that selects a new random ordering.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");

(
//trig with MouseY
SynthDef("help-binScramble", { arg out=0, soundBufnum=2;
    var in, chain;
    in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
    chain = FFT(LocalBuf(2048), in);
    chain = PV_BinScramble(chain, MouseX.kr , 0.1, MouseY.kr > 0.5 );
    Out.ar(out, 0.1 * IFFT(chain).dup);
}).play(s, [\soundBufnum, b]);
)