- Timestamp:
- Oct 17, 2009, 12:43:00 AM (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:
- 858cfa7
- Parents:
- 6107f4c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
swig/aubio.i
r6107f4c r740f06b 2 2 3 3 %{ 4 #include "aubio.h" 5 #include "aubioext.h" 4 #include "aubio.h" 6 5 %} 7 8 #include "aubio.h"9 #include "aubioext.h"10 6 11 7 /* type aliases */ … … 60 56 extern smpl_t ** cvec_get_phas(cvec_t *s); 61 57 62 63 /* sndfile */64 %#if HAVE_SNDFILE65 extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);66 extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);67 extern void aubio_sndfile_info(aubio_sndfile_t * file);68 extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);69 extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);70 extern int del_aubio_sndfile(aubio_sndfile_t * file);71 extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file);72 extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);73 %#endif /* HAVE_SNDFILE */74 58 75 59 /* fft */ … … 176 160 /* scale */ 177 161 extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig); 178 extern voidaubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);162 extern uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); 179 163 extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input); 180 164 extern void del_aubio_scale(aubio_scale_t *s); 181 165 182 166 /* resampling */ 183 %#if HAVE_SAMPLERATE167 #if HAVE_SAMPLERATE 184 168 extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type); 185 169 extern void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input, fvec_t * output); 186 170 extern void del_aubio_resampler(aubio_resampler_t *s); 187 %#endif /* HAVE_SAMPLERATE */171 #endif /* HAVE_SAMPLERATE */ 188 172 189 173 /* onset detection */ … … 202 186 uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate); 203 187 void aubio_pitchdetection_do (aubio_pitchdetection_t * p, fvec_t * ibuf, fvec_t * obuf); 204 voidaubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);205 voidaubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);188 uint_t aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres); 189 uint_t aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit); 206 190 void del_aubio_pitchdetection(aubio_pitchdetection_t * p); 207 208 191 209 192 /* pitch mcomb */ … … 232 215 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p); 233 216 void del_aubio_peakpicker(aubio_peakpicker_t * p); 234 voidaubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);217 uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold); 235 218 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p); 236 219 237 220 /* transient/steady state separation */ 238 aubio_tss_t * new_aubio_tss(smpl_t thrs, smpl_t alfa, smpl_t beta, 239 uint_t size, uint_t overlap,uint_t channels); 240 void del_aubio_tss(aubio_tss_t *s); 241 void aubio_tss_do(aubio_tss_t *s, cvec_t * input, cvec_t * trans, cvec_t * stead); 221 aubio_tss_t *new_aubio_tss (uint_t win_s, uint_t hop_s, uint_t channels); 222 void del_aubio_tss (aubio_tss_t * s); 223 void aubio_tss_do (aubio_tss_t * s, cvec_t * input, cvec_t * trans, 224 cvec_t * stead); 225 uint_t aubio_tss_set_threshold (aubio_tss_t * o, smpl_t thrs); 226 uint_t aubio_tss_set_alpha (aubio_tss_t * o, smpl_t alpha); 227 uint_t aubio_tss_set_beta (aubio_tss_t * o, smpl_t beta); 242 228 243 229 /* beattracking */ … … 248 234 smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * p); 249 235 236 /* tempo */ 237 typedef struct _aubio_tempo_t aubio_tempo_t; 238 aubio_tempo_t * new_aubio_tempo (char_t * mode, 239 uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate); 240 void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo); 241 uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence); 242 uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold); 243 smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt); 244 smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt); 245 void del_aubio_tempo(aubio_tempo_t * o); 246 247 /* sndfile */ 248 %{ 249 #if HAVE_SNDFILE 250 #include "sndfileio.h" 251 %} 252 extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); 253 extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); 254 extern void aubio_sndfile_info(aubio_sndfile_t * file); 255 extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write); 256 extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read); 257 extern int del_aubio_sndfile(aubio_sndfile_t * file); 258 extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file); 259 extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); 260 %{ 261 #endif /* HAVE_SNDFILE */ 262 %}
Note: See TracChangeset
for help on using the changeset viewer.