Changeset 04ebe31 for src/spectral
- Timestamp:
- Mar 11, 2017, 12:20:39 AM (8 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, sampler
- Children:
- 90e25cc
- Parents:
- 6352034
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/awhitening.c
r6352034 r04ebe31 25 25 #include "spectral/awhitening.h" 26 26 27 #define aubio_spectral_whitening_default_relax_time 30 // in seconds27 #define aubio_spectral_whitening_default_relax_time 250 // in seconds, between 22 and 446 28 28 #define aubio_spectral_whitening_default_decay 0.001 // -60dB attenuation 29 #define aubio_spectral_whitening_default_floor 1.e-4 // from 1.e-6 to .2 29 30 30 31 /** structure to store object state */ … … 44 45 uint_t i = 0; 45 46 for (i = 0; i < o->peak_values->length; i++) { 46 o->peak_values->data[i] =47 MAX(fftgrain->norm[i], o->r_decay * o->peak_values->data[i]);47 smpl_t tmp = MAX(o->r_decay * o->peak_values->data[i], o->floor); 48 o->peak_values->data[i] = MAX(fftgrain->norm[i], tmp); 48 49 fftgrain->norm[i] /= o->peak_values->data[i]; 49 50 } … … 68 69 o->hop_size = hop_size; 69 70 o->samplerate = samplerate; 70 o->floor = 1.e-6; // from 1.e-6 to 0.271 o->floor = aubio_spectral_whitening_default_floor; 71 72 aubio_spectral_whitening_set_relax_time (o, aubio_spectral_whitening_default_relax_time); 72 73 aubio_spectral_whitening_reset (o);
Note: See TracChangeset
for help on using the changeset viewer.