- Timestamp:
- Dec 1, 2007, 9:53:24 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:
- 4123f16
- Parents:
- 0380645
- Location:
- src
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
r0380645 r4f4d892 1 noinst_HEADERS = aubio_priv.h 1 noinst_HEADERS = \ 2 aubio_priv.h \ 3 temporal/filter_priv.h 4 2 5 pkginclude_HEADERS = aubio.h \ 3 6 types.h \ … … 20 23 temporal/resample.h \ 21 24 temporal/biquad.h \ 22 temporal/filter.h 25 temporal/filter.h \ 26 temporal/adesign.h \ 27 temporal/cdesign.h 23 28 24 29 pkgincludespectral_HEADERS = \ … … 57 62 temporal/biquad.c \ 58 63 temporal/filter.c \ 64 temporal/adesign.c \ 65 temporal/cdesign.c \ 59 66 spectral/filterbank.c \ 60 67 spectral/mfcc.c \ -
src/temporal/filter.c
r0380645 r4f4d892 26 26 #include "mathutils.h" 27 27 #include "temporal/filter.h" 28 29 struct _aubio_filter_t { 30 uint_t order; 31 lsmp_t * a; 32 lsmp_t * b; 33 lsmp_t * y; 34 lsmp_t * x; 35 }; 28 #include "temporal/filter_priv.h" 36 29 37 30 /* bug: mono only */ … … 133 126 } 134 127 135 136 aubio_filter_t * new_aubio_adsgn_filter(uint_t samplerate) {137 aubio_filter_t * f = new_aubio_filter(samplerate, 7);138 lsmp_t * a = f->a;139 lsmp_t * b = f->b;140 /* uint_t l; */141 /* for now, 44100, adsgn */142 a[0] = 1.00000000000000000000000000000000000000000000000000000;143 a[1] = -4.01957618111583236952810693765059113502502441406250000;144 a[2] = 6.18940644292069386267485242569819092750549316406250000;145 a[3] = -4.45319890354411640487342083360999822616577148437500000;146 a[4] = 1.42084294962187751565352300531230866909027099609375000;147 a[5] = -0.14182547383030480458998567883099894970655441284179688;148 a[6] = 0.00435117723349511334451911181986361043527722358703613;149 b[0] = 0.25574112520425740235907596797915175557136535644531250;150 b[1] = -0.51148225040851391653973223583307117223739624023437500;151 b[2] = -0.25574112520426162120656954357400536537170410156250000;152 b[3] = 1.02296450081703405032840237254276871681213378906250000;153 b[4] = -0.25574112520426051098354491841746494174003601074218750;154 b[5] = -0.51148225040851369449512731080176308751106262207031250;155 b[6] = 0.25574112520425729133677350546349771320819854736328125;156 /* DBG: filter coeffs at creation time */157 /*158 for (l=0; l<f->order; l++){159 AUBIO_DBG("a[%d]=\t%1.16f\tb[%d]=\t%1.16f\n",l,a[l],l,b[l]);160 }161 */162 f->a = a;163 f->b = b;164 return f;165 }166 167 aubio_filter_t * new_aubio_cdsgn_filter(uint_t samplerate) {168 aubio_filter_t * f = new_aubio_filter(samplerate, 5);169 lsmp_t * a = f->a;170 lsmp_t * b = f->b;171 /* uint_t l; */172 /* for now, 44100, cdsgn */173 a[0] = 1.000000000000000000000000000000000000000000000000000000000000;174 a[1] = -2.134674963687040794013682898366823792457580566406250000000000;175 a[2] = 1.279333533236063358273781886964570730924606323242187500000000;176 a[3] = -0.149559846089396208945743182994192466139793395996093750000000;177 a[4] = 0.004908700174624848651394604104325480875559151172637939453125;178 b[0] = 0.217008561949218803377448239189106971025466918945312500000000;179 b[1] = -0.000000000000000222044604925031308084726333618164062500000000;180 b[2] = -0.434017123898438272888711253472138196229934692382812500000000;181 b[3] = 0.000000000000000402455846426619245903566479682922363281250000;182 b[4] = 0.217008561949218969910901932962588034570217132568359375000000;183 /* DBG: filter coeffs at creation time */184 /*185 for (l=0; l<f->order; l++){186 AUBIO_DBG("a[%d]=\t%1.16f\tb[%d]=\t%1.16f\n",l,a[l],l,b[l]);187 }188 */189 f->a = a;190 f->b = b;191 return f;192 }193 194 128 aubio_filter_t * new_aubio_filter(uint_t samplerate UNUSED, uint_t order) { 195 129 aubio_filter_t * f = AUBIO_NEW(aubio_filter_t); -
src/temporal/filter.h
r0380645 r4f4d892 72 72 */ 73 73 aubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order); 74 /** create a new A-design filter75 76 \param samplerate sampling-rate of the signal to filter77 78 */79 aubio_filter_t * new_aubio_adsgn_filter(uint_t samplerate);80 /** create a new C-design filter81 82 \param samplerate sampling-rate of the signal to filter83 84 */85 aubio_filter_t * new_aubio_cdsgn_filter(uint_t samplerate);86 74 /** delete a filter object 87 75
Note: See TracChangeset
for help on using the changeset viewer.