Page 1 of 1

Formula Module - help please

Posted: Tue Sep 22, 2020 3:04 pm
by Sas2506
I appreciate that there is a very early post about all the various functions regarding the Cherry Audio FORMULA module, but to be honest I am not a programmer and do not understand it... I would like to take Input X and Input Y, compare them, and have the MAX or MIN value of the two as the Output.... what should I type in as my formula? (sort of IF X>Y THEN OUTPUT = X, ELSE Y). THANK YOU!!

Re: Formula Module - help please

Posted: Tue Sep 22, 2020 11:03 pm
by schoekah
I started a thread on this a few months ago in the module/cherry audio forum, and got a response that I couldn't figure out either. I hope you do better than me!

Re: Formula Module - help please

Posted: Wed Sep 23, 2020 1:22 am
by Cherry Dan
Hi there,
Sas2506 wrote: Tue Sep 22, 2020 3:04 pm I would like to take Input X and Input Y, compare them, and have the MAX or MIN value of the two as the Output.... what should I type in as my formula? (sort of IF X>Y THEN OUTPUT = X, ELSE Y). THANK YOU!!
Enter this formula:

max(x,y)

..and you'll get the max of those two inputs!

min(x,y)

..will return the minimum value between those two inputs. Also,

max(x,y,z)

..will give the max value of all three inputs.

Hope that helps!
- Dan @ Cherry Audio

Re: Formula Module - help please

Posted: Wed Sep 23, 2020 4:46 am
by Sas2506
Thank you Dan....that certainly is simple and answers my question. Much appreciated. It is obviously a very powerful module, but the lack of documentation means it will be overlooked by many. The link to the originators parser site is meaningless to me as I dont know Java or C++.. Is there anything more you can share which will help me get more use out of it? Thanks again.

Re: Formula Module - help please

Posted: Wed Sep 23, 2020 6:04 am
by schoekah
Sas2506 wrote: Wed Sep 23, 2020 4:46 am Thank you Dan....that certainly is simple and answers my question. Much appreciated. It is obviously a very powerful module, but the lack of documentation means it will be overlooked by many. The link to the originators parser site is meaningless to me as I dont know Java or C++.. Is there anything more you can share which will help me get more use out of it? Thanks again.
Yeah, out of character for CA that there's no documentation after this long.
Using CA Dan's example though, I've been able to figure a few things out:

SOME GOOD REFERENCE PAGES:
math table of contents: http://mathparser.org/mxparser-math-collection/
basic operators: http://mathparser.org/mxparser-math-col ... operators/
using variables: http://mathparser.org/mxparser-math-col ... functions/

things from these pages that I've gotten to work (using dc source and monkey business audio's free volt meter)
add(x,y)
x+y
y*1.2
min(x,y)
mean(x,y)

anyone figures out how to use random variables or log functions, please let me know, thx

Re: Formula Module - help please

Posted: Fri Sep 25, 2020 9:51 am
by andro
I don't think in principle this module can support random functions like [Uni] and so on because it has no trigger input - it's continuously sampling the input voltage and calculating the output according to the formula. An input voltage would be entirely unrelated to a random output, so i would say that
is why CA has not implemented these functions. Would that be so CA?

So for random CV voltages we need to look to other modules.

Re: Formula Module - help please

Posted: Fri Sep 25, 2020 10:28 am
by HowlingMod

Re: Formula Module - help please

Posted: Fri Sep 25, 2020 4:57 pm
by honki-bobo

Re: Formula Module - help please

Posted: Sat Sep 26, 2020 12:06 am
by andro
HowlingMod wrote: Fri Sep 25, 2020 10:28 am perhaps this one:

https://store.cherryaudio.com/modules/coder
That would work because it has a trigger.

Re: Formula Module - help please

Posted: Sat Sep 26, 2020 12:57 am
by schoekah
thanks all!
(before anyone mentions it, I'm enjoying the random functions of S&H, and LFO, Turing, etc. Just was disappointed I couldn't get anything out of the [uni] function. thanks again! (and for the volt meter honki-bobo))