Changeset d25bd12 for src


Ignore:
Timestamp:
Oct 16, 2009, 9:55:02 PM (15 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:
e4f142c
Parents:
68b8233
Message:

src/tempo: use samplerate

Location:
src/tempo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/tempo.c

    r68b8233 rd25bd12  
    4343  uint_t winlen;                 /** dfframe bufsize */
    4444  uint_t step;                   /** dfframe hopsize */
     45  uint_t samplerate;             /** sampling rate of the signal */
    4546};
    4647
     
    100101/* Allocate memory for an tempo detection */
    101102aubio_tempo_t * new_aubio_tempo (char_t * onset_mode,
    102     uint_t buf_size, uint_t hop_size, uint_t channels)
     103    uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate)
    103104{
    104105  aubio_tempo_t * o = AUBIO_NEW(aubio_tempo_t);
     106  o->samplerate = samplerate;
    105107  o->winlen = SQR(512)/hop_size;
    106108  o->step = o->winlen/4;
    107109  o->blockpos = 0;
    108110  o->threshold = 0.3;
    109   o->silence = -90;
     111  o->silence = -90.;
    110112  o->blockpos = 0;
    111113  o->dfframe  = new_fvec(o->winlen,channels);
  • src/tempo/tempo.h

    r68b8233 rd25bd12  
    3939/** create tempo detection object */
    4040aubio_tempo_t * new_aubio_tempo (char_t * mode,
    41     uint_t buf_size, uint_t hop_size, uint_t channels);
     41    uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate);
    4242
    4343/** execute tempo detection */
Note: See TracChangeset for help on using the changeset viewer.