Safe Haskell | None |
---|
- saw :: (PseudoRing a, IntegerConstant a) => a -> CodeGenFunction r a
- square :: (PseudoRing a, IntegerConstant a, Fraction a) => a -> CodeGenFunction r a
- triangle :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r a
- approxSine2 :: (PseudoRing a, IntegerConstant a, Fraction a) => a -> CodeGenFunction r a
- approxSine3 :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r a
- approxSine4 :: (PseudoRing a, RationalConstant a, Real a) => a -> CodeGenFunction r a
- rationalApproxCosine1 :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r a
- rationalApproxSine1 :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r a
- trapezoidSkew :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r a
- sine :: (Transcendental a, RationalConstant a) => a -> CodeGenFunction r a
- replicate :: (PseudoRing a, RationalConstant a, Fraction a) => a -> a -> CodeGenFunction r a
- halfEnvelope :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r a
- partial :: (Fraction v, PseudoRing v, IntegerConstant v) => (v -> CodeGenFunction r v) -> Int -> v -> CodeGenFunction r v
Documentation
saw :: (PseudoRing a, IntegerConstant a) => a -> CodeGenFunction r aSource
square :: (PseudoRing a, IntegerConstant a, Fraction a) => a -> CodeGenFunction r aSource
triangle :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r aSource
approxSine2 :: (PseudoRing a, IntegerConstant a, Fraction a) => a -> CodeGenFunction r aSource
approxSine3 :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r aSource
approxSine4 :: (PseudoRing a, RationalConstant a, Real a) => a -> CodeGenFunction r aSource
rationalApproxCosine1 :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r aSource
For the distortion factor recip pi
you get the closest approximation
to an undistorted cosine or sine.
We have chosen this scaling in order to stay with field operations.
rationalApproxSine1 :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r aSource
For the distortion factor recip pi
you get the closest approximation
to an undistorted cosine or sine.
We have chosen this scaling in order to stay with field operations.
trapezoidSkew :: (Field a, RationalConstant a, Real a) => a -> a -> CodeGenFunction r aSource
sine :: (Transcendental a, RationalConstant a) => a -> CodeGenFunction r aSource
replicate :: (PseudoRing a, RationalConstant a, Fraction a) => a -> a -> CodeGenFunction r aSource
This can be used for preprocessing the phase in order to generate locally faster oscillating waves. For example
triangle <=< replicate (valueOf 2.5)
shrinks a triangle wave such that 2.5 periods fit into one.
halfEnvelope :: (PseudoRing a, RationalConstant a, Fraction a) => a -> CodeGenFunction r aSource
Preprocess the phase such that the first half of a wave is expanded to one period and shifted by 90 degree. E.g.
sine <=< halfEnvelope
generates a sequence of sine bows that starts and ends with the maximum.
Such a signal can be used to envelope an oscillation
generated using replicate
.
partial :: (Fraction v, PseudoRing v, IntegerConstant v) => (v -> CodeGenFunction r v) -> Int -> v -> CodeGenFunction r vSource