basic UAna objects
Base class from which all unit analyzers (UAnae) inherit;
UAnae (note plural form) can be interconnected via =>
(standard chuck operator) or via =^ (upchuck operator),
specify the the types of and when data is passed between
UAnae and UGens. When .upchuck() is invoked on a given
UAna, the UAna-chain (UAnae connected via =^) is traversed
backwards from the upchucked UAna, and analysis is performed
at each UAna along the chain; the updated analysis results
are stored in UAnaBlobs. Please see UAna documentation
in the language specification.
This object contains results associated with UAna analysis.
There is a UAnaBlob associated with every UAna. As a UAna
is upchucked, the result is stored in the UAnaBlob's floating
point vector and/or complex vector. The intended interpretation
of the results depends on the specific UAna.
(control parameters)
- float .fval( int index ) -
- complex .cval( int index ) -
- float[] .fvals() -
- complex[] .cvals() -
- time .when() -
This class contains static methods for generating common
transform windows for use with FFT/IFFT. The windows are
returned in a static array associated with the Windowing
class (note: do not use the returned array for anything
other than reading/setting windows in FFT/IFFT).
(control parameters)
- float[] .rectangle( int lenght ) -
- float[] .triangle( int lenght ) -
- float[] .hann( int lenght ) -
- float[] .hamming( int lenght ) -
- float[] .blackmanHarris( int lenght ) -
examples: win.ck
domain transformations
This UAna computes the Fast Fourier Transform on incoming
audio samples, and outputs the result via its UAnaBlob as
both the complex spectrum and the magnitude spectrum. A
buffering mechanism maintains the previous FFTsize # of
samples, allowing FFT's to be taken at any point in time,
on demand (via .upchuck() or by upchucking a downstream UAna;
see UAna documentation). The window size
(along with an arbitry window shape) is controlled via the
.window method. The hop size is complete dynamic, and is
throttled by how time is advanced.
(control parameters)
- .size - ( float, READ/WRITE ) -
- .window() - ( float[], READ/WRITE ) -
- .windowSize - ( int, READ only ) -
- .transform - ( float[], WRITE only ) -
- .spectrum - ( complex[], READ only ) - manually retrieve the results of a transform
(UAna input/output)
- input: audio samples from an incoming UGen
- output: spectrum in complex array; magnitude spectrum in float array
examples:
fft.ck, fft2.ck,
fft3.ck, win.ck
This UAna computes the inverse Fast Fourier Transform on
incoming spectral frames (on demand), and overlap-adds the
results into its internal buffer, ready to be sent to
other UGen's connected via =>. The window size
(along with an arbitry window shape) is controlled via the
.window method.
(control parameters)
- .size - ( float, READ/WRITE ) -
- .window() - ( float[], READ/WRITE ) -
- .windowSize - ( int, READ only ) -
- .transform - ( complex[], WRITE only ) -
- .samples - ( float[], READ only ) -
(UAna input/output)
- input: complex spectral frames (either via UAnae connected via =^, or manullay via .transform())
- output: audio samples (overlap-added and streamed out to UGens connected via =>)
examples:
ifft.ck, fft2.ck,
ifft3.ck
This UAna computes the Discrete Cosine Transform on incoming
audio samples, and outputs the result via its UAnaBlob as
real values in the D.C. spectrum. A
buffering mechanism maintains the previous DCT size # of
samples, allowing DCT to be taken at any point in time,
on demand (via .upchuck() or by upchucking a downstream UAna;
see UAna documentation). The window size
(along with an arbitry window shape) is controlled via the
.window method. The hop size is complete dynamic, and is
throttled by how time is advanced.
(control parameters)
- .size - ( float, READ/WRITE ) -
- .window() - ( float[], READ/WRITE ) -
- .windowSize - ( int, READ only ) -
- .transform - ( float[], WRITE ) -
- .spectrum - ( float[], READ only ) - manually retrieve the results of a transform
(UAna input/output)
- input: audio samples (either via UAnae connected via =^, or manullay via .transform())
- output: discrete cosine spectrum
examples:
dct.ck
This UAna computes the inverse Discrete Cosine Transform on
incoming spectral frames (on demand), and overlap-adds the
results into its internal buffer, ready to be sent to
other UGen's connected via =>. The window size
(along with an arbitry window shape) is controlled via the
.window method.
(control parameters)
- .size - ( float, READ/WRITE ) -
- .window() - ( float[], READ/WRITE ) -
- .windowSize - ( int, READ only ) -
- .transform - ( float[], WRITE ) -
- .samples - ( float[], WRITE ) -
(UAna input/output)
- input: real-valued spectral frames (either via UAnae connected via =^, or manullay via .transform())
- output: audio samples (overlap-added and streamed out to UGens connected via =>)
examples:
idct.ck
This UAna computes the RMS power mean from a magnitude
spectrum (either from an incoming UAna, or given manually),
and outputs one value in its blob.
(control parameters)
- float .compute( float[] ) -
(UAna input/output)
- input: complex spectral frames (e.g., via UAnae connected via =^)
- output: the computed RMS value is stored in the blob's floating point vector, accessible via .fval(0)
examples:
rms.ck
This UAna computes the spectral rolloff from a magnitude
spectrum (either from incoming UAna, or given manually),
and outputs one value in its blob.
(control parameters)
- float .percent( float val) -
- float .percent( ) -
- float .compute( float[] ) -
(UAna input/output)
- input: complex spectral frames (e.g., via UAnae connected via =^)
- output: the computed rolloff value is stored in the blob's floating point vector, accessible via .fval(0). This is a normalized
value in the range [0,1), mapped to the frequency range 0 to nyquist frequency.
examples:
rolloff.ck