truelevel 0.1.1 → 0.1.2
raw patch · 2 files changed
+10/−2 lines, 2 files
Files
- truelevel.cabal +1/−1
- truelevel.hs +9/−1
truelevel.cabal view
@@ -2,7 +2,7 @@ Build-Type: Simple Description: An audio file compressor / limiter. This program will adjust the dynamic range of a WAVE file.-Version: 0.1.1+Version: 0.1.2 License: BSD3 License-File: COPYING Copyright: Copyright (C) 2006-2008 Bart Massey
truelevel.hs view
@@ -35,7 +35,15 @@ --- Estimate peak amplitude using rms power rms :: [Double] -> Double-rms s = 2 * sqrt (2 * sum (map (\x -> x * x) s) / fromIntegral (length s))+rms s = 2 * sqrt (2 * avg (map (\x -> x * x) s))++--- Tile variant for peak amplitude+tile :: Int -> Int -> [a] -> [[a]]+tile _ _ [] = []+tile n o s =+ let cur = take n s+ rest = drop (n - o) s in+ cur : (tile n o rest) --- Estimate peak amplitude as twice highest absolute peak --- of low-pass