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

Safe HaskellSafe
LanguageHaskell2010

Synthesizer.ApplicativeUtility

Synopsis

Documentation

liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #

liftA5 :: Applicative f => (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g Source #

liftA6 :: Applicative f => (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h Source #

loop Source #

Arguments

:: Functor f 
=> f (a -> a)

process chain that shall be looped

-> f a 

Create a loop (feedback) from one node to another one. That is, compute the fix point of a process iteration.

($:) :: Applicative f => f (a -> b) -> f a -> f b infixl 0 Source #

This corresponds to <*>

($::) :: (Applicative f, Traversable t) => f (t a -> b) -> t (f a) -> f b infixl 0 Source #

Instead of mixMulti $:: map f xs the caller should write mixMulti $: mapM f xs in order to save the user from learning another infix operator.

(.:) :: (Applicative f, Arrow arrow) => f (arrow b c) -> f (arrow a b) -> f (arrow a c) infixr 9 Source #

($^) :: Functor f => (a -> b) -> f a -> f b infixl 0 Source #

(.^) :: (Functor f, Arrow arrow) => arrow b c -> f (arrow a b) -> f (arrow a c) infixr 9 Source #

($#) :: Functor f => f (a -> b) -> a -> f b infixl 0 Source #

liftP :: Applicative f => f (a -> b) -> f a -> f b Source #

Our signal processors have types like f (a -> b -> c). They could also have the type a -> b -> f c or f a -> f b -> f c. We did not choose the last variant for reduction of redundancy in type signatures and for simplifying sharing, and we did not choose the second variant for easy composition of processors. However the forms are freely convertible, and if you prefer the last one because you do not want to sprinkle '($:)' in your code, then you may want to convert the processors using the following functions, that can be defined purely in the Applicative class.

liftP2 :: Applicative f => f (a -> b -> c) -> f a -> f b -> f c Source #

liftP3 :: Applicative f => f (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

liftP4 :: Applicative f => f (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #