module Sound.Sc3.Common.Math.Noise where
import Sound.Sc3.Common.Math
cusp_f :: Floating t => t -> t -> t -> t
cusp_f :: forall t. Floating t => t -> t -> t -> t
cusp_f t
a t
b t
x = t
a forall a. Num a => a -> a -> a
- (t
b forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt (forall a. Num a => a -> a
abs t
x))
fbSine_f :: (Floating t, RealFrac t) => t -> t -> t -> t -> (t, t) -> (t, t)
fbSine_f :: forall t.
(Floating t, RealFrac t) =>
t -> t -> t -> t -> (t, t) -> (t, t)
fbSine_f t
im t
fb t
a t
c (t
x,t
y) = (forall a. Floating a => a -> a
sin ((t
im forall a. Num a => a -> a -> a
* t
y) forall a. Num a => a -> a -> a
+ (t
fb forall a. Num a => a -> a -> a
* t
x)),((t
a forall a. Num a => a -> a -> a
* t
y) forall a. Num a => a -> a -> a
+ t
c) forall n. RealFrac n => n -> n -> n
`sc3_mod` (t
2 forall a. Num a => a -> a -> a
* forall a. Floating a => a
pi))
henon_f :: Floating t => t -> t -> (t, t) -> (t, t)
henon_f :: forall t. Floating t => t -> t -> (t, t) -> (t, t)
henon_f t
a t
b (t
x1,t
x0) = (t
1 forall a. Num a => a -> a -> a
- (t
a forall a. Num a => a -> a -> a
* (t
x1 forall a. Floating a => a -> a -> a
** t
2)) forall a. Num a => a -> a -> a
+ (t
b forall a. Num a => a -> a -> a
* t
x0),t
x1)
latoocarfian_f :: Floating t => t -> t -> t -> t -> (t, t) -> (t, t)
latoocarfian_f :: forall t. Floating t => t -> t -> t -> t -> (t, t) -> (t, t)
latoocarfian_f t
a t
b t
c t
d (t
x,t
y) = (forall a. Floating a => a -> a
sin(t
b forall a. Num a => a -> a -> a
* t
y) forall a. Num a => a -> a -> a
+ (t
c forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin (t
b forall a. Num a => a -> a -> a
* t
x)),forall a. Floating a => a -> a
sin(t
a forall a. Num a => a -> a -> a
* t
x) forall a. Num a => a -> a -> a
+ (t
d forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin (t
a forall a. Num a => a -> a -> a
* t
y)))
linCong_f :: RealFrac t => t -> t -> t -> t -> t
linCong_f :: forall t. RealFrac t => t -> t -> t -> t -> t
linCong_f t
a t
c t
m t
x = (t
a forall a. Num a => a -> a -> a
* t
x forall a. Num a => a -> a -> a
+ t
c) forall n. RealFrac n => n -> n -> n
`sc3_mod` t
m
logistic_f :: Num t => t -> t -> t
logistic_f :: forall a. Num a => a -> a -> a
logistic_f t
a t
x = t
a forall a. Num a => a -> a -> a
* t
x forall a. Num a => a -> a -> a
* (t
1 forall a. Num a => a -> a -> a
- t
x)
lorenz_f :: Num t => t -> t -> t -> (t, t, t) -> (t, t, t)
lorenz_f :: forall t. Num t => t -> t -> t -> (t, t, t) -> (t, t, t)
lorenz_f t
s t
r t
b (t
x,t
y,t
z) = (t
s forall a. Num a => a -> a -> a
* (t
y forall a. Num a => a -> a -> a
- t
x),t
x forall a. Num a => a -> a -> a
* (t
r forall a. Num a => a -> a -> a
- t
z) forall a. Num a => a -> a -> a
- t
y,t
x forall a. Num a => a -> a -> a
* t
y forall a. Num a => a -> a -> a
- t
b forall a. Num a => a -> a -> a
* t
z)
quad_f :: Floating t => t -> t -> t -> t -> t
quad_f :: forall t. Floating t => t -> t -> t -> t -> t
quad_f t
a t
b t
c t
x = (t
a forall a. Num a => a -> a -> a
* (t
x forall a. Floating a => a -> a -> a
** t
2)) forall a. Num a => a -> a -> a
+ (t
b forall a. Num a => a -> a -> a
* t
x) forall a. Num a => a -> a -> a
+ t
c
standard_f :: (RealFrac t, Floating t) => t -> (t, t) -> (t, t)
standard_f :: forall t. (RealFrac t, Floating t) => t -> (t, t) -> (t, t)
standard_f t
k (t
x,t
y) =
let y' :: t
y' = (t
y forall a. Num a => a -> a -> a
+ (t
k forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sin t
x)) forall n. RealFrac n => n -> n -> n
`sc3_mod` forall a. Floating a => a
two_pi
in ((t
x forall a. Num a => a -> a -> a
+ t
y') forall n. RealFrac n => n -> n -> n
`sc3_mod` forall a. Floating a => a
two_pi,t
y')