- Timestamp:
- Oct 18, 2009, 3:17:20 PM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- bf1c6746
- Parents:
- 56ef7e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
swig/aubio.i
r56ef7e1 re5f49af 11 11 12 12 /* fvec */ 13 externfvec_t * new_fvec(uint_t length, uint_t channels);14 externvoid del_fvec(fvec_t *s);13 fvec_t * new_fvec(uint_t length, uint_t channels); 14 void del_fvec(fvec_t *s); 15 15 smpl_t fvec_read_sample(fvec_t *s, uint_t channel, uint_t position); 16 16 void fvec_write_sample(fvec_t *s, smpl_t data, uint_t channel, uint_t position); … … 43 43 44 44 /* cvec */ 45 externcvec_t * new_cvec(uint_t length, uint_t channels);46 externvoid del_cvec(cvec_t *s);47 externvoid cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);48 externvoid cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);49 externsmpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);50 externsmpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);51 externvoid cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);52 externvoid cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);53 externsmpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);54 externsmpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);55 externsmpl_t ** cvec_get_norm(cvec_t *s);56 externsmpl_t ** cvec_get_phas(cvec_t *s);45 cvec_t * new_cvec(uint_t length, uint_t channels); 46 void del_cvec(cvec_t *s); 47 void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position); 48 void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position); 49 smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position); 50 smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position); 51 void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel); 52 void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel); 53 smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel); 54 smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel); 55 smpl_t ** cvec_get_norm(cvec_t *s); 56 smpl_t ** cvec_get_phas(cvec_t *s); 57 57 58 58 59 59 /* fft */ 60 externaubio_fft_t * new_aubio_fft(uint_t size, uint_t channels);61 externvoid del_aubio_fft(aubio_fft_t * s);62 externvoid aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);63 externvoid aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);64 externvoid aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);65 externvoid aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);66 externvoid aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);67 externvoid aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);68 externvoid aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);69 externvoid aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);70 externvoid aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);71 externvoid aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);60 aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels); 61 void del_aubio_fft(aubio_fft_t * s); 62 void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum); 63 void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output); 64 void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec); 65 void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output); 66 void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum); 67 void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec); 68 void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum); 69 void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec); 70 void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum); 71 void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec); 72 72 73 73 /* filter */ 74 externaubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order, uint_t channels);75 externvoid aubio_filter_do(aubio_filter_t * b, fvec_t * in);76 externvoid aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out);77 externvoid aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);78 externvoid del_aubio_filter(aubio_filter_t * b);79 80 externaubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels);81 externuint_t aubio_filter_set_a_weighting (aubio_filter_t * b);82 83 externaubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels);84 externuint_t aubio_filter_set_c_weighting (aubio_filter_t * b);74 aubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order, uint_t channels); 75 void aubio_filter_do(aubio_filter_t * b, fvec_t * in); 76 void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out); 77 void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp); 78 void del_aubio_filter(aubio_filter_t * b); 79 80 aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels); 81 uint_t aubio_filter_set_a_weighting (aubio_filter_t * b); 82 83 aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels); 84 uint_t aubio_filter_set_c_weighting (aubio_filter_t * b); 85 85 86 86 /* biquad */ 87 externaubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);88 externvoid aubio_biquad_do(aubio_biquad_t * b, fvec_t * in);89 externvoid aubio_biquad_do_filtfilt(aubio_biquad_t * b, fvec_t * in, fvec_t * tmp);90 externvoid del_aubio_biquad(aubio_biquad_t * b);87 aubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3); 88 void aubio_biquad_do(aubio_biquad_t * b, fvec_t * in); 89 void aubio_biquad_do_filtfilt(aubio_biquad_t * b, fvec_t * in, fvec_t * tmp); 90 void del_aubio_biquad(aubio_biquad_t * b); 91 91 92 92 /* hist */ 93 externaubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);94 externvoid del_aubio_hist(aubio_hist_t *s);95 externvoid aubio_hist_do(aubio_hist_t *s, fvec_t * input);96 externvoid aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);97 externvoid aubio_hist_dyn_notnull(aubio_hist_t *s, fvec_t *input);98 externvoid aubio_hist_weight(aubio_hist_t *s);99 externsmpl_t aubio_hist_mean(aubio_hist_t *s);93 aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels); 94 void del_aubio_hist(aubio_hist_t *s); 95 void aubio_hist_do(aubio_hist_t *s, fvec_t * input); 96 void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input); 97 void aubio_hist_dyn_notnull(aubio_hist_t *s, fvec_t *input); 98 void aubio_hist_weight(aubio_hist_t *s); 99 smpl_t aubio_hist_mean(aubio_hist_t *s); 100 100 101 101 /* mathutils */ … … 115 115 void fvec_alpha_normalise(fvec_t * mag, uint_t alpha); 116 116 void fvec_add(fvec_t * mag, smpl_t threshold); 117 void fvec_adapt_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre );118 smpl_t fvec_moving_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t pos );119 smpl_t fvec_median (fvec_t * input);117 void fvec_adapt_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t channel); 118 smpl_t fvec_moving_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t pos, uint_t channel); 119 smpl_t fvec_median_channel (fvec_t * input, uint_t channel); 120 120 smpl_t fvec_quadint(fvec_t * x,uint_t pos, uint_t span); 121 121 smpl_t aubio_quadfrac(smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf); … … 147 147 148 148 /* scale */ 149 externaubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig);150 externuint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);151 externvoid aubio_scale_do(aubio_scale_t *s, fvec_t * input);152 externvoid del_aubio_scale(aubio_scale_t *s);149 aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig); 150 uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); 151 void aubio_scale_do(aubio_scale_t *s, fvec_t * input); 152 void del_aubio_scale(aubio_scale_t *s); 153 153 154 154 /* resampling */ 155 155 #if HAVE_SAMPLERATE 156 externaubio_resampler_t * new_aubio_resampler(float ratio, uint_t type);157 externvoid aubio_resampler_do (aubio_resampler_t *s, fvec_t * input, fvec_t * output);158 externvoid del_aubio_resampler(aubio_resampler_t *s);156 aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type); 157 void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input, fvec_t * output); 158 void del_aubio_resampler(aubio_resampler_t *s); 159 159 #endif /* HAVE_SAMPLERATE */ 160 160 … … 199 199 200 200 /* peakpicker */ 201 aubio_peakpicker_t * new_aubio_peakpicker( smpl_t threshold);202 smpl_t aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * df);201 aubio_peakpicker_t * new_aubio_peakpicker(uint_t channels); 202 void aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * df, fvec_t * out); 203 203 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p); 204 204 void del_aubio_peakpicker(aubio_peakpicker_t * p); … … 238 238 #include "sndfileio.h" 239 239 %} 240 externaubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);241 externaubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);242 externvoid aubio_sndfile_info(aubio_sndfile_t * file);243 externint aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);244 externint aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);245 externint del_aubio_sndfile(aubio_sndfile_t * file);246 externuint_t aubio_sndfile_channels(aubio_sndfile_t * file);247 externuint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);240 aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); 241 aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); 242 void aubio_sndfile_info(aubio_sndfile_t * file); 243 int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write); 244 int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read); 245 int del_aubio_sndfile(aubio_sndfile_t * file); 246 uint_t aubio_sndfile_channels(aubio_sndfile_t * file); 247 uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); 248 248 %{ 249 249 #endif /* HAVE_SNDFILE */
Note: See TracChangeset
for help on using the changeset viewer.