Mercurial > hg > aimc
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 4:eb0449575bb9 | 5:3c782dec2fc0 |
|---|---|
| 15 // | 15 // |
| 16 // You should have received a copy of the GNU General Public License | 16 // You should have received a copy of the GNU General Public License |
| 17 // along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 // along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | 18 |
| 19 /*! \file | 19 /*! \file |
| 20 * \brief | 20 * \brief ERB calculations |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 /*! \author: Thomas Walters <tom@acousticscale.org> | 23 /*! \author: Thomas Walters <tom@acousticscale.org> |
| 24 * \date 2010/01/23 | 24 * \date 2010/01/23 |
| 25 * \version \$Id: ERBTools.h 1 2010-02-02 11:04:50Z tcw $ | 25 * \version \$Id: ERBTools.h 1 2010-02-02 11:04:50Z tcw $ |
| 38 } | 38 } |
| 39 | 39 |
| 40 static float Freq2ERBw(float freq) { | 40 static float Freq2ERBw(float freq) { |
| 41 return 24.7f * (4.37f * freq / 1000.0f + 1.0f); | 41 return 24.7f * (4.37f * freq / 1000.0f + 1.0f); |
| 42 } | 42 } |
| 43 | |
| 44 static float ERB2Freq(float erb) { | |
| 45 return (pow(10, (erb / 21.4f)) - 1.0f) / 4.37f * 1000.0f; | |
| 46 } | |
| 43 }; | 47 }; |
| 44 } | 48 } |
| 45 | 49 |
| 46 #endif // _AIMC_SUPPORT_ERBTOOLS_H_ | 50 #endif // _AIMC_SUPPORT_ERBTOOLS_H_ |
