curve, curvek
convex or concave power curves
Syntax
Usage
curve is a wrapper of a simple power function.
Input values are expected to be between 0-1.
Outputs and arguments
iresult -- The output value.
i/kval -- Input value (expected to be between 0 - 1)
i/kpower (optional, default=1) --
- i/kpower < 0.5: fast to approach 1
- i/kpower > 0.5: slow to approach 1
- i/kpower == 0.5 or 1.00: returns the value unchanged (straight line)
Example
See the example for
curve.orc
| curve |
|---|
| instr Sound101
ares vco2 curve(p4,p6),p5
;;apply a power curve to the amplitude (p4).
kfr transeg 8000, 0.2, -5, p5*4, p3-0.4, 2, p5
ares moogladder2 ares,kfr,0.6
send ares
endin
loopcode fillarray(6), "loopid1", {{
ipower = seesaw(0.2,0.7)
;; select alternate power values for curve. Notice how it affects the amplitude swell.
arpi fillarray_i(n("Sound101"),0,1/8,0.9,0,ipower), fillarray_i(-2,0,2,4,6,8), fillarray_i(1/8),6 - 0.01,-1,1,-0.5
;; An arpeggiator with an amplitude fade-in
}},1
patchsig "Sound101", "outs"
|