ChucK Unit Analyzers extract audio features from a signal for real-time analysis
Unit Analyzers (UAnas) are ChucK’s analysis counterpart to UGens: they connect into the signal graph but, instead of producing audio, perform audio analysis, spectral processing, and feature extraction (FFT magnitudes, onset, pitch). Analysis results are pulled with upchuck() and read from a UAnaBlob, and can fire ChucK Events to drive synthesis decisions. This closes the analysis-synthesis loop inside one strongly-timed program: FFT a mic input and map the frequency data to a synthesizer, all sample-synchronous. The pattern underpins live audio-reactive coding.
Examples
adc => FFT fft => blackhole;
512 => fft.size;
while(true){
fft.upchuck();
fft.cval(10) => float mag; // bin 10
mag * 440 => s.freq;
10::ms => now;
}
Assessment
Describe the UAna pitch-tracking signal path: what the UAnaBlob holds, how an Event is fired, and how you’d use the result to drive a synth in the same program.