Changeset 7f3ccc5e


Ignore:
Timestamp:
May 17, 2006, 8:16:59 PM (18 years ago)
Author:
Paul Brossier <piem@altern.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:
78fa561
Parents:
ba11e53
Message:

update pitch method comments
update pitch method comments

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/pitchfcomb.c

    rba11e53 r7f3ccc5e  
    1515   along with this program; if not, write to the Free Software
    1616   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    17 
    18 */
    19 
    20 /*
    21  
    22    This file was taken from the tuneit project, in the file
    23    tuneit.c -- Detect fundamental frequency of a sound
    24    see http://delysid.org/tuneit.html
    25  
    26    a fast harmonic comb filter algorithm for pitch tracking
    2717
    2818*/
  • src/pitchfcomb.h

    rba11e53 r7f3ccc5e  
    1818*/
    1919
     20/** \file
     21
     22   Pitch detection using a fast harmonic comb filter
     23
     24   This pitch extraction method implements a fast harmonic comb filter to
     25   determine the fundamental frequency of a harmonic sound.
     26
     27   This file was derived from the tuneit project, written by Mario Lang to
     28   detect the fundamental frequency of a sound.
     29   
     30   see http://delysid.org/tuneit.html
     31
     32*/
     33
    2034#ifndef _PITCHFCOMB_H
    2135#define _PITCHFCOMB_H
     
    2539#endif
    2640
     41/** pitch detection object */
    2742typedef struct _aubio_pitchfcomb_t aubio_pitchfcomb_t;
    2843
     44/** execute pitch detection on an input buffer
     45 
     46  \param p pitch detection object as returned by new_aubio_pitchfcomb
     47  \param input input signal window (length as specified at creation time)
     48 
     49*/
    2950smpl_t aubio_pitchfcomb_detect (aubio_pitchfcomb_t *p, fvec_t * input);
     51/** creation of the pitch detection object
     52 
     53  \param bufsize size of the input buffer to analyse
     54  \param hopsize step size between two consecutive analysis instant
     55  \param samplerate sampling rate of the signal
     56 
     57*/
    3058aubio_pitchfcomb_t * new_aubio_pitchfcomb (uint_t bufsize, uint_t hopsize, uint_t samplerate);
     59/** deletion of the pitch detection object
     60 
     61  \param p pitch detection object as returned by new_aubio_pitchfcomb
     62 
     63*/
    3164void del_aubio_pitchfcomb (aubio_pitchfcomb_t *p);
    3265
  • src/pitchmcomb.c

    rba11e53 r7f3ccc5e  
    161161  vec_alpha_normalise(mag,p->alpha); /* alpha normalisation  */
    162162  /* skipped */                      /* low pass filtering   */
    163   /** \bug: vec_movind_thres writes out of bounds */
     163  /** \bug vec_moving_thres may write out of bounds */
    164164  vec_adapt_thres(mag,tmp,p->win_post,p->win_pre); /* adaptative threshold */
    165165  vec_add(mag,-p->threshold);        /* fixed threshold      */
     
    325325aubio_pitchmcomb_t * new_aubio_pitchmcomb(uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate) {
    326326  aubio_pitchmcomb_t * p = AUBIO_NEW(aubio_pitchmcomb_t);
    327   /** \bug should check if size / 8 > post+pre+1 */
     327  /* bug: should check if size / 8 > post+pre+1 */
    328328  uint_t i;
    329329  uint_t spec_size;
  • src/pitchmcomb.h

    rba11e53 r7f3ccc5e  
    1919
    2020/** \file
    21  * spectral pitch detection function
    22  *
    23  * \todo check/fix peak picking
    24  */
     21
     22  Pitch detection using multiple-comb filter
     23
     24  This fundamental frequency estimation algorithm implements spectral
     25  flattening, multi-comb filtering and peak histogramming.
     26
     27  This method was designed by Juan P. Bello and described in:
     28
     29  Juan-Pablo Bello. ``Towards the Automated Analysis of Simple Polyphonic
     30  Music''.  PhD thesis, Centre for Digital Music, Queen Mary University of
     31  London, London, UK, 2003.
     32
     33*/
    2534
    2635#ifndef PITCHMCOMB_H
     
    3140#endif
    3241
     42/** pitch detection object */
    3343typedef struct _aubio_pitchmcomb_t aubio_pitchmcomb_t;
    3444
     45/** execute pitch detection on an input spectral frame
     46 
     47  \param p pitch detection object as returned by new_aubio_pitchmcomb
     48  \param fftgrain input signal spectrum as computed by aubio_pvoc_do
     49 
     50*/
    3551smpl_t aubio_pitchmcomb_detect(aubio_pitchmcomb_t * p, cvec_t * fftgrain);
    3652uint_t aubio_pitch_cands(aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands);
     53/** creation of the pitch detection object
     54 
     55  \param bufsize size of the input buffer to analyse
     56  \param hopsize step size between two consecutive analysis instant
     57  \param channels number of channels to analyse
     58  \param samplerate sampling rate of the signal
     59 
     60*/
    3761aubio_pitchmcomb_t * new_aubio_pitchmcomb(uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
     62/** deletion of the pitch detection object
     63 
     64  \param p pitch detection object as returned by new_aubio_pitchfcomb
     65 
     66*/
    3867void del_aubio_pitchmcomb(aubio_pitchmcomb_t *p);
    3968
  • src/pitchyin.h

    rba11e53 r7f3ccc5e  
    1717*/
    1818
    19 /* This algorithm was developped by A. de Cheveigne and H. Kawahara and
    20  * published in:
    21  *
    22  * de Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency
    23  * estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930. 
    24  *
    25  * see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html
    26  */
     19/** \file
     20 
     21  Pitch detection using the YIN algorithm
     22 
     23  This algorithm was developped by A. de Cheveigne and H. Kawahara and
     24  published in:
     25 
     26  De Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency
     27  estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930. 
     28 
     29  see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html
     30
     31*/
    2732
    2833#ifndef PITCHYIN_H
     
    3338#endif
    3439
     40/** compute difference function
     41 
     42  \param input input signal
     43  \param yinbuf output buffer to store difference function (half shorter than input)
     44
     45*/
    3546void aubio_pitchyin_diff(fvec_t * input, fvec_t * yinbuf);
    3647
     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*/
    3753void aubio_pitchyin_getcum(fvec_t * yinbuf);
    3854
     55/** detect pitch in a YIN function
     56 
     57  \param yinbuf input buffer as computed by aubio_pitchyin_getcum
     58
     59*/
    3960uint_t aubio_pitchyin_getpitch(fvec_t *yinbuf);
    4061
     62/** fast implementation of the YIN algorithm
     63 
     64  \param input input signal
     65  \param yinbuf input buffer used to compute the YIN function
     66  \param tol tolerance parameter for minima selection [default 0.15]
     67
     68*/
    4169smpl_t aubio_pitchyin_getpitchfast(fvec_t * input, fvec_t *yinbuf, smpl_t tol);
    4270
  • src/pitchyinfft.c

    rba11e53 r7f3ccc5e  
    1616   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1717*/
    18 
    19 /* This algorithm was developped by A. de Cheveigne and H. Kawahara and
    20  * published in:
    21  *
    22  * de Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency
    23  * estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930. 
    24  *
    25  * see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html
    26  *
    27  * This implementation is using an FFT to compute the square difference
    28  * function, which allows spectral weighting
    29  *
    30  */
    3118
    3219#include "aubio_priv.h"
     
    139126          /* 3 point quadratic interpolation */
    140127          //return vec_quadint_min(yin,tau,1);
    141           /* additional check nlikely octave doubling in higher frequencies */
     128          /* additional check for (unlikely) octave doubling in higher frequencies */
    142129          if (tau>35) {
    143130                  return vec_quadint_min(yin,tau,1)+1;
  • src/pitchyinfft.h

    rba11e53 r7f3ccc5e  
    1717*/
    1818
    19 /* This algorithm was developped by A. de Cheveigne and H. Kawahara and
    20  * published in:
    21  *
    22  * de Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency
    23  * estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930. 
    24  *
    25  * see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html
    26  */
     19/** \file
     20 
     21  Pitch detection using a spectral implementation of the YIN algorithm
     22 
     23  This algorithm was derived from the YIN algorithm (see pitchyin.c). In this
     24  implementation, a Fourier transform is used to compute a tapered square
     25  difference function, which allows spectral weighting. Because the difference
     26  function is tapered, the selection of the period is simplified.
     27 
     28  Paul Brossier, ``Automatic annotation of musical audio for interactive
     29  systems'', Chapter 3, Pitch Analysis, PhD thesis, Centre for Digital music,
     30  Queen Mary University of London, London, UK, 2003.
     31
     32*/
    2733
    2834#ifndef PITCHYINFFT_H
     
    3339#endif
    3440
     41/** pitch detection object */
    3542typedef struct _aubio_pitchyinfft_t aubio_pitchyinfft_t;
    3643
     44/** execute pitch detection on an input buffer
     45 
     46  \param p pitch detection object as returned by new_aubio_pitchyinfft
     47  \param input input signal window (length as specified at creation time)
     48  \param tol tolerance parameter for minima selection [default 0.85]
     49 
     50*/
    3751smpl_t aubio_pitchyinfft_detect (aubio_pitchyinfft_t *p, fvec_t * input, smpl_t tol);
     52/** creation of the pitch detection object
     53 
     54  \param bufsize size of the input buffer to analyse
     55 
     56*/
    3857aubio_pitchyinfft_t * new_aubio_pitchyinfft (uint_t bufsize);
    3958void del_aubio_pitchyinfft (aubio_pitchyinfft_t *p);
Note: See TracChangeset for help on using the changeset viewer.