[7a04950] | 1 | /* |
---|
[e6a78ea] | 2 | Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org> |
---|
[7a04950] | 3 | |
---|
[e6a78ea] | 4 | This file is part of aubio. |
---|
[7a04950] | 5 | |
---|
[e6a78ea] | 6 | aubio is free software: you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation, either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
[7a04950] | 10 | |
---|
[e6a78ea] | 11 | aubio is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
[7a04950] | 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
[7f3ccc5e] | 21 | /** \file |
---|
| 22 | |
---|
| 23 | Pitch detection using a fast harmonic comb filter |
---|
| 24 | |
---|
| 25 | This pitch extraction method implements a fast harmonic comb filter to |
---|
| 26 | determine the fundamental frequency of a harmonic sound. |
---|
| 27 | |
---|
| 28 | This file was derived from the tuneit project, written by Mario Lang to |
---|
| 29 | detect the fundamental frequency of a sound. |
---|
| 30 | |
---|
| 31 | see http://delysid.org/tuneit.html |
---|
| 32 | |
---|
| 33 | */ |
---|
| 34 | |
---|
[7a04950] | 35 | #ifndef _PITCHFCOMB_H |
---|
| 36 | #define _PITCHFCOMB_H |
---|
| 37 | |
---|
| 38 | #ifdef __cplusplus |
---|
| 39 | extern "C" { |
---|
| 40 | #endif |
---|
| 41 | |
---|
[7f3ccc5e] | 42 | /** pitch detection object */ |
---|
[7a04950] | 43 | typedef struct _aubio_pitchfcomb_t aubio_pitchfcomb_t; |
---|
| 44 | |
---|
[7f3ccc5e] | 45 | /** execute pitch detection on an input buffer |
---|
| 46 | |
---|
| 47 | \param p pitch detection object as returned by new_aubio_pitchfcomb |
---|
| 48 | \param input input signal window (length as specified at creation time) |
---|
[8040cca] | 49 | \param output pitch candidates in bins |
---|
[7f3ccc5e] | 50 | |
---|
| 51 | */ |
---|
[fddfa64] | 52 | void aubio_pitchfcomb_do (aubio_pitchfcomb_t * p, fvec_t * input, |
---|
| 53 | fvec_t * output); |
---|
| 54 | |
---|
[7f3ccc5e] | 55 | /** creation of the pitch detection object |
---|
| 56 | |
---|
[3ac7cb0] | 57 | \param buf_size size of the input buffer to analyse |
---|
| 58 | \param hop_size step size between two consecutive analysis instant |
---|
[7f3ccc5e] | 59 | |
---|
| 60 | */ |
---|
[168337e] | 61 | aubio_pitchfcomb_t *new_aubio_pitchfcomb (uint_t buf_size, uint_t hop_size); |
---|
[fddfa64] | 62 | |
---|
[7f3ccc5e] | 63 | /** deletion of the pitch detection object |
---|
| 64 | |
---|
| 65 | \param p pitch detection object as returned by new_aubio_pitchfcomb |
---|
| 66 | |
---|
| 67 | */ |
---|
[fddfa64] | 68 | void del_aubio_pitchfcomb (aubio_pitchfcomb_t * p); |
---|
[7a04950] | 69 | |
---|
| 70 | #ifdef __cplusplus |
---|
| 71 | } |
---|
| 72 | #endif |
---|
| 73 | |
---|
| 74 | #endif /* _PITCHFCOMB_H */ |
---|
| 75 | |
---|
| 76 | |
---|