- Timestamp:
- Dec 7, 2013, 8:35:58 PM (11 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:
- a6e2e5f
- Parents:
- fd46d1e
- Location:
- src/utils
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/utils/hist.c
rfd46d1e r32082e5 39 39 * Object creation/deletion calls 40 40 */ 41 aubio_hist_t * new_aubio_hist (smpl_t ilow, smpl_t ihig, uint_t nelems){41 aubio_hist_t * new_aubio_hist (smpl_t flow, smpl_t fhig, uint_t nelems){ 42 42 aubio_hist_t * s = AUBIO_NEW(aubio_hist_t); 43 smpl_t step = ( ihig-ilow)/(smpl_t)(nelems);43 smpl_t step = (fhig-flow)/(smpl_t)(nelems); 44 44 smpl_t accum = step; 45 45 uint_t i; … … 48 48 s->cent = new_fvec(nelems); 49 49 50 /* use scale to map ilow/ihig -> 0/nelems */51 s->scaler = new_aubio_scale( ilow,ihig,0,nelems);50 /* use scale to map flow/fhig -> 0/nelems */ 51 s->scaler = new_aubio_scale(flow,fhig,0,nelems); 52 52 /* calculate centers now once */ 53 s->cent->data[0] = ilow + 0.5 * step;53 s->cent->data[0] = flow + 0.5 * step; 54 54 for (i=1; i < s->nelems; i++, accum+=step ) 55 55 s->cent->data[i] = s->cent->data[0] + accum; -
src/utils/hist.h
rfd46d1e r32082e5 37 37 38 38 /** histogram creation 39 * \param flow minimum input 40 * \param fhig maximum input 41 * \param nelems number of histogram columns 42 */ 39 40 \param flow minimum input 41 \param fhig maximum input 42 \param nelems number of histogram columns 43 44 */ 43 45 aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems); 44 46 /** histogram deletion */
Note: See TracChangeset
for help on using the changeset viewer.