diff src/Support/ERBTools.h @ 5:3c782dec2fc0

- Ported over HTK file output - Added some more meat to the Slaney IIR gammatone implementation - Ported over the AIM-MAT sf2003 parabola strobe algorithm - Finished making the SAI implementation compile - Ported over the strobe list class (now uses STL deques internally)
author tomwalters
date Thu, 18 Feb 2010 16:55:40 +0000
parents 582cbe817f2c
children bd370910aa05
line wrap: on
line diff
--- a/src/Support/ERBTools.h	Tue Feb 16 18:40:55 2010 +0000
+++ b/src/Support/ERBTools.h	Thu Feb 18 16:55:40 2010 +0000
@@ -17,7 +17,7 @@
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /*! \file
- *  \brief
+ *  \brief ERB calculations
  */
 
 /*! \author: Thomas Walters <tom@acousticscale.org>
@@ -40,6 +40,10 @@
   static float Freq2ERBw(float freq) {
     return 24.7f * (4.37f * freq / 1000.0f + 1.0f);
   }
+
+  static float ERB2Freq(float erb) {
+    return (pow(10, (erb / 21.4f)) - 1.0f) / 4.37f * 1000.0f;
+  }
 };
 }