mathematical expression help plz ?

Nth logik's icon

i am curious to know if anyone could lend some help to give me an understanding of how i can create tools to produce irregular sounds (with use of math opcodes like SIN/SINH/ASIN/COS/COSH/TAN/ATAN/ABS/LOG/LOG10/SQRT/etc)

the type of math i seek to build a synth tool with would represent similarly in such programs like syd 1.07 or quack sound studio 4.1

Jean-Francois Charles's icon
Nth logik's icon

ok .....

i'm looking for any help with math expressional equations that could alter an oscillator to produce irregular sound data (sounds that are not a sine/sawtooth/square/impulse and not in a regulatory flowing pattern that is) with the 2 programs i mentioned earlier. syd 1.07, it has a widget called an expression evaluator and you can click upon it and enter into a text field a certain line of math that,.. the more complex the equation, the more complex the sound rendered will be and i was hoping to emulate that in any way possible. Quack sound studio 4.1 is another type of modular studio like that. and it has a granular, math & a wave module that could accept similar equations as syd can like the ones below:

i've tested these equations in syd, they work fine with the ƒ(x)
module

cos(t*156*tan(145*t))

tanh(cos(t*106/cos3(430*t)))

Nth logik's icon

i just got done building a patch that is somewhat close to an expression evaluator (sound mangler) that i would like to create but i would like to rather alter the whole process by entering a singular or group of equations to alter the one or more EXPR objects i have tied into it,... not have to stop all audio just to change the individual EXPR objects to furtherly complex it....

dlurk's icon

enth lojeek wrote:
> i just got done building a patch that is somewhat close to an expression evaluator (sound mangler) that i would like to create but i would like to rather alter the whole process by entering a singular or group of equations to alter the one or more EXPR objects i have tied into it,... not have to stop all audio just to change the individual EXPR objects to furtherly complex it....

I don't think this abstraction is what you're looking for, but maybe
it's useful. (If you can be a little more clear in your request, if it
is a request, then you should try.) Haven't used it in a while but it
should be pretty easy to figure out. I call the below patch [xpr]
because I'm super-creative.

I also made a vexpr version and a js version. The js doesn't need to
interrupt anything, but it's not as fast IIRC... (The js version is a
cheap arbitrary injected-function grapher that's supposed to have
universal scaling, but that part is not quite right because I haven't
put the effort in. It's also a security nightmare.) Let me know if you
want either of those, or if someone wants to fix the js up properly.

Max Patch
Copy patch and select New From Clipboard in Max.

Stefan Tiedje's icon

enth lojeek wrote:
> i've tested these equations in syd, they work fine with the ƒ(x)
> module
>
> cos(t*156*tan(145*t))
>
> tanh(cos(t*106/cos3(430*t)))

You got at least some math ;-)
The equations look a bit like a waveshaper. You could look into
waveshaping and use the equations for altering the transfer function in
a buffer. I think there are some examples in the examples folder...

If you want to do it directly, beware that MSP rate is fast and these
math functions are expensive. Usually a wavetable is much much much more
effective...

Hope this helps...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com