History

add some documentation add some documentation

Paul Brossier committed 20 years ago

Commit d88ea061 parent 3b3ec6c7 files · +42 −4Browse files

Unified · Split

7 files
  1. src/fft.h +3 −0
  2. src/filter.h +1 −2
  3. src/hist.h +5 −0
  4. src/mathutils.h +11 −2
  5. src/peakpick.h +11 −0
  6. src/pitchmcomb.h +1 −0
  7. src/tempo.h +10 −0
src/fft.h+3−0
@@ -38,8 +38,10 @@ · 37 unmodified lines
38#endif38#endif
39#else39#else
40#if FFTW3F_SUPPORT40#if FFTW3F_SUPPORT
41/** fft data type */
41#define FFTW_TYPE float42#define FFTW_TYPE float
42#else43#else
44/** fft data type */
43#define FFTW_TYPE double45#define FFTW_TYPE double
44#endif46#endif
45#endif47#endif
@@ -48,6 +50,7 @@ · 2 unmodified lines
48extern "C" {50extern "C" {
49#endif51#endif
50 52
53/** fft data type */
51typedef FFTW_TYPE fft_data_t;54typedef FFTW_TYPE fft_data_t;
52 55
53/** FFT object56/** FFT object
src/filter.h+1−2
@@ -66,8 +66,7 @@ void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out); · 65 unmodified lines
66void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);66void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);
67/** create new IIR filter67/** create new IIR filter
68 68
69 \param b vector of forward coefficients 69 \param samplerate signal sampling rate
70 \param a vector of feedback coefficients
71 \param order order of the filter (number of coefficients)70 \param order order of the filter (number of coefficients)
72 71
73*/72*/
src/hist.h+5−0
@@ -42,10 +42,15 @@ typedef struct _aubio_hist_t aubio_hist_t; · 41 unmodified lines
42aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);42aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);
43/** histogram deletion */43/** histogram deletion */
44void del_aubio_hist(aubio_hist_t *s);44void del_aubio_hist(aubio_hist_t *s);
45/** compute the histogram */
45void aubio_hist_do(aubio_hist_t *s, fvec_t * input);46void aubio_hist_do(aubio_hist_t *s, fvec_t * input);
47/** compute the histogram ignoring null elements */
46void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);48void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);
49/** compute the mean of the histogram */
47smpl_t aubio_hist_mean(aubio_hist_t *s); 50smpl_t aubio_hist_mean(aubio_hist_t *s);
51/** weight the histogram */
48void aubio_hist_weigth(aubio_hist_t *s); 52void aubio_hist_weigth(aubio_hist_t *s);
53/** compute dynamic histogram for non-null elements */
49void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input);54void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input);
50 55
51#ifdef __cplusplus56#ifdef __cplusplus
src/mathutils.h+11−2
@@ -118,13 +118,14 @@ smpl_t vec_local_hfc(fvec_t * f); · 117 unmodified lines
118 * \bug should not use POW :(118 * \bug should not use POW :(
119 */119 */
120smpl_t vec_alpha_norm(fvec_t * DF, smpl_t alpha);120smpl_t vec_alpha_norm(fvec_t * DF, smpl_t alpha);
121/* dc(min) removal */121/** dc(min) removal */
122void vec_dc_removal(fvec_t * mag);122void vec_dc_removal(fvec_t * mag);
123/** alpha normalisation */123/** alpha normalisation */
124void vec_alpha_normalise(fvec_t * mag, uint_t alpha);124void vec_alpha_normalise(fvec_t * mag, uint_t alpha);
125 125/** add a constant to all members of a vector */
126void vec_add(fvec_t * mag, smpl_t threshold);126void vec_add(fvec_t * mag, smpl_t threshold);
127 127
128/** compute adaptive threshold of input vector */
128void vec_adapt_thres(fvec_t * vec, fvec_t * tmp, 129void vec_adapt_thres(fvec_t * vec, fvec_t * tmp,
129 uint_t win_post, uint_t win_pre);130 uint_t win_post, uint_t win_pre);
130/** adaptative thresholding 131/** adaptative thresholding
@@ -181,14 +182,22 @@ smpl_t aubio_quadfrac(smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf); · 50 unmodified lines
181/** returns 1 if X1 is a peak and positive */182/** returns 1 if X1 is a peak and positive */
182uint_t vec_peakpick(fvec_t * input, uint_t pos);183uint_t vec_peakpick(fvec_t * input, uint_t pos);
183 184
185/** convert frequency bin to midi value */
184smpl_t aubio_bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize);186smpl_t aubio_bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize);
187/** convert midi value to frequency bin */
185smpl_t aubio_miditobin(smpl_t midi, smpl_t samplerate, smpl_t fftsize);188smpl_t aubio_miditobin(smpl_t midi, smpl_t samplerate, smpl_t fftsize);
189/** convert frequency bin to frequency (Hz) */
186smpl_t aubio_bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize);190smpl_t aubio_bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize);
191/** convert frequency (Hz) to frequency bin */
187smpl_t aubio_freqtobin(smpl_t freq, smpl_t samplerate, smpl_t fftsize);192smpl_t aubio_freqtobin(smpl_t freq, smpl_t samplerate, smpl_t fftsize);
193/** convert frequency (Hz) to midi value (0-128) */
188smpl_t aubio_freqtomidi(smpl_t freq);194smpl_t aubio_freqtomidi(smpl_t freq);
195/** convert midi value (0-128) to frequency (Hz) */
189smpl_t aubio_miditofreq(smpl_t midi);196smpl_t aubio_miditofreq(smpl_t midi);
190 197
198/** check if current buffer level is under a given threshold */
191uint_t aubio_silence_detection(fvec_t * ibuf, smpl_t threshold);199uint_t aubio_silence_detection(fvec_t * ibuf, smpl_t threshold);
200/** get the current buffer level */
192smpl_t aubio_level_detection(fvec_t * ibuf, smpl_t threshold);201smpl_t aubio_level_detection(fvec_t * ibuf, smpl_t threshold);
193/** 202/**
194 * calculate normalised autocorrelation function203 * calculate normalised autocorrelation function
src/peakpick.h+11−0
@@ -30,20 +30,31 @@ · 29 unmodified lines
30extern "C" {30extern "C" {
31#endif31#endif
32 32
33/** function pointer to thresholding function */
33typedef smpl_t (*aubio_thresholdfn_t)(fvec_t *input);34typedef smpl_t (*aubio_thresholdfn_t)(fvec_t *input);
35/** function pointer to peak-picking function */
34typedef uint_t (*aubio_pickerfn_t)(fvec_t *input, uint_t pos);36typedef uint_t (*aubio_pickerfn_t)(fvec_t *input, uint_t pos);
37/** peak-picker structure */
35typedef struct _aubio_pickpeak_t aubio_pickpeak_t;38typedef struct _aubio_pickpeak_t aubio_pickpeak_t;
36 39
40/** peak-picker creation function */
37aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold);41aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold);
42/** real time peak picking function */
38uint_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p);43uint_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p);
39/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */44/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
40uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval );45uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval );
46/** get current peak value */
41smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t * p);47smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t * p);
48/** destroy peak picker structure */
42void del_aubio_peakpicker(aubio_pickpeak_t * p);49void del_aubio_peakpicker(aubio_pickpeak_t * p);
43 50
51/** set peak picking threshold */
44void aubio_peakpicker_set_threshold(aubio_pickpeak_t * p, smpl_t threshold);52void aubio_peakpicker_set_threshold(aubio_pickpeak_t * p, smpl_t threshold);
53/** get peak picking threshold */
45smpl_t aubio_peakpicker_get_threshold(aubio_pickpeak_t * p);54smpl_t aubio_peakpicker_get_threshold(aubio_pickpeak_t * p);
55/** set peak picker thresholding function */
46void aubio_peakpicker_set_thresholdfn(aubio_pickpeak_t * p, aubio_thresholdfn_t thresholdfn);56void aubio_peakpicker_set_thresholdfn(aubio_pickpeak_t * p, aubio_thresholdfn_t thresholdfn);
57/** get peak picker thresholding function */
47aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_pickpeak_t * p);58aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_pickpeak_t * p);
48 59
49#ifdef __cplusplus60#ifdef __cplusplus
src/pitchmcomb.h+1−0
@@ -49,6 +49,7 @@ typedef struct _aubio_pitchmcomb_t aubio_pitchmcomb_t; · 48 unmodified lines
49 49
50*/50*/
51smpl_t aubio_pitchmcomb_detect(aubio_pitchmcomb_t * p, cvec_t * fftgrain);51smpl_t aubio_pitchmcomb_detect(aubio_pitchmcomb_t * p, cvec_t * fftgrain);
52/** select the best candidates */
52uint_t aubio_pitch_cands(aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands);53uint_t aubio_pitch_cands(aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands);
53/** creation of the pitch detection object54/** creation of the pitch detection object
54 55
src/tempo.h+10−0
@@ -17,6 +17,15 @@ · 16 unmodified lines
17 17
18*/18*/
19 19
20/** \file
21
22 Tempo detection driver
23
24 This object stores all the memory required for tempo detection algorithm
25 and returns the estimated beat locations.
26
27*/
28
20#ifndef TEMPO_H29#ifndef TEMPO_H
21#define TEMPO_H30#define TEMPO_H
22 31
@@ -24,6 +33,7 @@ · 1 unmodified line
24extern "C" {33extern "C" {
25#endif34#endif
26 35
36/** tempo detection structure */
27typedef struct _aubio_tempo_t aubio_tempo_t;37typedef struct _aubio_tempo_t aubio_tempo_t;
28 38
29/** create tempo detection object */39/** create tempo detection object */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t