1 | /* |
---|
2 | Copyright (C) 2003 Paul Brossier |
---|
3 | |
---|
4 | This program is free software; you can redistribute it and/or modify |
---|
5 | it under the terms of the GNU General Public License as published by |
---|
6 | the Free Software Foundation; either version 2 of the License, or |
---|
7 | (at your option) any later version. |
---|
8 | |
---|
9 | This program is distributed in the hope that it will be useful, |
---|
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | GNU General Public License for more details. |
---|
13 | |
---|
14 | You should have received a copy of the GNU General Public License |
---|
15 | along with this program; if not, write to the Free Software |
---|
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
17 | */ |
---|
18 | |
---|
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, 2006. |
---|
31 | |
---|
32 | */ |
---|
33 | |
---|
34 | #ifndef PITCHYINFFT_H |
---|
35 | #define PITCHYINFFT_H |
---|
36 | |
---|
37 | #ifdef __cplusplus |
---|
38 | extern "C" { |
---|
39 | #endif |
---|
40 | |
---|
41 | /** pitch detection object */ |
---|
42 | typedef struct _aubio_pitchyinfft_t aubio_pitchyinfft_t; |
---|
43 | |
---|
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 | */ |
---|
51 | smpl_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 | */ |
---|
57 | aubio_pitchyinfft_t * new_aubio_pitchyinfft (uint_t bufsize); |
---|
58 | /** deletion of the pitch detection object |
---|
59 | |
---|
60 | \param p pitch detection object as returned by new_aubio_pitchyinfft() |
---|
61 | |
---|
62 | */ |
---|
63 | void del_aubio_pitchyinfft (aubio_pitchyinfft_t *p); |
---|
64 | |
---|
65 | #ifdef __cplusplus |
---|
66 | } |
---|
67 | #endif |
---|
68 | |
---|
69 | #endif /*PITCHYINFFT_H*/ |
---|