From 6b46a4ea94dbfab35368ce74ad774a9d545f698e Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 17 Nov 2018 12:21:39 +0100 Subject: [PATCH] [filterbank] add docs for norm and power --- src/spectral/filterbank.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/spectral/filterbank.h b/src/spectral/filterbank.h index 714ea9d2..876b14d3 100644 --- a/src/spectral/filterbank.h +++ b/src/spectral/filterbank.h @@ -83,12 +83,45 @@ fmat_t *aubio_filterbank_get_coeffs (const aubio_filterbank_t * f); */ uint_t aubio_filterbank_set_coeffs (aubio_filterbank_t * f, const fmat_t * filters); +/** set norm parameter + + \param f filterbank object, as returned by new_aubio_filterbank() + \param norm `1` to norm the filters, `0` otherwise. + + If set to `0`, the filters will not be normalized. If set to `1`, + each filter will be normalized to one. Defaults to `1`. + + This function should be called *before* setting the filters with one of + aubio_filterbank_set_triangle_bands(), aubio_filterbank_set_mel_coeffs(), + aubio_filterbank_set_mel_coeffs_htk(), or + aubio_filterbank_set_mel_coeffs_slaney(). + + */ uint_t aubio_filterbank_set_norm (aubio_filterbank_t *f, smpl_t norm); +/** get norm parameter + + \param f filterbank object, as returned by new_aubio_filterbank() + \returns `1` if norm is set, `0` otherwise. Defaults to `1`. + + */ smpl_t aubio_filterbank_get_norm (aubio_filterbank_t *f); +/** set power parameter + + \param f filterbank object, as returned by new_aubio_filterbank() + \param power Raise norm of the input spectrum norm to this power before + computing filterbank. Defaults to `1`. + + */ uint_t aubio_filterbank_set_power (aubio_filterbank_t *f, smpl_t power); +/** get power parameter + + \param f filterbank object, as returned by new_aubio_filterbank() + \return current power parameter. Defaults to `1`. + + */ smpl_t aubio_filterbank_get_power (aubio_filterbank_t *f); #ifdef __cplusplus -- 2.11.0