Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- data UGenId
- no_id :: UGenId
- type Sample = Double
- data Constant = Constant {}
- data C_Meta n = C_Meta {}
- type C_Meta' n = (n, n, String, n, String)
- c_meta' :: (n -> m) -> C_Meta' n -> C_Meta m
- data Control = Control {}
- data Label = Label {}
- type Output = Rate
- newtype Special = Special Int
- data Primitive = Primitive {
- ugenRate :: Rate
- ugenName :: String
- ugenInputs :: [UGen]
- ugenOutputs :: [Output]
- ugenSpecial :: Special
- ugenId :: UGenId
- data Proxy = Proxy {}
- data MRG = MRG {}
- data UGen
- parse_constant :: String -> Maybe UGen
- un_constant :: UGen -> Maybe Constant
- u_constant :: UGen -> Maybe Sample
- isConstant :: UGen -> Bool
- isSink :: UGen -> Bool
- un_proxy :: UGen -> Maybe Proxy
- isProxy :: UGen -> Bool
- checkInput :: UGen -> UGen
- constant :: Real n => n -> UGen
- int_to_ugen :: Int -> UGen
- float_to_ugen :: Float -> UGen
- double_to_ugen :: Double -> UGen
- mce :: [UGen] -> UGen
- mrg :: [UGen] -> UGen
- proxy :: UGen -> Int -> UGen
- mceProxies :: MCE UGen -> [UGen]
- isMCE :: UGen -> Bool
- mceChannels :: UGen -> [UGen]
- mceDegree :: UGen -> Int
- mceExtend :: Int -> UGen -> [UGen]
- mceInputTransform :: [UGen] -> Maybe [[UGen]]
- mceBuild :: ([UGen] -> UGen) -> [UGen] -> UGen
- mce_is_direct_proxy :: MCE UGen -> Bool
- rateOf :: UGen -> Rate
- proxify :: UGen -> UGen
- mkUGen :: Maybe ([Sample] -> Sample) -> [Rate] -> Either Rate [Int] -> String -> [UGen] -> Maybe UGen -> Int -> Special -> UGenId -> UGen
- mkOperator :: ([Sample] -> Sample) -> String -> [UGen] -> Int -> UGen
- mkUnaryOperator :: Unary -> (Sample -> Sample) -> UGen -> UGen
- mkBinaryOperator_optimize :: Binary -> (Sample -> Sample -> Sample) -> (Either Sample Sample -> Bool) -> UGen -> UGen -> UGen
- mkBinaryOperator :: Binary -> (Sample -> Sample -> Sample) -> UGen -> UGen -> UGen
Basic types
Constants.
Constant 3 == Constant 3 (Constant 3 > Constant 1) == True
Control meta-data.
Control inputs. It is an invariant that controls with equal names within a UGen graph must be equal in all other respects.
Control | |
|
Operating mode of unary and binary operators.
UGen primitives.
Primitive | |
|
Proxy to multiple channel input.
Proxy | |
|
Union type of Unit Generator forms.
Constant_U Constant | |
Control_U Control | |
Label_U Label | |
Primitive_U Primitive | |
Proxy_U Proxy | |
MCE_U (MCE UGen) | |
MRG_U MRG |
Enum UGen | Unit generators are enumerable. |
Eq UGen | |
Floating UGen | Unit generators are floating point. |
Fractional UGen | Unit generators are fractional. |
Integral UGen | Unit generators are integral. |
Num UGen | Unit generators are numbers. |
Ord UGen | Unit generators are orderable (when (constant 2 > constant 1) == True |
Real UGen | Unit generators are real. |
RealFrac UGen | |
Show UGen | |
Bits UGen | UGens are bit patterns. |
Random UGen | Unit generators are stochastic. |
TernaryOp UGen | |
BinaryOp UGen | |
UnaryOp UGen | |
RealFracE UGen | |
OrdE UGen | |
EqE UGen | |
Audible UGen | |
Audible UGen |
Parser
parse_constant :: String -> Maybe UGen Source
Accessors
un_constant :: UGen -> Maybe Constant Source
See into Constant_U
.
u_constant :: UGen -> Maybe Sample Source
Value of Constant_U
Constant
.
Predicates
isConstant :: UGen -> Bool Source
Constant node predicate.
Validators
checkInput :: UGen -> UGen Source
Ensure input UGen
is valid, ie. not a sink.
Constructors
int_to_ugen :: Int -> UGen Source
Type specialised constant
.
float_to_ugen :: Float -> UGen Source
Type specialised constant
.
double_to_ugen :: Double -> UGen Source
Type specialised constant
.
MCE
mceChannels :: UGen -> [UGen] Source
Output channels of UGen as a list.
mceInputTransform :: [UGen] -> Maybe [[UGen]] Source
Apply MCE transform to a list of inputs.
mceBuild :: ([UGen] -> UGen) -> [UGen] -> UGen Source
Build a UGen after MCE transformation of inputs.
mce_is_direct_proxy :: MCE UGen -> Bool Source
True if MCE is an immediate proxy for a multiple-out Primitive.
mkUGen :: Maybe ([Sample] -> Sample) -> [Rate] -> Either Rate [Int] -> String -> [UGen] -> Maybe UGen -> Int -> Special -> UGenId -> UGen Source
Construct proxied and multiple channel expanded UGen.
cf = constant function, rs = rate set, r = rate, nm = name, i = inputs, o = outputs.
Operators
mkOperator :: ([Sample] -> Sample) -> String -> [UGen] -> Int -> UGen Source
Operator UGen constructor.
mkUnaryOperator :: Unary -> (Sample -> Sample) -> UGen -> UGen Source
Unary math constructor with constant optimization.
mkBinaryOperator_optimize :: Binary -> (Sample -> Sample -> Sample) -> (Either Sample Sample -> Bool) -> UGen -> UGen -> UGen Source
Binary math constructor with constant optimization.
let o = sinOsc AR 440 0
o * 1 == o && 1 * o == o && o * 2 /= o o + 0 == o && 0 + o == o && o + 1 /= o o - 0 == o && 0 - o /= o o / 1 == o && 1 / o /= o o ** 1 == o && o ** 2 /= o
mkBinaryOperator :: Binary -> (Sample -> Sample -> Sample) -> UGen -> UGen -> UGen Source
Binary math constructor with constant optimization.