PV_ChainUGen
is an abstract class, not used directly, but only its subclasses are. It represents phase-vocoder UGens - i.e. UGens which apply some kind of transformation to the frequency-domain signal produced by FFT.
It encompasses all unit generators whose output is an FFT chain. This is why FFT is in this group but IFFT is not - the IFFT ugen outputs ordinary time-domain audio.
For more information on using these unit generators, see FFT Overview.
Returns the FFT chain buffer's size.
pvcalc applies a function to the frequency-domain data of an FFT chain. See -pvcollect below for discussion of efficiency considerations. See also -pvcalc2 below, and UnpackFFT.
numframes |
Number of FFT frames to process |
func |
The function that takes two arrays as inputs ( |
frombin |
Range start (optional) |
tobin |
Range end (optional) |
zeroothers |
If set to 1 then bins outside of the range being processed are silenced. |
The method pvcalc2 is just like -pvcalc but can combine two FFT chains.
chain2 |
The scond FFT chain. |
numframes |
Number of FFT frames to process |
func |
The function that takes four arrays as inputs (magnitudes1, phases1, magnitudes2, phases2) and returns a resulting pair of arrays |
frombin |
Range start (optional) |
tobin |
Range end (optional) |
zeroothers |
If set to 1 then bins outside of the range being processed are silenced. |
Process each bin of an FFT chain, separately, by applying a function to each bin of an FFT chain.
numframes |
Number of FFT frames to process |
func |
The function that processes each bin. It should be a function that takes The bin is the integer bin number, starting at 0 for DC, while index is the iteration number, always starting with 0. You can optionally ignore the phase and only return a single (magnitude) value, in which case the phase is assumed to be left unchanged. |
frombin |
Range start (optional) |
tobin |
Range end (optional) |
zeroothers |
If set to 1 then bins outside of the range being processed are silenced. |
Note that this procedure can be relatively CPU-heavy, depending on how you use it. Using pvcollect (or its components, UnpackFFT & PackFFT) is usually less efficient than using a single "PV_" unit generator to process an FFT chain, because it involves the creation of quite a large graph of demand-rate unit generators.
If you wish to reduce the CPU impact of using this approach, try the following: