Changeset 340f5c7


Ignore:
Timestamp:
Mar 26, 2017, 5:45:07 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler
Children:
7b711b3
Parents:
b63c7d3
Message:

src/onset/onset.h: rename logmag_compression to compression

Location:
src/onset
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    rb63c7d3 r340f5c7  
    129129}
    130130
    131 uint_t aubio_onset_set_logmag_compression (aubio_onset_t *o, smpl_t lambda)
     131uint_t aubio_onset_set_compression (aubio_onset_t *o, smpl_t lambda)
    132132{
    133133  if (lambda < 0.) {
     
    139139}
    140140
    141 smpl_t aubio_onset_get_logmag_compression (aubio_onset_t *o)
     141smpl_t aubio_onset_get_compression (aubio_onset_t *o)
    142142{
    143143  return o->apply_compression ? o->lambda_compression : 0;
     
    285285  aubio_onset_set_awhitening (o, 0);
    286286  // disable logarithmic magnitude
    287   aubio_onset_set_logmag_compression (o, 0.);
     287  aubio_onset_set_compression (o, 0.);
    288288
    289289  /* method specific optimisations */
     
    291291  } else if (strcmp (onset_mode, "hfc") == 0 || strcmp (onset_mode, "default") == 0) {
    292292    aubio_onset_set_threshold (o, 0.058);
    293     o->apply_compression = 1;
    294     o->lambda_compression = 1.;
    295     aubio_onset_set_adaptive_whitening (o, 0);
     293    aubio_onset_set_compression (o, 1.);
    296294  } else if (strcmp (onset_mode, "complexdomain") == 0
    297295             || strcmp (onset_mode, "complex") == 0) {
  • src/onset/onset.h

    rb63c7d3 r340f5c7  
    140140
    141141  \param o onset detection object as returned by new_aubio_onset()
    142   \param lambda logarithmic compression factor
     142  \param lambda logarithmic compression factor, 0 to disable
    143143
    144144  \return 0 if successful, 1 otherwise
    145145
    146146 */
    147 uint_t aubio_onset_set_logmag_compression(aubio_onset_t *o, smpl_t lambda);
     147uint_t aubio_onset_set_compression(aubio_onset_t *o, smpl_t lambda);
    148148
    149149/** get onset detection log compression
     150
     151  \param o onset detection object as returned by new_aubio_onset()
     152
     153  \returns 0 if disabled, compression factor otherwise
     154
    150155 */
    151 smpl_t aubio_onset_get_logmag_compression(aubio_onset_t *o);
     156smpl_t aubio_onset_get_compression(aubio_onset_t *o);
    152157
    153158/** set onset detection silence threshold
Note: See TracChangeset for help on using the changeset viewer.