Safe Haskell | None |
---|

- class Applicative signal => C signal where
- simple :: C state => (forall r c. state -> T r c (a, state)) -> (forall r. CodeGenFunction r state) -> signal a

- data T a
- amplify :: (C signal, IsArithmetic a, IsConst a) => a -> signal (Value a) -> signal (Value a)
- amplifyStereo :: (C signal, IsArithmetic a, IsConst a) => a -> signal (T (Value a)) -> signal (T (Value a))
- constant :: (C signal, IsConst a) => a -> signal (Value a)
- envelope :: (C signal, PseudoRing a) => signal a -> signal a -> signal a
- envelopeStereo :: (C signal, PseudoRing a) => signal a -> signal (T a) -> signal (T a)
- exponential2 :: (C signal, C a, IsArithmetic a, FirstClass a, Stored a ~ am, IsSized am, IsConst a) => a -> a -> signal (Value a)
- iterate :: (C signal, FirstClass a, Stored a ~ am, IsSized am, IsConst a) => (forall r. Value a -> CodeGenFunction r (Value a)) -> Value a -> signal (Value a)
- map :: C signal => (forall r. a -> CodeGenFunction r b) -> signal a -> signal b
- mapAccum :: (C signal, C s) => (forall r. a -> s -> CodeGenFunction r (b, s)) -> (forall r. CodeGenFunction r s) -> signal a -> signal b
- mix :: (C signal, Additive a) => signal a -> signal a -> signal a
- mixExt :: (C signal, Monoid (signal (Value Bool, a)), Additive a, Phi a, Undefined a) => signal a -> signal a -> signal a
- takeWhile :: C signal => (forall r. a -> CodeGenFunction r (Value Bool)) -> signal a -> signal a
- empty :: C signal => signal a
- append :: (Phi a, Undefined a) => T a -> T a -> T a
- osci :: (C signal, FirstClass t, Stored t ~ tm, IsSized tm, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> t -> t -> signal y
- osciPlain :: (C signal, FirstClass t, Stored t ~ tm, IsSized tm, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> Value t -> Value t -> signal y
- osciSaw :: (C signal, IntegerConstant a, FirstClass a, Stored a ~ am, IsSized am, Fraction a, IsConst a) => a -> a -> signal (Value a)
- zip :: T a -> T b -> T (a, b)
- zipWith :: C signal => (forall r. a -> b -> CodeGenFunction r c) -> signal a -> signal b -> signal c
- fromStorableVector :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => Vector a -> T value
- fromStorableVectorLazy :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => Vector a -> T value
- render :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => T value -> Int -> Vector a
- renderChunky :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => ChunkSize -> T value -> Vector a
- runChunky :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => T value -> ChunkSize -> IO (Vector a)

# Documentation

class Applicative signal => C signal whereSource

simple :: C state => (forall r c. state -> T r c (a, state)) -> (forall r. CodeGenFunction r state) -> signal aSource

Functor T | |

Applicative T | ZipList semantics |

C T | |

(Field a, Real a, RationalConstant a) => Fractional (T a) | |

(PseudoRing a, Real a, IntegerConstant a) => Num (T a) | |

(Phi a, Undefined a) => Monoid (T a) | |

(Field a, RationalConstant a) => C (T a) | |

(PseudoRing a, IntegerConstant a) => C (T a) | |

Additive a => C (T a) | |

(Phi a, Undefined a) => Semigroup (T a) |

amplifyStereo :: (C signal, IsArithmetic a, IsConst a) => a -> signal (T (Value a)) -> signal (T (Value a))Source

envelope :: (C signal, PseudoRing a) => signal a -> signal a -> signal aSource

envelopeStereo :: (C signal, PseudoRing a) => signal a -> signal (T a) -> signal (T a)Source

exponential2 :: (C signal, C a, IsArithmetic a, FirstClass a, Stored a ~ am, IsSized am, IsConst a) => a -> a -> signal (Value a)Source

iterate :: (C signal, FirstClass a, Stored a ~ am, IsSized am, IsConst a) => (forall r. Value a -> CodeGenFunction r (Value a)) -> Value a -> signal (Value a)Source

map :: C signal => (forall r. a -> CodeGenFunction r b) -> signal a -> signal bSource

mapAccum :: (C signal, C s) => (forall r. a -> s -> CodeGenFunction r (b, s)) -> (forall r. CodeGenFunction r s) -> signal a -> signal bSource

mix :: (C signal, Additive a) => signal a -> signal a -> signal aSource

Warning:
This shortens the result to the shorter input signal.
This is consistent with `Causal.mix`

but it may not be what you expect.
Consider using `mixExt`

instead.

mixExt :: (C signal, Monoid (signal (Value Bool, a)), Additive a, Phi a, Undefined a) => signal a -> signal a -> signal aSource

The result of mixing is as long as the longer of the two input signals.

takeWhile :: C signal => (forall r. a -> CodeGenFunction r (Value Bool)) -> signal a -> signal aSource

append :: (Phi a, Undefined a) => T a -> T a -> T aSource

Appending many signals is inefficient, since in cascadingly appended signals the parts are counted in an unary way. Concatenating infinitely many signals is impossible. If you want to concatenate a lot of signals, please render them to lazy storable vectors first.

osci :: (C signal, FirstClass t, Stored t ~ tm, IsSized tm, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> t -> t -> signal ySource

osciPlain :: (C signal, FirstClass t, Stored t ~ tm, IsSized tm, Fraction t, IsConst t) => (forall r. Value t -> CodeGenFunction r y) -> Value t -> Value t -> signal ySource

osciSaw :: (C signal, IntegerConstant a, FirstClass a, Stored a ~ am, IsSized am, Fraction a, IsConst a) => a -> a -> signal (Value a)Source

zipWith :: C signal => (forall r. a -> b -> CodeGenFunction r c) -> signal a -> signal b -> signal cSource

fromStorableVector :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => Vector a -> T valueSource

fromStorableVectorLazy :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => Vector a -> T valueSource

render :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => T value -> Int -> Vector aSource

renderChunky :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => ChunkSize -> T value -> Vector aSource

runChunky :: (Storable a, MakeValueTuple a, ValueTuple a ~ value, C value) => T value -> ChunkSize -> IO (Vector a)Source