source: src/pitch/pitchdetection.h @ f1b6aad

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

src/pitch/pitchdetection.{c,h}: update documentation, return ints in set methods

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