csound-expression-4.2.0: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Envelope

Contents

Description

Envelopes

Synopsis

Documentation

leg :: D -> D -> D -> D -> Sig Source

Linear adsr envelope generator with release

leg attack decay sustain release

xeg :: D -> D -> D -> D -> Sig Source

Exponential adsr envelope generator with release

xeg attack decay sustain release

Relative duration

onIdur :: [D] -> [D] Source

Makes time intervals relative to the note's duration. So that:

onIdur [a, t1, b, t2, c]

becomes:

[a, t1 * idur, b, t2 * idur, c]

lindur :: [D] -> Sig Source

The opcode linseg with time intervals relative to the total duration of the note.

expdur :: [D] -> Sig Source

The opcode expseg with time intervals relative to the total duration of the note.

linendur :: Sig -> D -> D -> Sig Source

The opcode linen with time intervals relative to the total duration of the note. Total time is set to the value of idur.

linendur asig rise decay

onDur :: D -> [D] -> [D] Source

Makes time intervals relative to the note's duration. So that:

onDur dt [a, t1, b, t2, c]

becomes:

[a, t1 * dt, b, t2 * dt, c]

lindurBy :: D -> [D] -> Sig Source

The opcode linseg with time intervals relative to the total duration of the note given by the user.

expdurBy :: D -> [D] -> Sig Source

The opcode expseg with time intervals relative to the total duration of the note given by the user.

linendurBy :: D -> Sig -> D -> D -> Sig Source

The opcode linen with time intervals relative to the total duration of the note. Total time is set to the value of the first argument.

linendurBy dt asig rise decay

Looping envelopes

oscLins :: [D] -> Sig -> Sig Source

Loops over line segments with the given rate.

oscLins [a, durA, b, durB, c, durC ..] cps

where

  • a, b, c ... -- values
  • durA, durB, durC -- durations of the segments relative to the current frequency.

oscElins :: [D] -> Sig -> Sig Source

Loops over equally spaced line segments with the given rate.

oscElins [a, b, c] === oscLins [a, 1, b, 1, c]

oscExps :: [D] -> Sig -> Sig Source

Loops over exponential segments with the given rate.

oscLins [a, durA, typeA, b, durB, typeB, c, durC, typeC ..] cps

where

  • a, b, c ... -- values
  • durA, durB, durC -- durations of the segments relative to the current frequency.
  • typeA, typeB, typeC, ... -- shape of the envelope. If the value is 0 then the shap eis linear; otherwise it is an concave exponential (positive type) or a convex exponential (negative type).

oscEexps :: [D] -> Sig -> Sig Source

Loops over equally spaced exponential segments with the given rate.

oscLins [a, typeA, b, typeB, c, typeC ..] === oscLins [a, 1, typeA, b, 1, typeB, c, 1, typeC ..]

oscLine :: D -> D -> Sig -> Sig Source

oscLine a b cps

Goes from a to b and back by line segments. One period is equal to 2/cps so that one period is passed by 1/cps seconds.

Faders

fadeIn :: D -> Sig Source

Fades in with the given attack time.

fadeOut :: D -> Sig Source

Fades out with the given attack time.

fades :: D -> D -> Sig Source

A combination of fade in and fade out.

fades attackDuration decayDuration

expFadeIn :: D -> Sig Source

Fades in by exponent with the given attack time.

expFadeOut :: D -> Sig Source

Fades out by exponent with the given attack time.

expFades :: D -> D -> Sig Source

A combination of exponential fade in and fade out.

expFades attackDuration decayDuration