annotate libs/aubioFullOSXUni/include/aubio/pitchyin.h @ 2:fa2af670b5c5 tip

SoundFileLoader might have moved
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 06 Jan 2012 00:23:26 +0000
parents bcb0d40158f4
children
rev   line source
andrew@0 1 /*
andrew@0 2 Copyright (C) 2003 Paul Brossier
andrew@0 3
andrew@0 4 This program is free software; you can redistribute it and/or modify
andrew@0 5 it under the terms of the GNU General Public License as published by
andrew@0 6 the Free Software Foundation; either version 2 of the License, or
andrew@0 7 (at your option) any later version.
andrew@0 8
andrew@0 9 This program is distributed in the hope that it will be useful,
andrew@0 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
andrew@0 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
andrew@0 12 GNU General Public License for more details.
andrew@0 13
andrew@0 14 You should have received a copy of the GNU General Public License
andrew@0 15 along with this program; if not, write to the Free Software
andrew@0 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
andrew@0 17 */
andrew@0 18
andrew@0 19 /** \file
andrew@0 20
andrew@0 21 Pitch detection using the YIN algorithm
andrew@0 22
andrew@0 23 This algorithm was developped by A. de Cheveigne and H. Kawahara and
andrew@0 24 published in:
andrew@0 25
andrew@0 26 De Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency
andrew@0 27 estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930.
andrew@0 28
andrew@0 29 see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html
andrew@0 30
andrew@0 31 */
andrew@0 32
andrew@0 33 #ifndef PITCHYIN_H
andrew@0 34 #define PITCHYIN_H
andrew@0 35
andrew@0 36 #ifdef __cplusplus
andrew@0 37 extern "C" {
andrew@0 38 #endif
andrew@0 39
andrew@0 40 /** compute difference function
andrew@0 41
andrew@0 42 \param input input signal
andrew@0 43 \param yinbuf output buffer to store difference function (half shorter than input)
andrew@0 44
andrew@0 45 */
andrew@0 46 void aubio_pitchyin_diff(fvec_t * input, fvec_t * yinbuf);
andrew@0 47
andrew@0 48 /** in place computation of the YIN cumulative normalised function
andrew@0 49
andrew@0 50 \param yinbuf input signal (a square difference function), also used to store function
andrew@0 51
andrew@0 52 */
andrew@0 53 void aubio_pitchyin_getcum(fvec_t * yinbuf);
andrew@0 54
andrew@0 55 /** detect pitch in a YIN function
andrew@0 56
andrew@0 57 \param yinbuf input buffer as computed by aubio_pitchyin_getcum
andrew@0 58
andrew@0 59 */
andrew@0 60 ba_uint_t aubio_pitchyin_getpitch(fvec_t *yinbuf);
andrew@0 61
andrew@0 62 /** fast implementation of the YIN algorithm
andrew@0 63
andrew@0 64 \param input input signal
andrew@0 65 \param yinbuf input buffer used to compute the YIN function
andrew@0 66 \param tol tolerance parameter for minima selection [default 0.15]
andrew@0 67
andrew@0 68 */
andrew@0 69 smpl_t aubio_pitchyin_getpitchfast(fvec_t * input, fvec_t *yinbuf, smpl_t tol);
andrew@0 70
andrew@0 71 #ifdef __cplusplus
andrew@0 72 }
andrew@0 73 #endif
andrew@0 74
andrew@0 75 #endif /*PITCHYIN_H*/