2 summary:: Unpack a single value (magnitude or phase) from an FFT chain
4 related:: Classes/PackFFT, Classes/UnpackFFT
7 Unpack1FFT(chain, bufsize, binindex, whichmeasure=0)
10 Takes an FFT chain and extracts a single scalar value as a demand-rate stream. To call it you need a "demander" which fires whenever the FFT chain fires - this is normally achieved using link::Classes/PackFFT:: but can also be done using link::Classes/Demand::.
13 The main purpose of this UGen is as a component in pvcollect, pvcalc, and pvcalc2 processes. You're welcome to use it on its own - the example below shows basic usage. But most people won't typically need to use it directly.
24 the size of the expected input FFT frames
26 the integer index of the bin you want to query
27 argument:: whichmeasure
28 0 for magnitude and 1 for phase. None of these arguments can be modulated.
34 c = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
38 // Let's extract the DC component - i.e. the magnitude at index zero.
43 sig = PlayBuf.ar(1, c, BufRateScale.kr(c), loop: 1);
44 chain = FFT(LocalBuf(fftsize), sig);
46 unp = Unpack1FFT(chain, b.numFrames, 0, 0);
48 // Demand some data from the unpacker
49 Demand.kr(chain>=0, 0, unp).poll(chain>=0, "unpacked value");