Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/specdesc.c

    rc23e591 r2763582  
    3131void aubio_specdesc_complex(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
    3232void aubio_specdesc_phase(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
    33 void aubio_specdesc_wphase(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
    3433void aubio_specdesc_specdiff(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
    3534void aubio_specdesc_kl(aubio_specdesc_t *o, const cvec_t * fftgrain, fvec_t * onset);
     
    5958        aubio_onset_complex,        /**< complex domain */       
    6059        aubio_onset_phase,          /**< phase fast */           
    61         aubio_onset_wphase,         /**< weighted phase */
    6260        aubio_onset_kl,             /**< Kullback Liebler */
    6361        aubio_onset_mkl,            /**< modified Kullback Liebler */
     
    160158  onset->data[0] = aubio_hist_mean(o->histog); 
    161159  //onset->data[0] = fvec_mean(o->dev1);
    162 }
    163 
    164 /* weighted phase */
    165 void
    166 aubio_specdesc_wphase(aubio_specdesc_t *o,
    167     const cvec_t *fftgrain, fvec_t *onset) {
    168   uint_t i;
    169   aubio_specdesc_phase(o, fftgrain, onset);
    170   for (i = 0; i < fftgrain->length; i++) {
    171     o->dev1->data[i] *= fftgrain->norm[i];
    172   }
    173   /* apply o->histogram */
    174   aubio_hist_dyn_notnull(o->histog,o->dev1);
    175   /* weight it */
    176   aubio_hist_weight(o->histog);
    177   /* its mean is the result */
    178   onset->data[0] = aubio_hist_mean(o->histog);
    179160}
    180161
     
    270251  else if (strcmp (onset_mode, "phase") == 0)
    271252      onset_type = aubio_onset_phase;
    272   else if (strcmp (onset_mode, "wphase") == 0)
    273       onset_type = aubio_onset_wphase;
    274253  else if (strcmp (onset_mode, "mkl") == 0)
    275254      onset_type = aubio_onset_mkl;
     
    313292      break;
    314293    case aubio_onset_phase:
    315     case aubio_onset_wphase:
    316294      o->dev1   = new_fvec(rsize);
    317295      o->theta1 = new_fvec(rsize);
     
    348326      o->funcpointer = aubio_specdesc_phase;
    349327      break;
    350     case aubio_onset_wphase:
    351       o->funcpointer = aubio_specdesc_wphase;
    352       break;
    353328    case aubio_onset_specdiff:
    354329      o->funcpointer = aubio_specdesc_specdiff;
     
    404379      break;
    405380    case aubio_onset_phase:
    406     case aubio_onset_wphase:
    407381      del_fvec(o->dev1);
    408382      del_fvec(o->theta1);
Note: See TracChangeset for help on using the changeset viewer.