synthesizer-0.2.0.1: Audio signal processing coded in HaskellSource codeContentsIndex
Synthesizer.Filter.Composition
Synopsis
data T filter t a v
= Prim (filter t a v)
| Serial [T filter t a v]
| Parallel [T filter t a v]
| Feedback (T filter t a v) (T filter t a v)
data Sockets s = Sockets {
output :: s
socket :: SocketSpec s
}
data SocketSpec s
= Output
| Multiplier [Sockets s]
| Adder [Sockets s]
| Loop (Sockets s) (Sockets s)
applyMulti :: (C t, C t, C a v, C a (list v), Filter list filter) => T filter t a v -> list v -> Sockets (list v)
transferFunctionMulti :: (C t, C a t, Filter list filter) => T filter t a v -> t -> Sockets (T t)
tfRelative :: (C t, C a t, Filter list filter) => t -> T filter t a v -> Sockets (T t)
tfAbsolutize :: C a => a -> Sockets a -> Sockets a
Documentation
data T filter t a v Source
This describes a generic filter with one input and one main output that consists of non-recursive and recursive parts. If you use Feedback, make sure that at least one of the filters of a circle includes a delay, otherwise the recursion will fail. The main output is used to glue different parts together. Additionally the functions apply and transferFunction provide the signals at every node of the network.
Constructors
Prim (filter t a v)a filter primitve
Serial [T filter t a v]serial chain of filters
Parallel [T filter t a v]filters working parallel, there output is mixed together
Feedback (T filter t a v) (T filter t a v)filter the signal in the forward direction and feed back the output signal filtered by the second filter
show/hide Instances
Filter list filter => Filter list (T filter)
data Sockets s Source
This is the data structure is used for the results of apply and transferFunction. Each constructor corresponds to one of Filter.Composition.T. By choosing only some of the outputs the lazy evaluation will content with applying the necessary filter steps, only.
Constructors
Sockets
output :: s
socket :: SocketSpec s
data SocketSpec s Source
Constructors
Output
Multiplier [Sockets s]
Adder [Sockets s]
Loop (Sockets s) (Sockets s)
applyMulti :: (C t, C t, C a v, C a (list v), Filter list filter) => T filter t a v -> list v -> Sockets (list v)Source
Apply a filter network to a signal and keep the output of all nodes. Generic function that is wrapped by apply.
transferFunctionMulti :: (C t, C a t, Filter list filter) => T filter t a v -> t -> Sockets (T t)Source
tfRelative :: (C t, C a t, Filter list filter) => t -> T filter t a v -> Sockets (T t)Source
Compute the transitivity for each part of the filter network. We must do this in such a relative manner to be able to compute feedback.
tfAbsolutize :: C a => a -> Sockets a -> Sockets aSource
Make the results from tfRelative absolute.
Produced by Haddock version 2.4.2