pitch/pitch.h File Reference

Pitch detection object. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_pitch_t aubio_pitch_t
 pitch detection object

Functions

void aubio_pitch_do (aubio_pitch_t *o, fvec_t *in, fvec_t *out)
 execute pitch detection on an input signal frame
uint_t aubio_pitch_set_tolerance (aubio_pitch_t *o, smpl_t tol)
 change yin or yinfft tolerance threshold
void del_aubio_pitch (aubio_pitch_t *o)
 deletion of the pitch detection object
aubio_pitch_tnew_aubio_pitch (char_t *method, uint_t buf_size, uint_t hop_size, uint_t samplerate)
 creation of the pitch detection object
uint_t aubio_pitch_set_unit (aubio_pitch_t *o, char_t *mode)
 set the output unit of the pitch detection object
uint_t aubio_pitch_set_silence (aubio_pitch_t *o, smpl_t silence)
 set the silence threshold of the pitch detection object
smpl_t aubio_pitch_get_silence (aubio_pitch_t *o)
 set the silence threshold of the pitch detection object
smpl_t aubio_pitch_get_confidence (aubio_pitch_t *o)
 get the current confidence


Detailed Description

Pitch detection object.

This file creates the objects required for the computation of the selected pitch detection algorithm and output the results, in midi note or Hz.

Pitch detection methods

A list of the pitch detection methods currently available follows.

default : use the default method

Currently, the default method is set to yinfft .

schmitt : Schmitt trigger

This pitch extraction method implements a Schmitt trigger to estimate the period of a signal.

This file was derived from the tuneit project, written by Mario Lang to detect the fundamental frequency of a sound.

See http://delysid.org/tuneit.html

fcomb : a fast harmonic comb filter

This pitch extraction method implements a fast harmonic comb filter to determine the fundamental frequency of a harmonic sound.

This file was derived from the tuneit project, written by Mario Lang to detect the fundamental frequency of a sound.

See http://delysid.org/tuneit.html

mcomb : multiple-comb filter

This fundamental frequency estimation algorithm implements spectral flattening, multi-comb filtering and peak histogramming.

This method was designed by Juan P. Bello and described in:

Juan-Pablo Bello. ``Towards the Automated Analysis of Simple Polyphonic Music''. PhD thesis, Centre for Digital Music, Queen Mary University of London, London, UK, 2003.

yin : YIN algorithm

This algorithm was developed by A. de Cheveigne and H. Kawahara and published in:

De Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930.

see http://recherche.ircam.fr/equipes/pcm/pub/people/cheveign.html

yinfft : Yinfft algorithm

This algorithm was derived from the YIN algorithm. In this implementation, a Fourier transform is used to compute a tapered square difference function, which allows spectral weighting. Because the difference function is tapered, the selection of the period is simplified.

Paul Brossier, [Automatic annotation of musical audio for interactive systems](http://aubio.org/phd/), Chapter 3, Pitch Analysis, PhD thesis, Centre for Digital music, Queen Mary University of London, London, UK, 2006.

Definition in file pitch.h.


Function Documentation

void aubio_pitch_do ( aubio_pitch_t o,
fvec_t in,
fvec_t out 
)

execute pitch detection on an input signal frame

Parameters:
o pitch detection object as returned by new_aubio_pitch()
in input signal of size [hop_size]
out output pitch candidates of size [1]
Examples:
examples/aubionotes.c, examples/aubiopitch.c, and pitch/test-pitch.c.

smpl_t aubio_pitch_get_confidence ( aubio_pitch_t o  ) 

get the current confidence

Parameters:
o pitch detection object as returned by new_aubio_pitch()
Returns:
the current confidence of the pitch algorithm

smpl_t aubio_pitch_get_silence ( aubio_pitch_t o  ) 

set the silence threshold of the pitch detection object

Parameters:
o pitch detection object as returned by new_aubio_pitch()
Returns:
level threshold under which pitch should be ignored, in dB

uint_t aubio_pitch_set_silence ( aubio_pitch_t o,
smpl_t  silence 
)

set the silence threshold of the pitch detection object

Parameters:
o pitch detection object as returned by new_aubio_pitch()
silence level threshold under which pitch should be ignored, in dB
Returns:
0 if successfull, non-zero otherwise
Examples:
examples/aubiopitch.c.

uint_t aubio_pitch_set_tolerance ( aubio_pitch_t o,
smpl_t  tol 
)

change yin or yinfft tolerance threshold

Parameters:
o pitch detection object as returned by new_aubio_pitch()
tol tolerance default is 0.15 for yin and 0.85 for yinfft
Examples:
examples/aubionotes.c, and examples/aubiopitch.c.

uint_t aubio_pitch_set_unit ( aubio_pitch_t o,
char_t mode 
)

set the output unit of the pitch detection object

Parameters:
o pitch detection object as returned by new_aubio_pitch()
mode set pitch units for output
Returns:
0 if successfull, non-zero otherwise
Examples:
examples/aubiopitch.c.

void del_aubio_pitch ( aubio_pitch_t o  ) 

deletion of the pitch detection object

Parameters:
o pitch detection object as returned by new_aubio_pitch()
Examples:
examples/aubionotes.c, examples/aubiopitch.c, and pitch/test-pitch.c.

aubio_pitch_t* new_aubio_pitch ( char_t method,
uint_t  buf_size,
uint_t  hop_size,
uint_t  samplerate 
)

creation of the pitch detection object

Parameters:
method set pitch detection algorithm
buf_size size of the input buffer to analyse
hop_size step size between two consecutive analysis instant
samplerate sampling rate of the signal
Returns:
newly created aubio_pitch_t
Examples:
examples/aubionotes.c, examples/aubiopitch.c, and pitch/test-pitch.c.


Generated on Mon Jan 16 21:51:31 2017 for aubio by  doxygen 1.5.6