Discrete Parameter Modifiers
brownian
- Bounded Brownian Motion
Define a bounded brownian motion on a parameter.
Parameters
- lower boundary (float)
- upper boundary (float)
:wrap
(boolean) (t) - wrap value if it reaches lower or upper boundary:step
(float) (0.1) - step that the parameter will be incremented/decremented
Syntax
(brownian <lower boundary> <upper boundary> :wrap <wrap> :step <step-size>)
Examples
(sx 'some #t
(cmp (pear (rate (brownian 0.8 1.2)))
(nuc 'bass (saw 120 :dur 200))))
env
- Discrete Envelope
Define an envelope on any parameter. Length of list of levels must be one more than length of list of durations. Durations are step based, so the absolute durations depend on the speed your generator runs at.
Parameters
:v
or:values
- level points on envelope path:s
or:steps
- transition durations (in steps):repeat
(boolean) - loop envelope
Syntax
(env :values/:v <levels> :steps/:s <durations> :repeat <#t/#f>)
Example
(sx 'simple #t
(cmp
(pear (lvl (env :v 0.0 0.4 0.0 :s 20 30)))
(cyc 'beat "bd ~ hats ~ sn ~ hats ~")))
fade
- Parameter Fader
Fade a parameter (sinusoidal).
Syntax
(fade <from> <to> :steps <steps>)
Example
;; fade cutoff frequency
(sx 'osc #t
(nuc 'ill (saw 300 :lp-freq (fade 300 2200 :steps 20))))
;; same, but a different position
(sx 'osc #t
(cmp
(pear (lpf (fade 300 2200 :steps 4)))
(nuc 'ill (saw 300))))
;; fade duration
(sx 'osc #t
(nuc 'ill (saw 300) :dur (fade 100 400)))
;; fade probablility
(sx 'osc #tt
(cmp
(pear :p (fade 0 100) (lvl 0.0))
(nuc 'ill (saw 300))))
bounce
- Parameter Oscillator
Define oscillation on any parameter. The oscillation curve is a bit bouncy, not really sinusoidal.
Parameters
- upper limit - upper limit for oscillation
- lower limit - lower limit for oscillation
:cycle
- oscillation cycle length in steps
Syntax
(bounce <upper limit> <lower limit> :cycle <cycle length in steps>)
Example
(sx 'simple #t
(nuc 'beat (bd) :dur (bounce 200 600 :steps 80)))