aubio  0.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Enumerations | Functions
pitchdetection.h File Reference

Generic method for pitch detection. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct
_aubio_pitchdetection_t 
aubio_pitchdetection_t
 pitch detection object

Enumerations

enum  aubio_pitchdetection_type {
  aubio_pitch_yin, aubio_pitch_mcomb, aubio_pitch_schmitt, aubio_pitch_fcomb,
  aubio_pitch_yinfft
}
 pitch detection algorithm More...
enum  aubio_pitchdetection_mode { aubio_pitchm_freq, aubio_pitchm_midi, aubio_pitchm_cent, aubio_pitchm_bin }
 pitch detection output mode More...

Functions

smpl_t aubio_pitchdetection (aubio_pitchdetection_t *p, fvec_t *ibuf)
 execute pitch detection on an input signal frame
void aubio_pitchdetection_set_yinthresh (aubio_pitchdetection_t *p, smpl_t thres)
 change yin or yinfft tolerance threshold
void del_aubio_pitchdetection (aubio_pitchdetection_t *p)
 deletion of the pitch detection object
aubio_pitchdetection_tnew_aubio_pitchdetection (uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate, aubio_pitchdetection_type type, aubio_pitchdetection_mode mode)
 creation of the pitch detection object

Detailed Description

Generic method for pitch detection.

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

Enumeration Type Documentation

pitch detection output mode

Enumerator:
aubio_pitchm_freq 

Frequency (Hz)

aubio_pitchm_midi 

MIDI note (0.,127)

aubio_pitchm_cent 

Cent.

aubio_pitchm_bin 

Frequency bin (0,bufsize)

pitch detection algorithm

Enumerator:
aubio_pitch_yin 

YIN algorithm.

aubio_pitch_mcomb 

Multi-comb filter.

aubio_pitch_schmitt 

Schmitt trigger.

aubio_pitch_fcomb 

Fast comb filter.

aubio_pitch_yinfft 

Spectral YIN.

Function Documentation

smpl_t aubio_pitchdetection ( aubio_pitchdetection_t p,
fvec_t ibuf 
)

execute pitch detection on an input signal frame

Parameters
ppitch detection object as returned by new_aubio_pitchdetection
ibufinput signal of length hopsize
void aubio_pitchdetection_set_yinthresh ( aubio_pitchdetection_t p,
smpl_t  thres 
)

change yin or yinfft tolerance threshold

default is 0.15 for yin and 0.85 for yinfft

void del_aubio_pitchdetection ( aubio_pitchdetection_t p)

deletion of the pitch detection object

Parameters
ppitch detection object as returned by new_aubio_pitchdetection
aubio_pitchdetection_t* new_aubio_pitchdetection ( uint_t  bufsize,
uint_t  hopsize,
uint_t  channels,
uint_t  samplerate,
aubio_pitchdetection_type  type,
aubio_pitchdetection_mode  mode 
)

creation of the pitch detection object

Parameters
bufsizesize of the input buffer to analyse
hopsizestep size between two consecutive analysis instant
channelsnumber of channels to analyse
sampleratesampling rate of the signal
typeset pitch detection algorithm
modeset pitch units for output