source: src/pitch/pitch.h @ 63f3c70

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

src: update all headers to GPLv3

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[96fb8ad]1/*
[e6a78ea]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*/
[96fb8ad]20
[ca1abdd]21#ifndef PITCH_H
22#define PITCH_H
[96fb8ad]23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
[f44b111]28/** \file
29
[6d4ec49]30  Generic method for pitch detection
[f44b111]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 */
[ca1abdd]38typedef struct _aubio_pitch_t aubio_pitch_t;
[f44b111]39
40/** execute pitch detection on an input signal frame
[6d4ec49]41
[ca1abdd]42  \param o pitch detection object as returned by new_aubio_pitch()
[93177fa]43  \param in input signal of size [hopsize x channels]
44  \param out output pitch candidates of size [1 x channes]
[6d4ec49]45
[f44b111]46*/
[ca1abdd]47void aubio_pitch_do (aubio_pitch_t * o, fvec_t * in,
[93177fa]48    fvec_t * out);
[96fb8ad]49
[f44b111]50/** change yin or yinfft tolerance threshold
[6d4ec49]51
[ca1abdd]52  \param o pitch detection object as returned by new_aubio_pitch()
[93177fa]53  \param tol tolerance default is 0.15 for yin and 0.85 for yinfft
[6d4ec49]54
[f44b111]55*/
[ca1abdd]56uint_t aubio_pitch_set_tolerance (aubio_pitch_t * o,
[93177fa]57    smpl_t tol);
[f44b111]58
59/** deletion of the pitch detection object
[6d4ec49]60
[ca1abdd]61  \param o pitch detection object as returned by new_aubio_pitch()
[6d4ec49]62
[f44b111]63*/
[ca1abdd]64void del_aubio_pitch (aubio_pitch_t * o);
[96fb8ad]65
[f44b111]66/** creation of the pitch detection object
[6d4ec49]67
[93177fa]68  \param mode set pitch detection algorithm
[6d4ec49]69  \param bufsize size of the input buffer to analyse
70  \param hopsize step size between two consecutive analysis instant
[f44b111]71  \param channels number of channels to analyse
[6d4ec49]72  \param samplerate sampling rate of the signal
73
[f44b111]74*/
[ca1abdd]75aubio_pitch_t * new_aubio_pitch (char_t * mode,
[fe163ad]76    uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
77
[93177fa]78/** set the output unit of the pitch detection object
79
[ca1abdd]80  \param o pitch detection object as returned by new_aubio_pitch()
[93177fa]81  \param mode set pitch units for output
82
83*/
[ca1abdd]84uint_t aubio_pitch_set_unit (aubio_pitch_t * o,
[93177fa]85    char_t * mode);
[96fb8ad]86
87#ifdef __cplusplus
88}
89#endif
90
[ca1abdd]91#endif /*PITCH_H*/
Note: See TracBrowser for help on using the repository browser.