centroidSpectral Processing:Othercentroidcentroid
Calculate the spectral centroid of a signal.
Description
Calculate the spectral centroid of an audio signal on a given trigger.
Syntaxkcent centroid asig, ktrig, ifftsizeInitializationifftsize -- fftsize. Non pow-of-two values are converted to the next pow-of-two not smaller than ifftsize.
Performancekcent -- the spectral centroid in Hz
asig -- an input audio signal
ktrig -- 1 to calculate a new centroid, 0 to skip the process (and output previous value).
Examples
Here is an example of the centroid opcode. It uses the file centroid.csd.
Example of the centroid opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoSensing and Control: Tempo and Pitch estimationCreditsAuthor: V Lazzarini;August 2012