Changeset a559796 for src/tempo


Ignore:
Timestamp:
Feb 23, 2014, 3:14:47 AM (11 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, pitchshift, sampler, timestretch, yinfft+
Children:
af97786
Parents:
9f68f11
Message:

src/tempo/tempo.c: novelty function default to specflux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/tempo.c

    r9f68f11 ra559796  
    158158
    159159/* Allocate memory for an tempo detection */
    160 aubio_tempo_t * new_aubio_tempo (char_t * onset_mode,
     160aubio_tempo_t * new_aubio_tempo (char_t * tempo_mode,
    161161    uint_t buf_size, uint_t hop_size, uint_t samplerate)
    162162{
    163163  aubio_tempo_t * o = AUBIO_NEW(aubio_tempo_t);
     164  char_t specdesc_func[20];
    164165  o->samplerate = samplerate;
    165166  /* length of observations, worth about 6 seconds */
     
    179180  o->pp       = new_aubio_peakpicker();
    180181  aubio_peakpicker_set_threshold (o->pp, o->threshold);
    181   o->od       = new_aubio_specdesc(onset_mode,buf_size);
     182  if ( strcmp(tempo_mode, "default") == 0 ) {
     183    strcpy(specdesc_func, "specflux");
     184  } else {
     185    strcpy(specdesc_func, tempo_mode);
     186  }
     187  o->od       = new_aubio_specdesc(specdesc_func,buf_size);
    182188  o->of       = new_fvec(1);
    183189  o->bt       = new_aubio_beattracking(o->winlen, o->hop_size, o->samplerate);
Note: See TracChangeset for help on using the changeset viewer.