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
- lpshold :: [Sig] -> Sig -> Sig
- loopseg :: [Sig] -> Sig -> Sig
- loopxseg :: [Sig] -> Sig -> Sig
- lpsholdBy :: D -> [Sig] -> Sig -> Sig
- loopsegBy :: D -> [Sig] -> Sig -> Sig
- loopxsegBy :: D -> [Sig] -> Sig -> Sig
- holdSeq :: [Sig] -> [Sig] -> Sig -> Sig
- linSeq :: [Sig] -> [Sig] -> Sig -> Sig
- expSeq :: [Sig] -> [Sig] -> Sig -> Sig
- linloop :: [Sig] -> Sig
- exploop :: [Sig] -> Sig
- sah :: [Sig] -> Sig
- stepSeq :: [Sig] -> Sig -> Sig
- constSeq :: [Sig] -> Sig -> Sig
- triSeq :: [Sig] -> Sig -> Sig
- sqrSeq :: [Sig] -> Sig -> Sig
- sawSeq :: [Sig] -> Sig -> Sig
- isawSeq :: [Sig] -> Sig -> Sig
- xsawSeq :: [Sig] -> Sig -> Sig
- ixsawSeq :: [Sig] -> Sig -> Sig
- isqrSeq :: [Sig] -> Sig -> Sig
- xtriSeq :: [Sig] -> Sig -> Sig
- adsrSeq :: Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig
- xadsrSeq :: Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig
- adsrSeq_ :: Sig -> Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig
- xadsrSeq_ :: Sig -> Sig -> Sig -> Sig -> Sig -> [Sig] -> 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
lpshold :: [Sig] -> Sig -> Sig Source
Looping sample and hold envelope. The first argument is the list of pairs:
[a, durA, b, durB, c, durc, ...]
It's a list of values and durations. The durations are relative to the period of repetition. The period is specified with the second argument. The second argument is the frequency of repetition measured in Hz.
lpshold valDurs frequency
loopseg :: [Sig] -> Sig -> Sig Source
Looping linear segments envelope. The first argument is the list of pairs:
[a, durA, b, durB, c, durc, ...]
It's a list of values and durations. The durations are relative to the period of repetition. The period is specified with the second argument. The second argument is the frequency of repetition measured in Hz.
loopseg valDurs frequency
loopxseg :: [Sig] -> Sig -> Sig Source
Looping exponential segments envelope. The first argument is the list of pairs:
[a, durA, b, durB, c, durc, ...]
It's a list of values and durations. The durations are relative to the period of repetition. The period is specified with the second argument. The second argument is the frequency of repetition measured in Hz.
loopxseg valDurs frequency
lpsholdBy :: D -> [Sig] -> Sig -> Sig Source
It's like lpshold but we can specify the phase of repetition (phase belongs to [0, 1]).
loopsegBy :: D -> [Sig] -> Sig -> Sig Source
It's like loopseg but we can specify the phase of repetition (phase belongs to [0, 1]).
loopxsegBy :: D -> [Sig] -> Sig -> Sig Source
It's like loopxseg but we can specify the phase of repetition (phase belongs to [0, 1]).
holdSeq :: [Sig] -> [Sig] -> Sig -> Sig Source
The looping sequence of constant segments.
linSeg [a, durA, b, durB, c, durC, ...] [scale1, scale2, scale3] cps
The first argument is the list that specifies the shape of the looping wave. It's the alternating values and durations of transition from one value to another. The durations are relative to the period. So that lists
[0, 0.5, 1, 0.5, 0] and [0, 50, 1, 50, 0]
produce the same results. The second list is the list of scales for subsequent periods. Every value in the period is scaled with values from the second list. The last argument is the rate of repetition (Hz).
linSeq :: [Sig] -> [Sig] -> Sig -> Sig Source
The looping sequence of linear segments.
linSeg [a, durA, b, durB, c, durC, ...] [scale1, scale2, scale3] cps
The first argument is the list that specifies the shape of the looping wave. It's the alternating values and durations of transition from one value to another. The durations are relative to the period. So that lists
[0, 0.5, 1, 0.5, 0] and [0, 50, 1, 50, 0]
produce the same results. The second list is the list of scales for subsequent periods. Every value in the period is scaled with values from the second list. The last argument is the rate of repetition (Hz).
expSeq :: [Sig] -> [Sig] -> Sig -> Sig Source
The looping sequence of exponential segments.
expSeg [a, durA, b, durB, c, durC, ...] [scale1, scale2, scale3] cps
The first argument is the list that specifies the shape of the looping wave. It's the alternating values and durations of transition from one value to another. The durations are relative to the period. So that lists
[0, 0.5, 1, 0.5, 0] and [0, 50, 1, 50, 0]
produce the same results. The second list is the list of scales for subsequent periods. Every value in the period is scaled with values from the second list. The last argument is the rate of repetition (Hz).
Sample and hold cyclic signal. It takes the list of
[a, dta, b, dtb, c, dtc, ...]
the a, b, c, ... are values of the constant segments
the dta, dtb, dtc, are durations in seconds of constant segments.
The period of the repetition equals to the sum of all durations.
constSeq :: [Sig] -> Sig -> Sig Source
Sample and hold sequence. It outputs the looping sequence of constan elements.
adsrSeq :: Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig Source
The looping ADSR envelope.
xadsrSeq attack decay sustain release weights frequency
The sum of attack, decay, sustain and release time durations should be equal to one.
xadsrSeq :: Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig Source
The looping exponential ADSR envelope. there is a fifth segment at the end of the envelope during which the envelope equals to zero.
xadsrSeq attack decay sustain release weights frequency
The sum of attack, decay, sustain and release time durations should be equal to one.
adsrSeq_ :: Sig -> Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig Source
The looping ADSR envelope with the rest at the end.
adsrSeq attack decay sustain release rest weights frequency
The sum of attack, decay, sustain, release and rest time durations should be equal to one.
xadsrSeq_ :: Sig -> Sig -> Sig -> Sig -> Sig -> [Sig] -> Sig -> Sig Source
The looping exponential ADSR envelope. there is a fifth segment at the end of the envelope during which the envelope equals to zero.
xadsrSeq_ attack decay sustain release rest weights frequency
The sum of attack, decay, sustain, release and rest time durations should be equal to one.
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.