- Timestamp:
- Nov 29, 2007, 5:34:18 PM (17 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:
- 212da72
- Parents:
- 66a1b955 (diff), 6c7d49b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 7 added
- 2 deleted
- 5 edited
- 37 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
r66a1b955 rdddf1f5 2 2 pkginclude_HEADERS = aubio.h \ 3 3 types.h \ 4 phasevoc.h \5 mathutils.h \6 fft.h \7 sample.h \8 4 fvec.h \ 9 5 cvec.h \ 10 hist.h \ 11 scale.h \ 12 resample.h \ 13 onsetdetection.h \ 14 tss.h \ 15 peakpick.h \ 16 biquad.h \ 17 pitchdetection.h \ 18 pitchmcomb.h \ 19 pitchyin.h \ 20 pitchschmitt.h \ 21 pitchfcomb.h \ 22 pitchyinfft.h \ 23 beattracking.h \ 24 onset.h \ 25 tempo.h \ 26 filter.h 6 mathutils.h \ 7 utils/hist.h \ 8 utils/scale.h \ 9 temporal/resample.h \ 10 temporal/biquad.h \ 11 temporal/filter.h \ 12 spectral/filterbank.h \ 13 spectral/mfcc.c \ 14 spectral/phasevoc.h \ 15 spectral/fft.h \ 16 spectral/tss.h \ 17 spectral/spectral_centroid.h \ 18 pitch/pitchdetection.h \ 19 pitch/pitchmcomb.h \ 20 pitch/pitchyin.h \ 21 pitch/pitchschmitt.h \ 22 pitch/pitchfcomb.h \ 23 pitch/pitchyinfft.h \ 24 onset/onset.h \ 25 onset/onsetdetection.h \ 26 onset/peakpick.h \ 27 tempo/tempo.h \ 28 tempo/beattracking.h 29 27 30 nodist_pkginclude_HEADERS = config.h 28 31 … … 30 33 libaubio_la_SOURCES = aubio.h \ 31 34 types.h \ 32 phasevoc.c \33 phasevoc.h \34 mathutils.c \35 mathutils.h \36 fft.c \37 fft.h \38 35 fvec.c \ 39 36 fvec.h \ 40 37 cvec.c \ 41 38 cvec.h \ 42 hist.c \ 43 hist.h \ 44 scale.c \ 45 scale.h \ 46 resample.c \ 47 resample.h \ 48 onsetdetection.c \ 49 onsetdetection.h \ 50 tss.c \ 51 tss.h \ 52 peakpick.c \ 53 peakpick.h \ 54 biquad.c \ 55 biquad.h \ 56 pitchdetection.c \ 57 pitchdetection.h \ 58 pitchmcomb.c \ 59 pitchmcomb.h \ 60 pitchyin.c \ 61 pitchyin.h \ 62 pitchschmitt.c \ 63 pitchschmitt.h \ 64 pitchfcomb.c \ 65 pitchfcomb.h \ 66 pitchyinfft.c \ 67 pitchyinfft.h \ 68 beattracking.c \ 69 beattracking.h \ 70 onset.c \ 71 onset.h \ 72 tempo.c \ 73 tempo.h \ 74 filter.c \ 75 filter.h 39 mathutils.c \ 40 mathutils.h \ 41 utils/hist.c \ 42 utils/hist.h \ 43 utils/scale.c \ 44 utils/scale.h \ 45 temporal/resample.c \ 46 temporal/resample.h \ 47 temporal/biquad.c \ 48 temporal/biquad.h \ 49 temporal/filter.c \ 50 temporal/filter.h \ 51 spectral/filterbank.c \ 52 spectral/filterbank.h \ 53 spectral/mfcc.h \ 54 spectral/mfcc.c \ 55 spectral/phasevoc.c \ 56 spectral/phasevoc.h \ 57 spectral/fft.c \ 58 spectral/fft.h \ 59 spectral/tss.c \ 60 spectral/tss.h \ 61 spectral/spectral_centroid.c \ 62 spectral/spectral_centroid.h \ 63 pitch/pitchdetection.c \ 64 pitch/pitchdetection.h \ 65 pitch/pitchmcomb.c \ 66 pitch/pitchmcomb.h \ 67 pitch/pitchyin.c \ 68 pitch/pitchyin.h \ 69 pitch/pitchschmitt.c \ 70 pitch/pitchschmitt.h \ 71 pitch/pitchfcomb.c \ 72 pitch/pitchfcomb.h \ 73 pitch/pitchyinfft.c \ 74 pitch/pitchyinfft.h \ 75 onset/onset.c \ 76 onset/onset.h \ 77 onset/onsetdetection.c \ 78 onset/onsetdetection.h \ 79 onset/peakpick.c \ 80 onset/peakpick.h \ 81 tempo/tempo.c \ 82 tempo/tempo.h \ 83 tempo/beattracking.c \ 84 tempo/beattracking.h 76 85 77 86 AM_CFLAGS = @AUBIO_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@ -
src/aubio.h
r66a1b955 rdddf1f5 59 59 /* in this order */ 60 60 #include "types.h" 61 #include "sample.h" 62 #include "fft.h" 63 #include "phasevoc.h" 61 #include "fvec.h" 62 #include "cvec.h" 64 63 #include "mathutils.h" 65 #include "scale.h" 66 #include "hist.h" 67 #include "onsetdetection.h" 68 #include "tss.h" 69 #include "resample.h" 70 #include "peakpick.h" 71 #include "biquad.h" 72 #include "filter.h" 73 #include "pitchdetection.h" 74 #include "pitchmcomb.h" 75 #include "pitchyin.h" 76 #include "pitchyinfft.h" 77 #include "pitchschmitt.h" 78 #include "pitchfcomb.h" 79 #include "beattracking.h" 80 #include "onset.h" 81 #include "tempo.h" 64 #include "utils/scale.h" 65 #include "utils/hist.h" 66 #include "spectral/tss.h" 67 #include "temporal/resample.h" 68 #include "temporal/biquad.h" 69 #include "temporal/filter.h" 70 #include "spectral/filterbank.h" 71 #include "spectral/mfcc.h" 72 #include "spectral/fft.h" 73 #include "spectral/phasevoc.h" 74 #include "spectral/spectral_centroid.h" 75 #include "pitch/pitchdetection.h" 76 #include "pitch/pitchmcomb.h" 77 #include "pitch/pitchyin.h" 78 #include "pitch/pitchyinfft.h" 79 #include "pitch/pitchschmitt.h" 80 #include "pitch/pitchfcomb.h" 81 #include "onset/onsetdetection.h" 82 #include "onset/onset.h" 83 #include "onset/peakpick.h" 84 #include "tempo/beattracking.h" 85 #include "tempo/tempo.h" 82 86 83 87 #ifdef __cplusplus -
src/fvec.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"21 #include "fvec.h" 22 22 23 23 fvec_t * new_fvec( uint_t length, uint_t channels) { -
src/mathutils.c
r66a1b955 rdddf1f5 21 21 22 22 #include "aubio_priv.h" 23 #include " sample.h"23 #include "fvec.h" 24 24 #include "mathutils.h" 25 25 #include "config.h" … … 227 227 /* pre part of the buffer does not exist */ 228 228 } else { 229 for (k=0;k<length-pos+post +1;k++)229 for (k=0;k<length-pos+post;k++) 230 230 medar[k] = vec->data[0][k+pos-post]; 231 for (k=length-pos+post +1;k<win_length;k++)231 for (k=length-pos+post;k<win_length;k++) 232 232 medar[k] = 0.; /* 0-padding at the end */ 233 233 } … … 433 433 } 434 434 435 smpl_t aubio_spectral_centroid(cvec_t * spectrum, smpl_t samplerate) {436 uint_t i=0, j;437 smpl_t sum = 0., sc = 0.;438 for ( j = 0; j < spectrum->length; j++ ) {439 sum += spectrum->norm[i][j];440 }441 if (sum == 0.) return 0.;442 for ( j = 0; j < spectrum->length; j++ ) {443 sc += (smpl_t)j * spectrum->norm[i][j];444 }445 return sc / sum * samplerate / (smpl_t)(spectrum->length);446 }447 448 435 void aubio_autocorr(fvec_t * input, fvec_t * output) { 449 436 uint_t i = 0, j = 0, length = input->length; -
src/mathutils.h
r66a1b955 rdddf1f5 209 209 smpl_t aubio_zero_crossing_rate(fvec_t * input); 210 210 /** 211 * spectrum centroid computed on a cvec212 */213 smpl_t aubio_spectral_centroid(cvec_t * input, smpl_t samplerate);214 /**215 211 * clean up cached memory at the end of program 216 212 * -
src/onset/onset.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include "sample.h" 22 #include "onsetdetection.h" 23 #include "phasevoc.h" 24 #include "peakpick.h" 21 #include "fvec.h" 22 #include "cvec.h" 23 #include "onset/onsetdetection.h" 24 #include "spectral/phasevoc.h" 25 #include "onset/peakpick.h" 25 26 #include "mathutils.h" 26 #include "onset .h"27 #include "onset/onset.h" 27 28 28 29 /** structure to store object state */ -
src/onset/onsetdetection.h
r66a1b955 rdddf1f5 47 47 aubio_onset_phase, /**< phase fast */ 48 48 aubio_onset_kl, /**< Kullback Liebler */ 49 aubio_onset_mkl /**< modified Kullback Liebler */ 49 aubio_onset_mkl, /**< modified Kullback Liebler */ 50 aubio_onset_specflux, /**< spectral flux */ 50 51 } aubio_onsetdetection_type; 51 52 … … 137 138 */ 138 139 void aubio_onsetdetection_mkl(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); 140 /** Spectral Flux 141 142 Simon Dixon, Onset Detection Revisited, in ``Proceedings of the 9th 143 International Conference on Digital Audio Effects'' (DAFx-06), Montreal, 144 Canada, 2006. 145 146 \param o onset detection object as returned by new_aubio_onsetdetection() 147 \param fftgrain input spectral frame 148 \param onset output onset detection function 149 150 */ 151 void aubio_onsetdetection_specflux(aubio_onsetdetection_t *o, cvec_t * fftgrain, fvec_t * onset); 139 152 /** execute onset detection function on a spectral frame 140 153 -
src/onset/peakpick.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"21 #include "fvec.h" 22 22 #include "mathutils.h" 23 #include " biquad.h"24 #include " peakpick.h"23 #include "temporal/biquad.h" 24 #include "onset/peakpick.h" 25 25 26 26 /* peak picking parameters, default values in brackets -
src/pitch/pitchdetection.c
r66a1b955 rdddf1f5 18 18 19 19 #include "aubio_priv.h" 20 #include "sample.h" 21 #include "phasevoc.h" 20 #include "fvec.h" 21 #include "cvec.h" 22 #include "spectral/phasevoc.h" 22 23 #include "mathutils.h" 23 #include " filter.h"24 #include "pitch mcomb.h"25 #include "pitch yin.h"26 #include "pitch fcomb.h"27 #include "pitch schmitt.h"28 #include "pitch yinfft.h"29 #include "pitch detection.h"24 #include "temporal/filter.h" 25 #include "pitch/pitchmcomb.h" 26 #include "pitch/pitchyin.h" 27 #include "pitch/pitchfcomb.h" 28 #include "pitch/pitchschmitt.h" 29 #include "pitch/pitchyinfft.h" 30 #include "pitch/pitchdetection.h" 30 31 31 32 typedef smpl_t (*aubio_pitchdetection_func_t) -
src/pitch/pitchfcomb.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include "sample.h" 21 #include "fvec.h" 22 #include "cvec.h" 22 23 #include "mathutils.h" 23 #include " fft.h"24 #include "pitch fcomb.h"24 #include "spectral/fft.h" 25 #include "pitch/pitchfcomb.h" 25 26 26 27 #define MAX_PEAKS 8 -
src/pitch/pitchmcomb.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include "sample.h" 21 #include "fvec.h" 22 #include "cvec.h" 22 23 #include "mathutils.h" 23 #include "pitch mcomb.h"24 #include "pitch/pitchmcomb.h" 24 25 25 26 #define CAND_SWAP(a,b) { register aubio_spectralcandidate_t *t=(a);(a)=(b);(b)=t; } … … 192 193 uint_t l; 193 194 uint_t d; 194 uint_t curlen ;195 uint_t curlen = 0; 195 196 196 197 smpl_t delta2; … … 214 215 candidate[l]->ebin=scaler*peaks[root_peak].ebin; 215 216 /* if less than N peaks available, curlen < N */ 216 curlen = (uint_t)FLOOR(length/(candidate[l]->ebin)); 217 if (candidate[l]->ebin != 0.) 218 curlen = (uint_t)FLOOR(length/(candidate[l]->ebin)); 217 219 curlen = (N < curlen )? N : curlen; 218 220 /* fill candidate[l]->ecomb[k] with (k+1)*candidate[l]->ebin */ … … 326 328 aubio_pitchmcomb_t * p = AUBIO_NEW(aubio_pitchmcomb_t); 327 329 /* bug: should check if size / 8 > post+pre+1 */ 328 uint_t i ;330 uint_t i, j; 329 331 uint_t spec_size; 330 332 p->spec_partition = 4; … … 353 355 /* array of spectral peaks */ 354 356 p->peaks = AUBIO_ARRAY(aubio_spectralpeak_t,spec_size); 357 for (i = 0; i < spec_size; i++) { 358 p->peaks[i].bin = 0.; 359 p->peaks[i].ebin = 0.; 360 p->peaks[i].mag = 0.; 361 } 355 362 /* array of pointers to spectral candidates */ 356 363 p->candidates = AUBIO_ARRAY(aubio_spectralcandidate_t *,p->ncand); … … 358 365 p->candidates[i] = AUBIO_NEW(aubio_spectralcandidate_t); 359 366 p->candidates[i]->ecomb = AUBIO_ARRAY(smpl_t, spec_size); 367 for (j=0; j < spec_size; j++) { 368 p->candidates[i]->ecomb[j] = 0.; 369 } 370 p->candidates[i]->ene = 0.; 371 p->candidates[i]->ebin = 0.; 372 p->candidates[i]->len = 0.; 360 373 } 361 374 return p; … … 367 380 del_fvec(p->newmag); 368 381 del_fvec(p->scratch); 382 del_fvec(p->theta); 369 383 del_fvec(p->scratch2); 370 384 AUBIO_FREE(p->peaks); 371 385 for (i=0;i<p->ncand;i++) { 386 AUBIO_FREE(p->candidates[i]->ecomb); 372 387 AUBIO_FREE(p->candidates[i]); 373 388 } -
src/pitch/pitchschmitt.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"22 #include "pitch schmitt.h"21 #include "fvec.h" 22 #include "pitch/pitchschmitt.h" 23 23 24 24 smpl_t aubio_schmittS16LE (aubio_pitchschmitt_t *p, uint_t nframes, signed short int *indata); -
src/pitch/pitchyinfft.c
r66a1b955 rdddf1f5 18 18 19 19 #include "aubio_priv.h" 20 #include "sample.h" 20 #include "fvec.h" 21 #include "cvec.h" 21 22 #include "mathutils.h" 22 #include " fft.h"23 #include "pitch yinfft.h"23 #include "spectral/fft.h" 24 #include "pitch/pitchyinfft.h" 24 25 25 26 /** pitch yinfft structure */ -
src/spectral/fft.c
r66a1b955 rdddf1f5 22 22 #include "cvec.h" 23 23 #include "mathutils.h" 24 #include " fft.h"24 #include "spectral/fft.h" 25 25 26 26 #if FFTW3F_SUPPORT -
src/spectral/phasevoc.c
r66a1b955 rdddf1f5 21 21 #include "fvec.h" 22 22 #include "cvec.h" 23 #include "fft.h"24 23 #include "mathutils.h" 25 #include "phasevoc.h" 24 #include "spectral/fft.h" 25 #include "spectral/phasevoc.h" 26 26 27 27 /** phasevocoder internal object */ -
src/spectral/spectral_centroid.h
r66a1b955 rdddf1f5 1 1 /* 2 Copyright (C) 200 3-2007 Paul Brossier <piem@piem.org>2 Copyright (C) 2007 Paul Brossier 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 18 18 */ 19 19 20 #ifndef _SAMPLE_H 21 #define _SAMPLE_H 20 /** @file 21 * compute spectrum centroid of a cvec object 22 */ 22 23 23 #include "fvec.h" 24 #include "cvec.h" 25 26 #endif /* _SAMPLE_H */ 24 /** 25 * spectrum centroid computed on a cvec 26 */ 27 smpl_t aubio_spectral_centroid(cvec_t * input, smpl_t samplerate); -
src/spectral/tss.c
r66a1b955 rdddf1f5 21 21 22 22 #include "aubio_priv.h" 23 #include "sample.h" 23 #include "fvec.h" 24 #include "cvec.h" 24 25 #include "mathutils.h" 25 #include " tss.h"26 #include "spectral/tss.h" 26 27 27 28 struct _aubio_tss_t -
src/tempo/beattracking.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"21 #include "fvec.h" 22 22 #include "mathutils.h" 23 #include " beattracking.h"23 #include "tempo/beattracking.h" 24 24 25 25 uint_t fvec_gettimesig(smpl_t * acf, uint_t acflen, uint_t gp); -
src/tempo/tempo.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include "sample.h" 22 #include "onsetdetection.h" 23 #include "beattracking.h" 24 #include "phasevoc.h" 25 #include "peakpick.h" 21 #include "fvec.h" 22 #include "cvec.h" 23 #include "onset/onsetdetection.h" 24 #include "tempo/beattracking.h" 25 #include "spectral/phasevoc.h" 26 #include "onset/peakpick.h" 26 27 #include "mathutils.h" 27 #include "tempo .h"28 #include "tempo/tempo.h" 28 29 29 30 /* structure to store object state */ -
src/temporal/biquad.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"21 #include "fvec.h" 22 22 #include "mathutils.h" 23 #include " biquad.h"23 #include "temporal/biquad.h" 24 24 25 25 /** \note this file needs to be in double or more less precision would lead to large -
src/temporal/filter.c
r66a1b955 rdddf1f5 23 23 24 24 #include "aubio_priv.h" 25 #include " sample.h"25 #include "fvec.h" 26 26 #include "mathutils.h" 27 #include " filter.h"27 #include "temporal/filter.h" 28 28 29 29 struct _aubio_filter_t { -
src/temporal/resample.c
r66a1b955 rdddf1f5 22 22 23 23 #include "aubio_priv.h" 24 #include " sample.h"25 #include " resample.h"24 #include "fvec.h" 25 #include "temporal/resample.h" 26 26 27 27 struct _aubio_resampler_t { -
src/utils/hist.c
r66a1b955 rdddf1f5 18 18 19 19 #include "aubio_priv.h" 20 #include " sample.h"21 #include " scale.h"20 #include "fvec.h" 21 #include "utils/scale.h" 22 22 #include "mathutils.h" //vec_min vec_max 23 #include " hist.h"23 #include "utils/hist.h" 24 24 25 25 /******** -
src/utils/scale.c
r66a1b955 rdddf1f5 19 19 20 20 #include "aubio_priv.h" 21 #include " sample.h"22 #include " scale.h"21 #include "fvec.h" 22 #include "utils/scale.h" 23 23 24 24 struct _aubio_scale_t {
Note: See TracChangeset
for help on using the changeset viewer.