Process Parameter Values With POW Curves


#1

I think it would be cool to have an object that converted a linear parameter range (from a knob, for example) to a variable curve, from logarithmic, via linear to exponential. I guess I'd have uni and bi-polar variants, and they'd need to output values in the correct 32 bit signed/unsigned integer range.

If I were to do this with floating-point maths, I'd simply use a pow(x, y) function to return a number between 0 - 1, then scale that to desired range.

I'm afraid I'm a bit of a maths dunce, so I'm not sure how I'd approach doing this in the most efficient way in an Axoloti object. I have a feeling there are probably Cortex M4-specific assembly language commands to do this, but I don't know where I would look for them.

Anyone have any advice to get me started?

a|x


#2

Oh, also, having done the above, I'd go on to make an AD/AR envelope with variable curves for both segments. Would be cool for percussion sounds.

a|x


#3

did you look at how the math/exp works, and axoloti_math.h?
... thats my advice, look at the existing axoloti objects, see if they do something similar... and how they use the firmware, and M4.

heres is a link to the M4 instruction set
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/CIHJJEIH.html
(hint: axoloti has a subset, defined so they are available in C , theoretically, you could add your own if needed, again following a similar pattern)

also, you can convert to float, and then back... there are posts about that on this forum, might need a bit of digging.
(also you may want to read up about the Q number format)


#4

Thanks, I'll check those out.

I've seen a few examples of objects using assembler functions (ie ___SMMUL() ) directly.

Would you recommend using the abstracted versions in axoloti_math.h instead, where they exist?

a|x