Changeset 7ac374d


Ignore:
Timestamp:
Aug 13, 2015, 10:39:29 PM (9 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:
65c352e
Parents:
192fa6a
Message:

src/onset/onset.{c,h}: add method to set adaptive whitening

Location:
src/onset
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    r192fa6a r7ac374d  
    113113}
    114114
     115uint_t aubio_onset_set_adaptive_whitening (aubio_onset_t *o, uint_t apply_adaptive_whitening)
     116{
     117  o->apply_adaptive_whitening = apply_adaptive_whitening;
     118  return AUBIO_OK;
     119}
     120
     121uint_t aubio_onset_get_adaptive_whitening (aubio_onset_t *o)
     122{
     123  return o->apply_adaptive_whitening;
     124}
     125
    115126uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence) {
    116127  o->silence = silence;
     
    229240
    230241  o->spectral_whitening = new_aubio_spectral_whitening(buf_size, hop_size, samplerate);
    231   o->apply_adaptive_whitening = 1;
     242  o->apply_adaptive_whitening = 0;
    232243
    233244  /* initialize internal variables */
  • src/onset/onset.h

    r192fa6a r7ac374d  
    118118smpl_t aubio_onset_get_last_ms (aubio_onset_t *o);
    119119
     120/** set onset detection adaptive whitening
     121
     122  \param o onset detection object as returned by new_aubio_onset()
     123  \param apply_adaptive_whitening 1 to enable, 0 to disable
     124
     125*/
     126uint_t aubio_onset_set_adaptive_whitening(aubio_onset_t * o, uint_t apply_adaptive_whitening);
     127
     128/** get onset detection silence threshold
     129
     130  \param o onset detection object as returned by new_aubio_onset()
     131
     132  \return adaptive whitening mode, 1 if enabled, 0 otherwise
     133
     134*/
     135uint_t aubio_onset_get_adaptive_whitening(aubio_onset_t * o);
     136
    120137/** set onset detection silence threshold
    121138
Note: See TracChangeset for help on using the changeset viewer.