Changeset 6352034 for src


Ignore:
Timestamp:
Mar 11, 2017, 12:12:44 AM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
04ebe31
Parents:
2f99427
Message:

src/onset/onset.c: add logarithmic compression

Using these default parameters with the good old HFC, we reach the
following scores:

mirex-2005 | F 80.393 | P 80.841 | R 79.950 | TP 7616 | FP 1360 | Tot 9526
holzapfel | F 69.441 | P 77.803 | R 62.702 | TP 1360 | FP 388 | Tot 2169

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    r2f99427 r6352034  
    4747  uint_t last_onset;            /**< last detected onset location, in frames */
    4848
     49  uint_t apply_compression;
     50  smpl_t lambda_compression;
    4951  uint_t apply_adaptive_whitening;
    5052  aubio_spectral_whitening_t *spectral_whitening;
     
    5961  if (apply_filtering) {
    6062  }
    61   if (apply_compression) {
    62   }
    6363  */
    6464  if (o->apply_adaptive_whitening) {
    6565    aubio_spectral_whitening_do(o->spectral_whitening, o->fftgrain);
     66  }
     67  if (o->apply_compression) {
     68    cvec_logmag(o->fftgrain, o->apply_compression);
    6669  }
    6770  aubio_specdesc_do (o->od, o->fftgrain, o->desc);
     
    260263  aubio_onset_set_minioi_ms (o, 50.);
    261264  aubio_onset_set_silence (o, -70.);
    262   aubio_onset_set_adaptive_whitening (o, 1);
     265  aubio_onset_set_adaptive_whitening (o, 0);
     266
     267  o->apply_compression = 0;
     268  o->lambda_compression = 1.;
    263269
    264270  /* method specific optimisations */
    265271  if (strcmp (onset_mode, "energy") == 0) {
    266272  } else if (strcmp (onset_mode, "hfc") == 0 || strcmp (onset_mode, "default") == 0) {
     273    aubio_onset_set_threshold (o, 0.058);
     274    o->apply_compression = 1;
     275    o->lambda_compression = 1.;
    267276    aubio_onset_set_adaptive_whitening (o, 0);
    268277  } else if (strcmp (onset_mode, "complexdomain") == 0
     
    270279    aubio_onset_set_delay (o, 4.6 * o->hop_size);
    271280    aubio_onset_set_threshold (o, 0.15);
     281    o->apply_compression = 1;
     282    o->lambda_compression = 1.;
    272283  } else if (strcmp (onset_mode, "phase") == 0) {
     284    o->apply_compression = 0;
    273285    aubio_onset_set_adaptive_whitening (o, 0);
    274286  } else if (strcmp (onset_mode, "mkl") == 0) {
Note: See TracChangeset for help on using the changeset viewer.