shithub: aubio

Download patch

ref: 517630f6f122aac260f62be1e6294549ae3a805a
parent: c853c1d12ff8aca51206f869d6711890cf010f55
author: Paul Brossier <piem@piem.org>
date: Sat Nov 17 09:55:09 EST 2018

[mfcc] add set_mel_coeffs and power

--- a/src/spectral/mfcc.c
+++ b/src/spectral/mfcc.c
@@ -150,3 +150,27 @@
 
   return;
 }
+
+uint_t aubio_mfcc_set_power (aubio_mfcc_t *mf, smpl_t power)
+{
+  return aubio_filterbank_set_power(mf->fb, power);
+}
+
+uint_t aubio_mfcc_get_power (aubio_mfcc_t *mf)
+{
+  return aubio_filterbank_get_power(mf->fb);
+}
+
+uint_t aubio_mfcc_set_mel_coeffs (aubio_mfcc_t *mf, smpl_t freq_min,
+    smpl_t freq_max)
+{
+  return aubio_filterbank_set_mel_coeffs(mf->fb, mf->samplerate,
+      freq_min, freq_max);
+}
+
+uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf, smpl_t freq_min,
+    smpl_t freq_max)
+{
+  return aubio_filterbank_set_mel_coeffs_htk(mf->fb, mf->samplerate,
+      freq_min, freq_max);
+}
--- a/src/spectral/mfcc.h
+++ b/src/spectral/mfcc.h
@@ -73,6 +73,15 @@
 */
 void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
 
+uint_t aubio_mfcc_set_power (aubio_mfcc_t *mf, smpl_t power);
+uint_t aubio_mfcc_get_power (aubio_mfcc_t *mf);
+
+uint_t aubio_mfcc_set_mel_coeffs (aubio_mfcc_t *mf, smpl_t freq_min,
+    smpl_t freq_max);
+uint_t aubio_mfcc_set_mel_coeffs_htk (aubio_mfcc_t *mf, smpl_t freq_min,
+    smpl_t freq_max);
+uint_t aubio_mfcc_set_mel_coeffs_slaney (aubio_mfcc_t *mf);
+
 #ifdef __cplusplus
 }
 #endif