Sound.SC3.UGen.Envelope.Construct

Description

Functions to generate break point data for standard envelope types.

Synopsis

# Documentation

envCoord :: Num a => [(a, a)] -> a -> a -> Envelope_Curve a -> Envelope aSource

Co-ordinate based static envelope generator.

let e = envCoord [(0,0),(1/4,1),(1,0)] 1 1 EnvLin
in envelope_sc3_array e == Just [0,2,-99,-99,1,1/4,1,0,0,3/4,1,0]

envTrapezoid :: (Num a, OrdE a) => a -> a -> a -> a -> Envelope aSource

Trapezoidal envelope generator. The arguments are: 1. shape determines the sustain time as a proportion of dur, zero is a triangular envelope, one a rectangular envelope; 2. skew determines the attack/decay ratio, zero is an immediate attack and a slow decay, one a slow attack and an immediate decay; 3. duration in seconds; 4. amplitude as linear gain.

envPerc' :: Num a => a -> a -> a -> (Envelope_Curve a, Envelope_Curve a) -> Envelope aSource

Variant envPerc with user specified 'Envelope_Curve a'.

envPerc :: Num a => a -> a -> Envelope aSource

Percussive envelope, with attack, release, level and curve inputs.

envTriangle :: (Num a, Fractional a) => a -> a -> Envelope aSource

Triangular envelope, with duration and level inputs.

let e = envTriangle 1 0.1
in envelope_sc3_array e = Just [0,2,-99,-99,0.1,0.5,1,0,0,0.5,1,0]

envSine :: (Num a, Fractional a) => a -> a -> Envelope aSource

Sine envelope, with duration and level inputs.

let e = envSine 0 0.1
in envelope_sc3_array e == Just [0,2,-99,-99,0.1,0,3.0,0,0,0,3,0]

envLinen' :: Num a => a -> a -> a -> a -> (Envelope_Curve a, Envelope_Curve a, Envelope_Curve a) -> Envelope aSource

Variant of envLinen with user specified 'Envelope_Curve a'.

envLinen :: Num a => a -> a -> a -> a -> Envelope aSource

Linear envelope parameter constructor.

Constructors

 ADSR FieldsattackTime :: a decayTime :: a sustainLevel :: a releaseTime :: a peakLevel :: a curve :: (Envelope_Curve a, Envelope_Curve a, Envelope_Curve a) bias :: a

envADSR :: Num a => a -> a -> a -> a -> a -> Envelope_Curve a -> a -> Envelope aSource

Attack, decay, sustain, release envelope parameter constructor.