Changeset c03d191 for src/spectral/filterbank.c
 Timestamp:
 Nov 17, 2018, 10:19:27 PM (2 years ago)
 Branches:
 feature/constantq
 Children:
 d1d4ad4
 Parents:
 088760e (diff), a114fe0 (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.  File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/spectral/filterbank.c
r088760e rc03d191 24 24 #include "fmat.h" 25 25 #include "cvec.h" 26 #include "vecutils.h" 26 27 #include "spectral/filterbank.h" 27 28 #include "mathutils.h" … … 33 34 uint_t n_filters; 34 35 fmat_t *filters; 36 smpl_t norm; 37 smpl_t power; 35 38 }; 36 39 … … 45 48 /* allocate filter tables, a matrix of length win_s and of height n_filters */ 46 49 fb>filters = new_fmat (n_filters, win_s / 2 + 1); 50 51 fb>norm = 1; 52 53 fb>power = 1; 47 54 48 55 return fb; … … 68 75 tmp.data = in>norm; 69 76 77 if (f>power != 1.) fvec_pow(&tmp, f>power); 78 70 79 fmat_vecmul(f>filters, &tmp, out); 71 80 … … 85 94 return 0; 86 95 } 96 97 uint_t 98 aubio_filterbank_set_norm (aubio_filterbank_t *f, smpl_t norm) 99 { 100 if (norm != 0 && norm != 1) return AUBIO_FAIL; 101 f>norm = norm; 102 return AUBIO_OK; 103 } 104 105 smpl_t 106 aubio_filterbank_get_norm (aubio_filterbank_t *f) 107 { 108 return f>norm; 109 } 110 111 uint_t 112 aubio_filterbank_set_power (aubio_filterbank_t *f, smpl_t power) 113 { 114 f>power = power; 115 return AUBIO_OK; 116 } 117 118 smpl_t 119 aubio_filterbank_get_power (aubio_filterbank_t *f) 120 { 121 return f>norm; 122 }
Note: See TracChangeset
for help on using the changeset viewer.