Changeset 10fafc2 for src


Ignore:
Timestamp:
Nov 17, 2018, 2:55:41 PM (6 years ago)
Author:
Paul Brossier <piem@piem.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
Children:
d8eedfa
Parents:
517630f
Message:

[mfcc] add slaney (default) and documentation

Location:
src/spectral
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/mfcc.c

    r517630f r10fafc2  
    175175      freq_min, freq_max);
    176176}
     177
     178uint_t aubio_mfcc_set_mel_coeffs_slaney (aubio_mfcc_t *mf, smpl_t freq_min,
     179    smpl_t freq_max)
     180{
     181  return aubio_filterbank_set_mel_coeffs_slaney (mf->fb, mf->samplerate);
     182}
  • src/spectral/mfcc.h

    r517630f r10fafc2  
    7474void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
    7575
     76/** set power parameter
     77
     78  \param mf mfcc object, as returned by new_aubio_mfcc()
     79  \param power Raise norm of the input spectrum norm to this power before
     80  computing filterbank.  Defaults to `1`.
     81
     82  See aubio_filterbank_set_power().
     83
     84 */
    7685uint_t aubio_mfcc_set_power (aubio_mfcc_t *mf, smpl_t power);
     86
     87/** get power parameter
     88
     89  \param mf mfcc object, as returned by new_aubio_mfcc()
     90  \return current power parameter. Defaults to `1`.
     91
     92  See aubio_filterbank_get_power().
     93
     94 */
    7795uint_t aubio_mfcc_get_power (aubio_mfcc_t *mf);
    7896
    79 uint_t aubio_mfcc_set_mel_coeffs (aubio_mfcc_t *mf, smpl_t freq_min,
    80     smpl_t freq_max);
    81 uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf, smpl_t freq_min,
    82     smpl_t freq_max);
    83 uint_t aubio_mfcc_set_mel_coeffs_slaney (aubio_mfcc_t *mf);
     97uint_t aubio_mfcc_set_scale (aubio_mfcc_t *mf, smpl_t scale);
     98uint_t aubio_mfcc_get_scale (aubio_mfcc_t *mf);
     99
     100/** Mel filterbank initialization
     101
     102  \param mf mfcc object
     103  \param fmin start frequency, in Hz
     104  \param fmax end frequency, in Hz
     105
     106  The filterbank will be initialized with bands linearly spaced in the mel
     107  scale, from `fmin` to `fmax`.
     108
     109  See also
     110  --------
     111
     112  aubio_filterbank_set_mel_coeffs()
     113
     114*/
     115uint_t aubio_mfcc_set_mel_coeffs (aubio_mfcc_t *mf,
     116        smpl_t fmin, smpl_t fmax);
     117
     118/** Mel filterbank initialization
     119
     120  \param mf mfcc object
     121  \param fmin start frequency, in Hz
     122  \param fmax end frequency, in Hz
     123
     124  The bank of filters will be initalized to to cover linearly spaced bands in
     125  the Htk mel scale, from `fmin` to `fmax`.
     126
     127  See also
     128  --------
     129
     130  aubio_filterbank_set_mel_coeffs_htk()
     131
     132*/
     133uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf,
     134        smpl_t fmin, smpl_t fmax);
     135
     136/** Mel filterbank initialization (Auditory Toolbox's parameters)
     137
     138  \param mf mfcc object
     139  \param samplerate audio sampling rate, in Hz
     140
     141  The filter coefficients are built to match exactly Malcolm Slaney's Auditory
     142  Toolbox implementation. The number of filters should be 40.
     143
     144  This is the default filterbank when `mf` was created with `n_filters = 40`.
     145
     146  See also
     147  --------
     148
     149  aubio_filterbank_set_mel_coeffs_slaney()
     150
     151*/
     152uint_t aubio_mfcc_set_mel_coeffs_slaney (aubio_mfcc_t *mf, smpl_t samplerate);
    84153
    85154#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.