Closed wayfu closed 7 months ago
DISTORT can probably do something a bit like you are looking for now. There's asm code for computing 2**x
, converting it to generic y**x
is possible but a bit of hassle and takes again more bytes.
Funnily, the first poking of 4klang that eventually became sointu was trying to get gopher remove the unnecessary code in Pow function, remnants of the pow being able to compute generic y**x
and not just 2**x
:)
hehehe I'll use the distortion for now then! thanks!
I'll close this issue: the recommended way to shape the envelopes is to use distort. It's also possible to do ^2 (or ^4 or ^8) using a mul operator(s).
A pow op would be very handy for making envelopes - bending linear curves to be tighter (higher values) or looser (0...1). I've been using push/mulp combos for squaring values, but a real pow would be much more, haha, powerful.