Classes | UGens > FFT

PV_MagSquared : PV_ChainUGen : WidthFirstUGen : UGen : AbstractFunction : Object

Square magnitudes.
Source: FFT.sc

Description

Squares the magnitudes and renormalizes to previous peak. This makes weak bins weaker.

Class Methods

PV_MagSquared.new(buffer)

Arguments:

buffer

FFT buffer.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

s.boot;

(
b = Buffer.alloc(s,2048,1);
c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
)

(
SynthDef("help-magSquared", {  arg out=0, bufnum=0, soundBufnum=2;
    var in, chain;
    in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
    chain = FFT(bufnum, in);
    chain = PV_MagSquared(chain);
    Out.ar(out, 0.003 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnum, b.bufnum, \soundBufnum, c.bufnum]);
)