synthesizer-core-0.8.1: Audio signal processing coded in Haskell: Low level part

Copyright (c) Henning Thielemann 2008 GPL synthesizer@henning-thielemann.de provisional requires multi-parameter type classes None Haskell2010

Synthesizer.Plain.Filter.Recursive.SecondOrder

Description

All recursive filters with real coefficients can be decomposed into first order and second order filters with real coefficients. This follows from the Fundamental theorem of algebra.

Synopsis

Documentation

data Parameter a Source #

Parameters for a general recursive filter of 2nd order.

Constructors

 Parameter Fieldsc0, c1, c2, d1, d2 :: !a

Instances

 Source # Methodsfmap :: (a -> b) -> Parameter a -> Parameter b #(<) :: a -> Parameter b -> Parameter a # Source # Methodspure :: a -> Parameter a #(<*>) :: Parameter (a -> b) -> Parameter a -> Parameter b #(*>) :: Parameter a -> Parameter b -> Parameter b #(<*) :: Parameter a -> Parameter b -> Parameter a # Source # Methodsfold :: Monoid m => Parameter m -> m #foldMap :: Monoid m => (a -> m) -> Parameter a -> m #foldr :: (a -> b -> b) -> b -> Parameter a -> b #foldr' :: (a -> b -> b) -> b -> Parameter a -> b #foldl :: (b -> a -> b) -> b -> Parameter a -> b #foldl' :: (b -> a -> b) -> b -> Parameter a -> b #foldr1 :: (a -> a -> a) -> Parameter a -> a #foldl1 :: (a -> a -> a) -> Parameter a -> a #toList :: Parameter a -> [a] #null :: Parameter a -> Bool #length :: Parameter a -> Int #elem :: Eq a => a -> Parameter a -> Bool #maximum :: Ord a => Parameter a -> a #minimum :: Ord a => Parameter a -> a #sum :: Num a => Parameter a -> a #product :: Num a => Parameter a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Parameter a -> f (Parameter b) #sequenceA :: Applicative f => Parameter (f a) -> f (Parameter a) #mapM :: Monad m => (a -> m b) -> Parameter a -> m (Parameter b) #sequence :: Monad m => Parameter (m a) -> m (Parameter a) # C a v => C a (Parameter v) Source # MethodsscaleAndAccumulate :: (a, Parameter v) -> (Parameter v, Parameter v -> Parameter v) Source # Show a => Show (Parameter a) Source # MethodsshowsPrec :: Int -> Parameter a -> ShowS #show :: Parameter a -> String #showList :: [Parameter a] -> ShowS # Storable a => Storable (Parameter a) Source # MethodssizeOf :: Parameter a -> Int #alignment :: Parameter a -> Int #peekElemOff :: Ptr (Parameter a) -> Int -> IO (Parameter a) #pokeElemOff :: Ptr (Parameter a) -> Int -> Parameter a -> IO () #peekByteOff :: Ptr b -> Int -> IO (Parameter a) #pokeByteOff :: Ptr b -> Int -> Parameter a -> IO () #peek :: Ptr (Parameter a) -> IO (Parameter a) #poke :: Ptr (Parameter a) -> Parameter a -> IO () # data State a Source # Constructors  State Fieldsu1, u2, y1, y2 :: !a Instances  Source # Methodsfmap :: (a -> b) -> State a -> State b #(<) :: a -> State b -> State a # Source # Methodspure :: a -> State a #(<*>) :: State (a -> b) -> State a -> State b #(*>) :: State a -> State b -> State b #(<*) :: State a -> State b -> State a # Source # Methodsfold :: Monoid m => State m -> m #foldMap :: Monoid m => (a -> m) -> State a -> m #foldr :: (a -> b -> b) -> b -> State a -> b #foldr' :: (a -> b -> b) -> b -> State a -> b #foldl :: (b -> a -> b) -> b -> State a -> b #foldl' :: (b -> a -> b) -> b -> State a -> b #foldr1 :: (a -> a -> a) -> State a -> a #foldl1 :: (a -> a -> a) -> State a -> a #toList :: State a -> [a] #null :: State a -> Bool #length :: State a -> Int #elem :: Eq a => a -> State a -> Bool #maximum :: Ord a => State a -> a #minimum :: Ord a => State a -> a #sum :: Num a => State a -> a #product :: Num a => State a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> State a -> f (State b) #sequenceA :: Applicative f => State (f a) -> f (State a) #mapM :: Monad m => (a -> m b) -> State a -> m (State b) #sequence :: Monad m => State (m a) -> m (State a) # Show a => Show (State a) Source # MethodsshowsPrec :: Int -> State a -> ShowS #show :: State a -> String #showList :: [State a] -> ShowS # Storable a => Storable (State a) Source # MethodssizeOf :: State a -> Int #alignment :: State a -> Int #peekElemOff :: Ptr (State a) -> Int -> IO (State a) #pokeElemOff :: Ptr (State a) -> Int -> State a -> IO () #peekByteOff :: Ptr b -> Int -> IO (State a) #pokeByteOff :: Ptr b -> Int -> State a -> IO () #peek :: Ptr (State a) -> IO (State a) #poke :: Ptr (State a) -> State a -> IO () #

adjustPassband :: C a => Passband -> (a -> Parameter a) -> a -> Parameter a Source #

Given a function which computes the filter parameters of a lowpass filter for a given frequency, turn that into a function which generates highpass parameters, if requested filter type is Highpass.

amplify :: C a => a -> Parameter a -> Parameter a Source #

Change filter parameter such that result is amplified by a given factor.

causal :: (C a, C a v) => T (Parameter a, v) v Source #

modifier :: (C a, C a v) => Simple (State v) (Parameter a) v v Source #

modifierInit :: (C a, C a v) => Initialized (State v) (State v) (Parameter a) v v Source #

run :: (C a, C a v) => T (Parameter a) -> T v -> T v Source #

runInit :: (C a, C a v) => State v -> T (Parameter a) -> T v -> T v Source #

step :: (C a, C a v) => Parameter a -> v -> State (State v) v Source #