| User-Defined Opcode Database |
|---|
Normalised exponential curve with variable steepness.
Download UDO FileThis opcode implements a formula for generating a normalised exponential curve in range 0 - 1. It is based on the Max / MSP work of Eric Singer (c) 1994.
kout ExpCurve kfloat, ksteepness
kfloat -- A normalised floating point value in range 0 - 1.
ksteepness -- Steepness index of the resulting curve. This should be > 1. There exists a safeguard in the opcode to help minimize errors related to Not-a-Number (NaN) as a result of having a steepness index of <= 1.
opcode ExpCurve, k, kk kfloat, ksteep xin if (ksteep > 1) then ksteep = ksteep elseif (ksteep < 1) then ksteep = 1 endif kout = (exp(kfloat * log(ksteep)) - 1)/(ksteep - 1) xout kout endop
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
OSCinit 4200
#include "ExpCurve.udo"
instr 1
kf1 init 0
kf2 init 0
kk OSClisten "/expcurve/params", "ff", kf1, kf2
if kk =0 goto ex
kout ExpCurve kf1, kf2
printk2 kout
ex:
endin
David Akbari - 2005
| Previous | Home | Next |
| ensembleChorus | F2M |