pvscent

pvscent — Calculate the spectral centroid of a signal.

Description

Canculate the spectral centrols of a signal from its discrete Fourier transform.

Syntax

kcent pvscent fsig

Performance

kcent -- the spectral centroid

fsig -- an input pv stream

Examples

Example 297. Example

		
ifftsize = 1024  
iwtype = 1    /* cleaner with hanning window */
ipos = -0.8  /* to the left of the stereo image */
iwidth = 20  /* use peaks of 20 points around it */

a1   soundin "input.wav"

fsig pvsanal   a1, ifftsize, ifftsize/4, ifftsize, iwtype
kcen pvscent   fsig
adm  oscil     32000, kcent, 1
   
       out    adm
        

Credits

Author: John ffitch;
March 2005

New plugin in version 5

March 2005.