Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Csound.Typed.Control.Ref
Synopsis
- newtype Ref a = Ref [Var]
- writeRef :: Tuple a => Ref a -> a -> SE ()
- readRef :: Tuple a => Ref a -> SE a
- newRef :: forall a. Tuple a => a -> SE (Ref a)
- mixRef :: (Num a, Tuple a) => Ref a -> a -> SE ()
- modifyRef :: Tuple a => Ref a -> (a -> a) -> SE ()
- sensorsSE :: Tuple a => a -> SE (SE a, a -> SE ())
- newGlobalRef :: forall a. Tuple a => a -> SE (Ref a)
- concatRef :: (Tuple a, Tuple b) => Ref a -> Ref b -> Ref (a, b)
- concatRef3 :: (Tuple a, Tuple b, Tuple c) => Ref a -> Ref b -> Ref c -> Ref (a, b, c)
- concatRef4 :: (Tuple a, Tuple b, Tuple c, Tuple d) => Ref a -> Ref b -> Ref c -> Ref d -> Ref (a, b, c, d)
- concatRef5 :: (Tuple a, Tuple b, Tuple c, Tuple d, Tuple e) => Ref a -> Ref b -> Ref c -> Ref d -> Ref e -> Ref (a, b, c, d, e)
- newCtrlRef :: forall a. Tuple a => a -> SE (Ref a)
- newGlobalCtrlRef :: forall a. Tuple a => a -> SE (Ref a)
- globalSensorsSE :: Tuple a => a -> SE (SE a, a -> SE ())
- newClearableGlobalRef :: forall a. Tuple a => a -> SE (Ref a)
- newTab :: D -> SE Tab
- newGlobalTab :: Int -> SE Tab
- whileRef :: forall st. Tuple st => st -> (st -> SE BoolSig) -> (st -> SE st) -> SE ()
- whileRefD :: forall st. Tuple st => st -> (st -> SE BoolD) -> (st -> SE st) -> SE ()
Documentation
newRef :: forall a. Tuple a => a -> SE (Ref a) Source #
Allocates a new local (it is visible within the instrument) mutable value and initializes it with value. A reference can contain a tuple of variables.
mixRef :: (Num a, Tuple a) => Ref a -> a -> SE () Source #
Adds the given signal to the value that is contained in the reference.
modifyRef :: Tuple a => Ref a -> (a -> a) -> SE () Source #
Modifies the Ref value with given function.
sensorsSE :: Tuple a => a -> SE (SE a, a -> SE ()) Source #
An alias for the function newRef
. It returns not the reference
to mutable value but a pair of reader and writer functions.
newGlobalRef :: forall a. Tuple a => a -> SE (Ref a) Source #
Allocates a new global mutable value and initializes it with value. A reference can contain a tuple of variables.
concatRef4 :: (Tuple a, Tuple b, Tuple c, Tuple d) => Ref a -> Ref b -> Ref c -> Ref d -> Ref (a, b, c, d) Source #
concatRef5 :: (Tuple a, Tuple b, Tuple c, Tuple d, Tuple e) => Ref a -> Ref b -> Ref c -> Ref d -> Ref e -> Ref (a, b, c, d, e) Source #
newCtrlRef :: forall a. Tuple a => a -> SE (Ref a) Source #
Allocates a new local (it is visible within the instrument) mutable value and initializes it with value. A reference can contain a tuple of variables. It contains control signals (k-rate) and constants for numbers (i-rates).
newGlobalCtrlRef :: forall a. Tuple a => a -> SE (Ref a) Source #
Allocates a new global mutable value and initializes it with value. A reference can contain a tuple of variables. It contains control signals (k-rate) and constants for numbers (i-rates).
globalSensorsSE :: Tuple a => a -> SE (SE a, a -> SE ()) Source #
An alias for the function newRef
. It returns not the reference
to mutable value but a pair of reader and writer functions.
newClearableGlobalRef :: forall a. Tuple a => a -> SE (Ref a) Source #
Allocates a new clearable global mutable value and initializes it with value. A reference can contain a tuple of variables. The variable is set to zero at the end of every iteration. It's useful for accumulation of audio values from several instruments.
newTab :: D -> SE Tab Source #
Creates a new table. The Tab could be used while the instrument is playing. When the instrument is retriggered the new tab is allocated.
newTab size