Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data T filter t a v
- data Sockets s = Sockets {
- output :: s
- socket :: SocketSpec s
- data SocketSpec 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
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.
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 |
This is the data structure is used for the results
of apply
and transferFunction
.
Each constructor corresponds to one of T
.
By choosing only some of the outputs
the lazy evaluation will content
with applying the necessary filter steps, only.
Sockets | |
|
data SocketSpec s Source #
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 a Source #
Make the results from tfRelative
absolute.