Changeset 56ef7e1 for src/tempo/tempo.c


Ignore:
Timestamp:
Oct 18, 2009, 3:08:59 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
e5f49af
Parents:
74516f7
Message:

Change peakpicker to match API specs, make quadint per channel

  • src/mathutils.c
    • add per channel mean and median
    • update moving thres and adapt_thres accordingly
    • change quadint unused span argument to a channel argument
  • src/onset/onset.c:
    • make wasonset a vector for multi channel, use new peakpicker
  • src/onset/peakpick.c:
    • update peakpicker do for multi channeling
  • src/pitch/: update use to fvec_quadint
  • src/tempo/beattracking.c: update calls to fvec_quadint
  • src/tempo/tempo.c: update peakpicker usage
  • tests/src/test-peakpick.c: update peakpicker usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/tempo.c

    r74516f7 r56ef7e1  
    3838  fvec_t * dfframe;              /** peak picked detection function buffer */
    3939  fvec_t * out;                  /** beat tactus candidates */
     40  fvec_t * onset;                /** onset results */
     41  fvec_t * peek;                 /** thresholded onset function */
    4042  smpl_t silence;                /** silence parameter */
    4143  smpl_t threshold;              /** peak picking threshold */
     
    7072  }
    7173  o->blockpos++;
    72   tempo->data[0][1] = aubio_peakpicker_do (o->pp, o->of);
     74  aubio_peakpicker_do (o->pp, o->of, o->onset);
     75  tempo->data[0][1] = o->onset->data[0][0];
    7376  o->dfframe->data[0][winlen - step + o->blockpos] =
    7477    aubio_peakpicker_get_thresholded_input(o->pp);
     
    115118  o->out      = new_fvec(o->step,channels);
    116119  o->pv       = new_aubio_pvoc(buf_size, hop_size, channels);
    117   o->pp       = new_aubio_peakpicker(o->threshold);
     120  o->pp       = new_aubio_peakpicker(channels);
     121  aubio_peakpicker_set_threshold (o->pp, o->threshold);
    118122  o->od       = new_aubio_onsetdetection(onset_mode,buf_size,channels);
    119123  o->of       = new_fvec(1, channels);
    120124  o->bt       = new_aubio_beattracking(o->winlen,channels);
     125  o->onset    = new_fvec(1, channels);
     126  o->peek     = new_fvec(3, channels);
    121127  /*if (usedoubled)    {
    122128    o2 = new_aubio_onsetdetection(type_onset2,buffer_size,channels);
     
    144150  del_cvec(o->fftgrain);
    145151  del_fvec(o->dfframe);
     152  del_fvec(o->onset);
     153  del_fvec(o->peek);
    146154  AUBIO_FREE(o);
    147155  return;
Note: See TracChangeset for help on using the changeset viewer.