Safe Haskell | None |
---|---|
Language | Haskell98 |
Envelopes
- leg :: D -> D -> D -> D -> Sig
- xeg :: D -> D -> D -> D -> Sig
- onIdur :: [D] -> [D]
- lindur :: [D] -> Sig
- expdur :: [D] -> Sig
- linendur :: Sig -> D -> D -> Sig
- onDur :: D -> [D] -> [D]
- lindurBy :: D -> [D] -> Sig
- expdurBy :: D -> [D] -> Sig
- linendurBy :: D -> Sig -> D -> D -> Sig
- oscLins :: [D] -> Sig -> Sig
- oscElins :: [D] -> Sig -> Sig
- oscExps :: [D] -> Sig -> Sig
- oscEexps :: [D] -> Sig -> Sig
- oscLine :: D -> D -> Sig -> Sig
- fadeIn :: D -> Sig
- fadeOut :: D -> Sig
- fades :: D -> D -> Sig
- expFadeIn :: D -> Sig
- expFadeOut :: D -> Sig
- expFades :: D -> D -> Sig
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
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]
The opcode linseg
with time intervals
relative to the total duration of the note.
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
A combination of fade in and fade out.
fades attackDuration decayDuration
expFadeOut :: D -> Sig Source
Fades out by exponent with the given attack time.