Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- data UGenId
- no_id :: UGenId
- type Sample = Double
- data Constant = Constant {}
- data C_Meta n = C_Meta {}
- type C_Meta_T5 n = (n, n, String, n, String)
- c_meta_t5 :: (n -> m) -> C_Meta_T5 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_double :: String -> Maybe Double
- parse_constant :: String -> Maybe UGen
- un_constant :: UGen -> Maybe Constant
- u_constant :: UGen -> Maybe Sample
- u_constant_err :: UGen -> Sample
- mrg :: [UGen] -> UGen
- mrg_leftmost :: UGen -> UGen
- isConstant :: UGen -> Bool
- isSink :: UGen -> Bool
- un_proxy :: UGen -> Maybe Proxy
- isProxy :: UGen -> Bool
- mce :: [UGen] -> UGen
- mceProxies :: MCE UGen -> [UGen]
- isMCE :: UGen -> Bool
- mceChannels :: UGen -> [UGen]
- mceDegree :: UGen -> Maybe Int
- mceDegree_err :: UGen -> Int
- mceExtend :: Int -> UGen -> [UGen]
- mceInputTransform :: [UGen] -> Maybe [[UGen]]
- mceBuild :: ([UGen] -> UGen) -> [UGen] -> UGen
- mce_is_direct_proxy :: MCE 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
- proxy :: UGen -> Int -> UGen
- 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
Data type for internalised identifier at UGen
.
Constants.
Constant 3 == Constant 3 (Constant 3 > Constant 1) == True
Control meta-data.
c_meta_t5 :: (n -> m) -> C_Meta_T5 n -> C_Meta m Source #
Lift C_Meta_5
to C_Meta
allowing type coercion.
Control inputs. It is an invariant that controls with equal names within a UGen graph must be equal in all other respects.
Control | |
|
Labels.
Operating mode of unary and binary operators.
UGen primitives.
Primitive | |
|
Proxy to multiple channel input.
Proxy | |
|
Multiple root graph.
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 Source # | Unit generators are enumerable. |
Eq UGen Source # | |
Floating UGen Source # | Unit generators are floating point. |
Fractional UGen Source # | Unit generators are fractional. |
Integral UGen Source # | Unit generators are integral. |
Num UGen Source # | Unit generators are numbers. |
Ord UGen Source # | Unit generators are orderable (when (constant 2 > constant 1) == True |
Read UGen Source # | |
Real UGen Source # | Unit generators are real. |
RealFrac UGen Source # | |
Show UGen Source # | |
Bits UGen Source # | UGens are bit patterns. |
Random UGen Source # | Unit generators are stochastic. |
MulAdd UGen Source # | |
BinaryOp UGen Source # | |
UnaryOp UGen Source # | |
RealFracE UGen Source # | |
OrdE UGen Source # | |
EqE UGen Source # | |
Audible UGen Source # | |
Audible UGen Source # | |
Parser
Accessors
un_constant :: UGen -> Maybe Constant Source #
See into Constant_U
.
u_constant :: UGen -> Maybe Sample Source #
Value of Constant_U
Constant
.
u_constant_err :: UGen -> Sample Source #
Erroring variant.
MRG
mrg_leftmost :: UGen -> UGen Source #
See into MRG_U
, follows leftmost rule until arriving at non-MRG node.
Predicates
isConstant :: UGen -> Bool Source #
Constant node predicate.
MCE
mceChannels :: UGen -> [UGen] Source #
Output channels of UGen as a list. If required, preserves the RHS of and MRG node in channel 0.
mceDegree :: UGen -> Maybe Int Source #
Number of channels to expand to. This function sees into MRG, and is defined only for MCE nodes.
mceDegree_err :: UGen -> Int Source #
Erroring variant.
mceExtend :: Int -> UGen -> [UGen] Source #
Extend UGen to specified degree. Follows "leftmost" rule for MRG nodes.
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. This is useful when disassembling graphs, ie. ugen_graph_forth_pp at hsc3-db.
Validators
Constructors
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.