source: src/pitch/pitch.h @ 927f630

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 927f630 was 168337e, checked in by Paul Brossier <piem@piem.org>, 15 years ago

src/pitch: switch to mono

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
3
4  This file is part of aubio.
5
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.
10
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/>.
18
19*/
20
21#ifndef PITCH_H
22#define PITCH_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/** \file
29
30  Generic method for pitch detection
31
32  This file creates the objects required for the computation of the selected
33  pitch detection algorithm and output the results, in midi note or Hz.
34
35*/
36
37/** pitch detection object */
38typedef struct _aubio_pitch_t aubio_pitch_t;
39
40/** execute pitch detection on an input signal frame
41
42  \param o pitch detection object as returned by new_aubio_pitch()
43  \param in input signal of size [hop_size]
44  \param out output pitch candidates of size [1]
45
46*/
47void aubio_pitch_do (aubio_pitch_t * o, fvec_t * in, fvec_t * out);
48
49/** change yin or yinfft tolerance threshold
50
51  \param o pitch detection object as returned by new_aubio_pitch()
52  \param tol tolerance default is 0.15 for yin and 0.85 for yinfft
53
54*/
55uint_t aubio_pitch_set_tolerance (aubio_pitch_t * o, smpl_t tol);
56
57/** deletion of the pitch detection object
58
59  \param o pitch detection object as returned by new_aubio_pitch()
60
61*/
62void del_aubio_pitch (aubio_pitch_t * o);
63
64/** creation of the pitch detection object
65
66  \param method set pitch detection algorithm
67  \param buf_size size of the input buffer to analyse
68  \param hop_size step size between two consecutive analysis instant
69  \param samplerate sampling rate of the signal
70
71*/
72aubio_pitch_t *new_aubio_pitch (char_t * method,
73    uint_t buf_size, uint_t hop_size, uint_t samplerate);
74
75/** set the output unit of the pitch detection object
76
77  \param o pitch detection object as returned by new_aubio_pitch()
78  \param mode set pitch units for output
79
80*/
81uint_t aubio_pitch_set_unit (aubio_pitch_t * o, char_t * mode);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /*PITCH_H*/
Note: See TracBrowser for help on using the repository browser.