Changeset 28d8c4a for src/mathutils.c
 Timestamp:
 Aug 9, 2005, 12:09:36 PM (14 years ago)
 Branches:
 feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
 Children:
 5e9c68a
 Parents:
 ea865c9
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/mathutils.c
rea865c9 r28d8c4a 24 24 #include "mathutils.h" 25 25 26 void window(smpl_t *w, uint_t size, aubio_window_type_twintype) {26 void aubio_window(smpl_t *w, uint_t size, aubio_window_type wintype) { 27 27 uint_t i; 28 28 switch(wintype) { … … 74 74 75 75 76 smpl_t unwrap2pi(smpl_t phase) {76 smpl_t aubio_unwrap2pi(smpl_t phase) { 77 77 /* mod(phase+pi,2pi)+pi */ 78 78 return phase + TWO_PI * (1. + floorf((phase+PI)/TWO_PI)); … … 319 319 /* increase frac */ 320 320 for (frac = 0.; frac < 2.; frac = frac + step) { 321 res = quadfrac(s0, s1, s2, frac);321 res = aubio_quadfrac(s0, s1, s2, frac); 322 322 if (res > resold) 323 323 resold = res; … … 331 331 } 332 332 333 smpl_t quadfrac(smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf) {333 smpl_t aubio_quadfrac(smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf) { 334 334 smpl_t tmp = s0 + (pf/2.) * (pf * ( s0  2.*s1 + s2 )  3.*s0 + 4.*s1  s2); 335 335 return tmp; … … 345 345 } 346 346 347 smpl_t freqtomidi(smpl_t freq) {347 smpl_t aubio_freqtomidi(smpl_t freq) { 348 348 smpl_t midi = freq/6.875; 349 349 /* log(freq/A2)/log(2) */ … … 354 354 } 355 355 356 smpl_t bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize) {356 smpl_t aubio_bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize) { 357 357 smpl_t freq = samplerate/fftsize; 358 358 return freq*bin; … … 360 360 361 361 362 smpl_t bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize) {363 smpl_t midi = bintofreq(bin,samplerate,fftsize);364 return freqtomidi(midi);362 smpl_t aubio_bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize) { 363 smpl_t midi = aubio_bintofreq(bin,samplerate,fftsize); 364 return aubio_freqtomidi(midi); 365 365 } 366 366
Note: See TracChangeset
for help on using the changeset viewer.