Ignore:
Timestamp:
Oct 8, 2009, 8:24:43 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:
22d33e2
Parents:
f162cf9
Message:

src/pitch/pitchyin.{c,h}: add proper aubio_pitchyin_t object, clean and update prototypes, make multichannel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchyin.h

    rf162cf9 r2ba3440  
    3838#endif
    3939
    40 /** compute difference function
     40/** pitch detection object */
     41typedef struct _aubio_pitchyin_t aubio_pitchyin_t;
     42
     43/** creation of the pitch detection object
     44 
     45  \param bufsize size of the input buffer to analyse
     46 
     47*/
     48aubio_pitchyin_t * new_aubio_pitchyin (uint_t bufsize);
     49
     50/** deletion of the pitch detection object
     51 
     52  \param p pitch detection object as returned by new_aubio_pitchyin()
     53 
     54*/
     55void del_aubio_pitchyin (aubio_pitchyin_t * o);
     56
     57/** execute pitch detection on an input buffer
     58 
     59  \param p pitch detection object as returned by new_aubio_pitchyin()
     60  \param input input signal window (length as specified at creation time)
     61  \param tol tolerance parameter for minima selection [default 0.85]
     62 
     63*/
     64void aubio_pitchyin_do (aubio_pitchyin_t * o, fvec_t *in, fvec_t *out);
     65
     66
     67/** set tolerance parameter for YIN algorithm
    4168 
    42   \param input input signal
    43   \param yinbuf output buffer to store difference function (half shorter than input)
    44 
    45 */
    46 void aubio_pitchyin_diff(fvec_t * input, fvec_t * yinbuf);
    47 
    48 /** in place computation of the YIN cumulative normalised function
    49  
    50   \param yinbuf input signal (a square difference function), also used to store function
    51 
    52 */
    53 void aubio_pitchyin_getcum(fvec_t * yinbuf);
    54 
    55 /** detect pitch in a YIN function
    56  
    57   \param yinbuf input buffer as computed by aubio_pitchyin_getcum
    58 
    59 */
    60 uint_t aubio_pitchyin_getpitch(fvec_t *yinbuf);
    61 
    62 /** fast implementation of the YIN algorithm
    63  
    64   \param input input signal
    65   \param yinbuf input buffer used to compute the YIN function
     69  \param o YIN pitch detection object
    6670  \param tol tolerance parameter for minima selection [default 0.15]
    6771
    6872*/
    69 smpl_t aubio_pitchyin_getpitchfast(fvec_t * input, fvec_t *yinbuf, smpl_t tol);
     73uint_t aubio_pitchyin_set_tolerance (aubio_pitchyin_t *o, smpl_t tol);
     74
     75/** get tolerance parameter for YIN algorithm
     76 
     77  \param o YIN pitch detection object
     78  \return tolerance parameter for minima selection [default 0.15]
     79
     80*/
     81smpl_t aubio_pitchyin_get_tolerance (aubio_pitchyin_t *o);
    7082
    7183#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.