# Changeset 5b41ef9

Ignore:
Timestamp:
Nov 17, 2013, 6:23:34 PM (6 years ago)
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
af3cfb3
Parents:
c1ddeb8
Message:

src/mathutils.h: move fvec_local_energy to aubio_level_lin, move to musicutils.h

Files:
5 edited

Unmodified
Removed
• ## examples/aubiopitch.c

 rc1ddeb8 aubio_pitch_do (o, ibuf, pitch); smpl_t freq = fvec_read_sample(pitch, 0); smpl_t amp = powf(10., aubio_db_spl(ibuf)*.05 ); aubio_wavetable_set_amp ( wavetable, amp ); aubio_wavetable_set_amp ( wavetable, aubio_level_lin (ibuf) ); if (freq != 0.0) { aubio_wavetable_set_freq ( wavetable, freq );
• ## src/mathutils.c

 rc1ddeb8 smpl_t fvec_local_energy (fvec_t * f) aubio_level_lin (fvec_t * f) { smpl_t energy = 0.; aubio_db_spl (fvec_t * o) { return 10. * LOG10 (fvec_local_energy (o)); return 10. * LOG10 (aubio_level_lin (o)); }
• ## src/mathutils.h

 rc1ddeb8 */ smpl_t fvec_sum (fvec_t * v); /** compute the energy of a vector This function compute the sum of the squared elements of a vector, normalised by its length. \param v vector to get the energy from \return the energy of v */ smpl_t fvec_local_energy (fvec_t * v); /** compute the High Frequency Content of a vector
• ## src/musicutils.h

 rc1ddeb8 smpl_t aubio_zero_crossing_rate (fvec_t * v); /** compute sound level on a linear This gives the average of the square amplitudes. \param v vector to compute dB SPL from \return level of v */ smpl_t aubio_level_lin (fvec_t * v); /** compute sound pressure level (SPL) in dB This quantity is often wrongly called 'loudness'. This gives ten times the log10 of the average of the square amplitudes. \param v vector to compute dB SPL from
• ## src/pitch/pitchmcomb.c

 rc1ddeb8 newmag->data[j] = fftgrain->norm[j]; /* detect only if local energy > 10. */ //if (fvec_local_energy(newmag) * newmag->length > 10.) { //if (aubio_level_lin (newmag) * newmag->length > 10.) { //hfc = fvec_local_hfc(newmag); //not used aubio_pitchmcomb_spectral_pp (p, newmag); newmag->data[j] = fftgrain->norm[j]; /* detect only if local energy > 10. */ if (fvec_local_energy (newmag) * newmag->length > 10.) { if (aubio_level_lin (newmag) * newmag->length > 10.) { /* hfc = fvec_local_hfc(newmag); do not use */ aubio_pitchmcomb_spectral_pp (p, newmag);
Note: See TracChangeset for help on using the changeset viewer.