Пример #1
0
 virtual void CbSignal()
 {
     int n = Blocksize()/2;
     t_sample const *in = InSig(0);
     float df = Samplerate()/2/n;
     
     float a = 0,b = 0;
     for(int i = 1; i <= n; ++i) {
         float f = log(i*df);
         a += f*in[i];
         b += in[i];
     }
     
     centroid = exp(a/b);
     
     if(autobang)
         tmr.Now();
 }
Пример #2
0
 // override signal function
 virtual void CbSignal()
 {
   _engine.audio_callback(Blocksize(), InSig(), OutSig());
 }