#endif
#else
#if FFTW3F_SUPPORT
+/** fft data type */
#define FFTW_TYPE float
#else
+/** fft data type */
#define FFTW_TYPE double
#endif
#endif
extern "C" {
#endif
+/** fft data type */
typedef FFTW_TYPE fft_data_t;
/** FFT object
void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);
/** create new IIR filter
- \param b vector of forward coefficients
- \param a vector of feedback coefficients
+ \param samplerate signal sampling rate
\param order order of the filter (number of coefficients)
*/
aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);
/** histogram deletion */
void del_aubio_hist(aubio_hist_t *s);
+/** compute the histogram */
void aubio_hist_do(aubio_hist_t *s, fvec_t * input);
+/** compute the histogram ignoring null elements */
void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);
+/** compute the mean of the histogram */
smpl_t aubio_hist_mean(aubio_hist_t *s);
+/** weight the histogram */
void aubio_hist_weigth(aubio_hist_t *s);
+/** compute dynamic histogram for non-null elements */
void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input);
#ifdef __cplusplus
* \bug should not use POW :(
*/
smpl_t vec_alpha_norm(fvec_t * DF, smpl_t alpha);
-/* dc(min) removal */
+/** dc(min) removal */
void vec_dc_removal(fvec_t * mag);
/** alpha normalisation */
void vec_alpha_normalise(fvec_t * mag, uint_t alpha);
-
+/** add a constant to all members of a vector */
void vec_add(fvec_t * mag, smpl_t threshold);
+/** compute adaptive threshold of input vector */
void vec_adapt_thres(fvec_t * vec, fvec_t * tmp,
uint_t win_post, uint_t win_pre);
/** adaptative thresholding
/** returns 1 if X1 is a peak and positive */
uint_t vec_peakpick(fvec_t * input, uint_t pos);
+/** convert frequency bin to midi value */
smpl_t aubio_bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize);
+/** convert midi value to frequency bin */
smpl_t aubio_miditobin(smpl_t midi, smpl_t samplerate, smpl_t fftsize);
+/** convert frequency bin to frequency (Hz) */
smpl_t aubio_bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize);
+/** convert frequency (Hz) to frequency bin */
smpl_t aubio_freqtobin(smpl_t freq, smpl_t samplerate, smpl_t fftsize);
+/** convert frequency (Hz) to midi value (0-128) */
smpl_t aubio_freqtomidi(smpl_t freq);
+/** convert midi value (0-128) to frequency (Hz) */
smpl_t aubio_miditofreq(smpl_t midi);
+/** check if current buffer level is under a given threshold */
uint_t aubio_silence_detection(fvec_t * ibuf, smpl_t threshold);
+/** get the current buffer level */
smpl_t aubio_level_detection(fvec_t * ibuf, smpl_t threshold);
/**
* calculate normalised autocorrelation function
extern "C" {
#endif
+/** function pointer to thresholding function */
typedef smpl_t (*aubio_thresholdfn_t)(fvec_t *input);
+/** function pointer to peak-picking function */
typedef uint_t (*aubio_pickerfn_t)(fvec_t *input, uint_t pos);
+/** peak-picker structure */
typedef struct _aubio_pickpeak_t aubio_pickpeak_t;
+/** peak-picker creation function */
aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold);
+/** real time peak picking function */
uint_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p);
/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval );
+/** get current peak value */
smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t * p);
+/** destroy peak picker structure */
void del_aubio_peakpicker(aubio_pickpeak_t * p);
+/** set peak picking threshold */
void aubio_peakpicker_set_threshold(aubio_pickpeak_t * p, smpl_t threshold);
+/** get peak picking threshold */
smpl_t aubio_peakpicker_get_threshold(aubio_pickpeak_t * p);
+/** set peak picker thresholding function */
void aubio_peakpicker_set_thresholdfn(aubio_pickpeak_t * p, aubio_thresholdfn_t thresholdfn);
+/** get peak picker thresholding function */
aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_pickpeak_t * p);
#ifdef __cplusplus
*/
smpl_t aubio_pitchmcomb_detect(aubio_pitchmcomb_t * p, cvec_t * fftgrain);
+/** select the best candidates */
uint_t aubio_pitch_cands(aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands);
/** creation of the pitch detection object
*/
+/** \file
+
+ Tempo detection driver
+
+ This object stores all the memory required for tempo detection algorithm
+ and returns the estimated beat locations.
+
+*/
+
#ifndef TEMPO_H
#define TEMPO_H
extern "C" {
#endif
+/** tempo detection structure */
typedef struct _aubio_tempo_t aubio_tempo_t;
/** create tempo detection object */