Ignore:
Timestamp:
Sep 21, 2016, 3:55:21 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
Children:
4292013
Parents:
e2645cb
Message:

src/effects/pitchshift.h: use transpose, not pitchscale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/effects/pitchshift.c

    re2645cb ra9eb93e  
    4949aubio_pitchshift_t *
    5050new_aubio_pitchshift (const char_t * mode,
    51     smpl_t pitchscale, uint_t hopsize, uint_t samplerate)
     51    smpl_t transpose, uint_t hopsize, uint_t samplerate)
    5252{
    5353  aubio_pitchshift_t *p = AUBIO_NEW (aubio_pitchshift_t);
    5454  p->samplerate = samplerate;
    5555  p->hopsize = hopsize;
    56   p->timeratio = 1.;
    57   p->pitchscale = pitchscale;
     56  p->pitchscale = 1.;
     57  if (transpose >= -24. && transpose <= 24.) {
     58    p->pitchscale = POW(2., transpose / 12.);
     59  } else {
     60    AUBIO_ERR("pitchshift: transpose should be in the range [-24, 24], got %f\n", transpose);
     61    goto beach;
     62  }
    5863
    5964  p->rboptions = RubberBandOptionProcessRealTime;
Note: See TracChangeset for help on using the changeset viewer.