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
|
andrew@0
|
20 /** \file
|
andrew@0
|
21
|
andrew@0
|
22 Pitch detection using a fast harmonic comb filter
|
andrew@0
|
23
|
andrew@0
|
24 This pitch extraction method implements a fast harmonic comb filter to
|
andrew@0
|
25 determine the fundamental frequency of a harmonic sound.
|
andrew@0
|
26
|
andrew@0
|
27 This file was derived from the tuneit project, written by Mario Lang to
|
andrew@0
|
28 detect the fundamental frequency of a sound.
|
andrew@0
|
29
|
andrew@0
|
30 see http://delysid.org/tuneit.html
|
andrew@0
|
31
|
andrew@0
|
32 */
|
andrew@0
|
33
|
andrew@0
|
34 #ifndef _PITCHFCOMB_H
|
andrew@0
|
35 #define _PITCHFCOMB_H
|
andrew@0
|
36
|
andrew@0
|
37 #ifdef __cplusplus
|
andrew@0
|
38 extern "C" {
|
andrew@0
|
39 #endif
|
andrew@0
|
40
|
andrew@0
|
41 /** pitch detection object */
|
andrew@0
|
42 typedef struct _aubio_pitchfcomb_t aubio_pitchfcomb_t;
|
andrew@0
|
43
|
andrew@0
|
44 /** execute pitch detection on an input buffer
|
andrew@0
|
45
|
andrew@0
|
46 \param p pitch detection object as returned by new_aubio_pitchfcomb
|
andrew@0
|
47 \param input input signal window (length as specified at creation time)
|
andrew@0
|
48
|
andrew@0
|
49 */
|
andrew@0
|
50 smpl_t aubio_pitchfcomb_detect (aubio_pitchfcomb_t *p, fvec_t * input);
|
andrew@0
|
51 /** creation of the pitch detection object
|
andrew@0
|
52
|
andrew@0
|
53 \param bufsize size of the input buffer to analyse
|
andrew@0
|
54 \param hopsize step size between two consecutive analysis instant
|
andrew@0
|
55 \param samplerate sampling rate of the signal
|
andrew@0
|
56
|
andrew@0
|
57 */
|
andrew@0
|
58 aubio_pitchfcomb_t * new_aubio_pitchfcomb (ba_uint_t bufsize, ba_uint_t hopsize, ba_uint_t samplerate);
|
andrew@0
|
59 /** deletion of the pitch detection object
|
andrew@0
|
60
|
andrew@0
|
61 \param p pitch detection object as returned by new_aubio_pitchfcomb
|
andrew@0
|
62
|
andrew@0
|
63 */
|
andrew@0
|
64 void del_aubio_pitchfcomb (aubio_pitchfcomb_t *p);
|
andrew@0
|
65
|
andrew@0
|
66
|
andrew@0
|
67 #ifdef __cplusplus
|
andrew@0
|
68 }
|
andrew@0
|
69 #endif
|
andrew@0
|
70
|
andrew@0
|
71 #endif /* _PITCHFCOMB_H */
|
andrew@0
|
72
|
andrew@0
|
73
|