hmt-0.20: Haskell Music Theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Pitch.Bark

Description

Zwicker, E. (1961) "Subdivision of the audible frequency range into critical bands" The Journal of the Acoustical Society of America, Volume 33, Issue 2, p. 248 (1961)

https://ccrma.stanford.edu/courses/120-fall-2003/lecture-5.html

Synopsis

TABLES

bark_center :: Num n => [n] Source #

Center freqencies of Bark scale critical bands (hz).

bark_edge :: Num n => [n] Source #

Edge freqencies of Bark scale critical bands (hz).

bark_bandwidth :: Num n => [n] Source #

Bandwidths of Bark scale critical bands (hz).

FUNCTIONS

cps_to_bark_zwicker :: Floating a => a -> a Source #

Zwicker & Terhardt (1980)

map (round . cps_to_bark_zwicker) bark_centre == concat [[0..7],[9..15],[15..19],[21..24]]
let f = [0,100 .. 8000] in Sound.SC3.Plot.plot_p2_ln [zip f (map cps_to_bark_zwicker f)]

cps_to_bark_traunmuller :: (Fractional n, Ord n) => n -> n Source #

Traunmüller, Hartmut. "Analytical Expressions for the Tonotopic Sensory Scale." Journal of the Acoustical Society of America. Vol. 88, Issue 1, 1990, pp. 97-100.

r = concat [[0,1],[3,4],[4],[6..9],[9,10],[12],[12..17],[19,20],[20..23]]
map (round . cps_to_bark_traunmuller) bark_centre == r
let f = [0,100 .. 8000] in Sound.SC3.Plot.plot_p2_ln [zip f (map cps_to_bark_traunmuller f)]

bark_to_cps_traunmuller :: (Fractional n, Ord n) => n -> n Source #

Traunmüller (1990)

Sound.SC3.Plot.plot_p2_ln [zip (map bark_to_cps_traunmuller [0..23]) [0..23]]

cps_to_bark_wsg :: Floating a => a -> a Source #

Wang, Sekey & Gersho (1992)

map (round . cps_to_bark_wsg) bark_centre == concat [[0..9],[9..21],[23]]
let f = [0,100 .. 8000] in Sound.SC3.Plot.plot_p2_ln [zip f (map cps_to_bark_wsg f)]

bark_to_cps_wsg :: Floating a => a -> a Source #

Wang, Sekey & Gersho (1992)

r = [100,204,313,430,560,705,870,1059,1278,1532,1828,2176,2584,3065,3630,4297,5083,6011,7106,8399]
map (round . bark_to_cps_wsg) [1 .. 20] == r
Sound.SC3.Plot.plot_p2_ln [zip (map bark_to_cps_wsg [0..23]) [0..23]]