Changeset f2adb86


Ignore:
Timestamp:
Dec 22, 2005, 5:30:24 PM (19 years ago)
Author:
Paul Brossier <piem@altern.org>
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:
de92b1c
Parents:
4f4a8a4
Message:

add _getval method to explicitely get the peak picked value
add _getval method to explicitely get the peak picked value

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/peakpick.c

    r4f4a8a4 rf2adb86  
    113113}
    114114
     115/** this method returns the current value in the pick peaking buffer
     116 * after smoothing
     117 */
     118smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t * p)
     119{
     120        uint_t i = 0;
     121        return p->onset_peek->data[i][1];
     122}
     123
    115124/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
    116125uint_t aubio_peakpick_pimrt_wt(fvec_t * onset,  aubio_pickpeak_t * p, smpl_t* peakval)
    117126{
    118         uint_t i = 0, isonset = 0;
     127        uint_t isonset = 0;
    119128        isonset = aubio_peakpick_pimrt(onset,p);
    120129
    121130        //if ( isonset && peakval != NULL )
    122131        if ( peakval != NULL )
    123                 *peakval = p->onset_peek->data[i][1];
     132                *peakval = aubio_peakpick_pimrt_getval(p);
    124133
    125134        return isonset;
  • src/peakpick.h

    r4f4a8a4 rf2adb86  
    3939/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
    4040uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval );
     41smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t * p);
    4142void del_aubio_peakpicker(aubio_pickpeak_t * p);
    4243
Note: See TracChangeset for help on using the changeset viewer.