Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Perceptual loudness functions.
- a_weighting_R :: Floating a => a -> a
- a_weighting :: Floating a => a -> a
- b_weighting_R :: Floating a => a -> a
- b_weighting :: Floating a => a -> a
- c_weighting_R :: Floating a => a -> a
- c_weighting :: Floating a => a -> a
- d_h_function :: Fractional a => a -> a
- d_weighting_R :: Floating a => a -> a
- d_weighting :: Floating a => a -> a
A Weighting
a_weighting_R :: Floating a => a -> a Source
A-weighting curve multiplier function, ie. for linear magnitude -- value. See http://en.wikipedia.org/wiki/A-weighting
import Sound.SC3.Plot
let {f w = map w [20::Double,50 .. 20000] ;r = [a_weighting_R,b_weighting_R,c_weighting_R,d_weighting_R]} in plotTable (map f r)
let {f w = zip (map log [1..]) (map w [25,50 .. 20000]) ;r = [a_weighting_R,b_weighting_R,c_weighting_R,d_weighting_R]} in plot_p2_ln (map f r)
a_weighting :: Floating a => a -> a Source
A-weighting curve Db offset (additive) function, ie. for un-weighted Db readings.
plotTable1 (map a_weighting [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map a_weighting [25,50 .. 20000])]
B Weighting
b_weighting_R :: Floating a => a -> a Source
B-weighting curve multiplier function, ie. for linear magnitude value. See http://en.wikipedia.org/wiki/A-weighting
import Sound.SC3.Plot plotTable1 (map b_weighting_R [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map b_weighting_R [25,50 .. 20000])]
b_weighting :: Floating a => a -> a Source
B-weighting curve Db offset (additive) function, ie. for un-weighted Db readings.
plotTable1 (map b_weighting [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map b_weighting [25,50 .. 20000])]
C Weighting
c_weighting_R :: Floating a => a -> a Source
C-weighting curve multiplier function, ie. for linear magnitude value. See http://en.wikipedia.org/wiki/A-weighting
import Sound.SC3.Plot plotTable1 (map c_weighting_R [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map c_weighting_R [25,50 .. 20000])]
c_weighting :: Floating a => a -> a Source
C-weighting curve Db offset (additive) function, ie. for un-weighted Db readings.
plotTable1 (map c_weighting [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map c_weighting [25,50 .. 20000])]
D Weighting
d_h_function :: Fractional a => a -> a Source
h function for D weighting.
d_weighting_R :: Floating a => a -> a Source
D-weighting curve multiplier function, ie. for linear magnitude value. See http://en.wikipedia.org/wiki/A-weighting
import Sound.SC3.Plot plotTable1 (map d_weighting_R [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map d_weighting_R [25,50 .. 20000])]
d_weighting :: Floating a => a -> a Source
D-weighting curve Db offset (additive) function, ie. for un-weighted Db readings.
plotTable1 (map d_weighting [20,50 .. 20000]) plot_p2_ln [zip (map log [1..]) (map d_weighting [25,50 .. 20000])]