shithub: aubio

Download patch

ref: fa0ef3b8148db015592182b899d44f5071464cbf
parent: b6690669a892969ec99a67d3dac4070b08c73262
author: Paul Brossier <piem@piem.org>
date: Sun Mar 26 12:21:48 EDT 2017

src/spectral/awhitening.h: add _set_floor/_get_floor, improve documentation

--- a/src/spectral/awhitening.c
+++ b/src/spectral/awhitening.c
@@ -93,6 +93,18 @@
   return o->relax_time;
 }
 
+uint_t
+aubio_spectral_whitening_set_floor (aubio_spectral_whitening_t *o, smpl_t floor)
+{
+  o->floor = floor;
+  return AUBIO_OK;
+}
+
+smpl_t aubio_spectral_whitening_get_floor (aubio_spectral_whitening_t *o)
+{
+  return o->floor;
+}
+
 void
 aubio_spectral_whitening_reset (aubio_spectral_whitening_t * o)
 {
--- a/src/spectral/awhitening.h
+++ b/src/spectral/awhitening.h
@@ -80,7 +80,7 @@
 /** set relaxation time for spectral whitening
 
   \param o spectral whitening object as returned by new_aubio_spectral_whitening()
-  \param relax_time relaxation time in seconds
+  \param relax_time relaxation time in seconds between 20 and 500, defaults 250
 
   */
 uint_t aubio_spectral_whitening_set_relax_time (aubio_spectral_whitening_t * o,
@@ -93,6 +93,23 @@
 
 */
 smpl_t aubio_spectral_whitening_get_relax_time (aubio_spectral_whitening_t * o);
+
+/** set floor for spectral whitening
+
+  \param o spectral whitening object as returned by new_aubio_spectral_whitening()
+  \param floor value (typically between 1.e-6 and .2, defaults to 1.e-4)
+
+  */
+uint_t aubio_spectral_whitening_set_floor (aubio_spectral_whitening_t * o,
+    smpl_t floor);
+
+/** get floor of spectral whitening
+
+  \param o spectral whitening object as returned by new_aubio_spectral_whitening()
+  \return floor value
+
+*/
+smpl_t aubio_spectral_whitening_get_floor (aubio_spectral_whitening_t * o);
 
 /** deletion of a spectral whitening