Changeset 93177fa for src/pitch


Ignore:
Timestamp:
Oct 15, 2009, 9:06:56 PM (14 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:
28c162c
Parents:
e8ae95ac
Message:

src/pitch/pitchdetection.{c,h}: update documentation, return ints in set methods

Location:
src/pitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchdetection.c

    re8ae95ac r93177fa  
    242242      break;
    243243  }
    244   return 0;
    245 }
    246 
    247 void aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t tol) {
     244  return AUBIO_OK;
     245}
     246
     247uint_t aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t tol) {
    248248  switch(p->type) {
    249249    case aubio_pitch_yin:
     
    256256      break;
    257257  }
     258  return AUBIO_OK;
    258259}
    259260
  • src/pitch/pitchdetection.h

    re8ae95ac r93177fa  
    3838/** execute pitch detection on an input signal frame
    3939
    40   \param p pitch detection object as returned by new_aubio_pitchdetection
    41   \param ibuf input signal of length hopsize
     40  \param o pitch detection object as returned by new_aubio_pitchdetection()
     41  \param in input signal of size [hopsize x channels]
     42  \param out output pitch candidates of size [1 x channes]
    4243
    4344*/
    44 void aubio_pitchdetection_do (aubio_pitchdetection_t * p, fvec_t * ibuf, fvec_t * obuf);
     45void aubio_pitchdetection_do (aubio_pitchdetection_t * o, fvec_t * in,
     46    fvec_t * out);
    4547
    4648/** change yin or yinfft tolerance threshold
    4749
    48   default is 0.15 for yin and 0.85 for yinfft
     50  \param o pitch detection object as returned by new_aubio_pitchdetection()
     51  \param tol tolerance default is 0.15 for yin and 0.85 for yinfft
    4952
    5053*/
    51 void aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t tol);
     54uint_t aubio_pitchdetection_set_tolerance (aubio_pitchdetection_t * o,
     55    smpl_t tol);
    5256
    5357/** deletion of the pitch detection object
    5458
    55   \param p pitch detection object as returned by new_aubio_pitchdetection
     59  \param o pitch detection object as returned by new_aubio_pitchdetection()
    5660
    5761*/
    58 void del_aubio_pitchdetection(aubio_pitchdetection_t * p);
     62void del_aubio_pitchdetection (aubio_pitchdetection_t * o);
    5963
    6064/** creation of the pitch detection object
    6165
     66  \param mode set pitch detection algorithm
    6267  \param bufsize size of the input buffer to analyse
    6368  \param hopsize step size between two consecutive analysis instant
    6469  \param channels number of channels to analyse
    6570  \param samplerate sampling rate of the signal
    66   \param type set pitch detection algorithm
     71
     72*/
     73aubio_pitchdetection_t *new_aubio_pitchdetection (char_t * mode,
     74    uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
     75
     76/** set the output unit of the pitch detection object
     77
     78  \param o pitch detection object as returned by new_aubio_pitchdetection()
    6779  \param mode set pitch units for output
    6880
    6981*/
    70 aubio_pitchdetection_t *new_aubio_pitchdetection (char_t * pitch_mode,
    71     uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
    72 
    73 /** set the output unit of the pitch detection object */
    74 uint_t aubio_pitchdetection_set_unit (aubio_pitchdetection_t *p, char_t * pitch_unit);
     82uint_t aubio_pitchdetection_set_unit (aubio_pitchdetection_t * o,
     83    char_t * mode);
    7584
    7685#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.