SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedefs | Enumerations | Functions | Variables
fscale.c File Reference

frequency transformations (perceptual) More...

Typedefs

typedef float(* SprSspFScaleCvt )(float freq)
 

Enumerations

enum  {
  SPR_FREQSCALE_MEL, SPR_FREQSCALE_BARK, SPR_FREQSCALE_ERB, SPR_FREQSCALE_PLP,
  SPR_FREQSCALE_MELDM, SPR_FREQSCALE_MELHTK, SPR_FREQSCALE_ERBGM, SPR_FREQSCALE_LINEAR,
  SPR_FREQSCALE_NFREQSCALE
}
 auditory frequency scales More...
 

Functions

float spr_fscale_melhtk2hz (float mel)
 
float spr_fscale_hz2melhtk (float hz)
 
float spr_fscale_meldm2hz (float mel)
 
float spr_fscale_hz2meldm (float hz)
 
float spr_fscale_mel2hz (float mel)
 Frequency scale conversion from Mel to Hz. More...
 
float spr_fscale_hz2mel (float hz)
 Frequency scale conversion from Hz to Mel. More...
 
float spr_fscale_barkplp2hz (float bark)
 Frequency scale conversion from Bark (PLP) to Hz. More...
 
float spr_fscale_hz2barkplp (float hz)
 Frequency scale conversion from Hz to Bark (PLP). More...
 
float spr_fscale_bark2hz (float bark)
 Frequency scale conversion from Bark to Hz. More...
 
float spr_fscale_hz2bark (float hz)
 Frequency scale conversion from Hz to Bark. More...
 
float spr_fscale_erb2hz (float erb)
 Frequency scale conversion from Erb to Hz. More...
 
float spr_fscale_hz2erb (float hz)
 Frequency scale conversion from Hz to Erb. More...
 
float spr_fscale_erbgm2hz (float erb)
 Frequency scale conversion from Erb (Glasberg & Moore) to Hz. More...
 
float spr_fscale_hz2erbgm (float hz)
 Frequency scale conversion from Hz to Erb (Glasberg & Moore). More...
 
float spr_fscale_lin2hz (float hz)
 Frequency scale conversion from Hz to Erb. More...
 
float spr_fscale_hz2lin (float hz)
 Frequency scale conversion from Hz to Erb. More...
 

Variables

const char *const spr_ssp_str_scaletype [SPR_FREQSCALE_NFREQSCALE+1]
 
SprSspFScaleCvt spr_ssp_fscale_to_hz []
 
SprSspFScaleCvt spr_ssp_fscale_from_hz []
 

Detailed Description

frequency transformations (perceptual)

This module contains different functions for frequency transformations from the linear frequency scale to a critical band number. The scales are close to linear below 1 kHz and close to logarithmic above. 6 different frequency-scales are implemented:

mel2hz(), hz2mel()
mel-scale
meldm2hz(), hz2meldm()
approximation of mel-scale from Davis & Mermelstein
bark2hz(), hz2bark()
bark-scale
barkplp2hz(), hz2barkplp()
plp-bark-scale from Schroeder (cf. plp)
erb2hz(), hz2erb()
erb-scale
erbgm2hz(), hz2erbgm()
erb-scale according to Glasberg and Moore
lin2hz(), hz2lin()
a linear scale

In addition, hz2spc and spc2hz convert Hz value in spectrum points and vice versa.

Date
7 Feb 1994
Author
Tom Claes
See Also
sspmod_filter_bank.c