module Sound.Sc3.Ugen.Math where
import qualified Sound.Sc3.Common.Math as Math
import qualified Sound.Sc3.Common.Math.Operator as Operator
import qualified Sound.Sc3.Common.Uid as Uid
import qualified Sound.Sc3.Ugen.Bindings.Db as Bindings
import qualified Sound.Sc3.Ugen.Ugen as Ugen
dinf :: Ugen.Ugen
dinf :: Ugen
dinf = forall n. Real n => n -> Ugen
Ugen.constant (Sample
9e8 :: Ugen.Sample)
ceil :: Ugen.Ugen -> Ugen.Ugen
ceil :: Ugen -> Ugen
ceil = forall a. RealFracE a => a -> a
Operator.ceilingE
unitMidi :: Num t => t -> t
unitMidi :: forall t. Num t => t -> t
unitMidi = forall a. Num a => a -> a -> a
(*) t
127
unitCps :: Operator.UnaryOp t => t -> t
unitCps :: forall t. UnaryOp t => t -> t
unitCps = forall t. UnaryOp t => t -> t
Operator.midiCps forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Num a => a -> a -> a
* t
127)
sum_opt :: [Ugen.Ugen] -> Ugen.Ugen
sum_opt :: [Ugen] -> Ugen
sum_opt = forall t.
Num t =>
(t -> t -> t -> t) -> (t -> t -> t -> t -> t) -> [t] -> t
Math.sum_opt_f Ugen -> Ugen -> Ugen -> Ugen
Bindings.sum3 Ugen -> Ugen -> Ugen -> Ugen -> Ugen
Bindings.sum4
useqId :: (Uid.ID z, Enum z) => z -> Int -> (z -> Ugen.Ugen -> Ugen.Ugen) -> Ugen.Ugen -> Ugen.Ugen
useqId :: forall z.
(ID z, Enum z) =>
z -> Int -> (z -> Ugen -> Ugen) -> Ugen -> Ugen
useqId z
z Int
k z -> Ugen -> Ugen
f Ugen
i = if Int
k forall a. Ord a => a -> a -> Bool
<= Int
0 then Ugen
i else forall z.
(ID z, Enum z) =>
z -> Int -> (z -> Ugen -> Ugen) -> Ugen -> Ugen
useqId (forall a. Enum a => a -> a
succ z
z) (Int
k forall a. Num a => a -> a -> a
- Int
1) z -> Ugen -> Ugen
f (z -> Ugen -> Ugen
f z
z Ugen
i)