dB Level + Level with expr object
Hi.
I am a newbie to Max, having been using it for two weeks.
I making microphone to ADC calculator that is like Neumann Recording tools.
https://www.soundonsound.com/reviews/neumann-recording-tools
I would like to do the math like this
10log(10^(Level A/10)+10^(Level B/10)
I struggled with it for about half an hour, but in the end I couldn't figure it out.
I'm sure it can be done, but I can't help me.
Does anyone know anything about this?
open the console, then expr will throw a (more or less explaining) error message about what it doesnt like.
"10. log()" is for sure illegal. :)
you can use as much extra spaces as you want, but a number and a function require a * between them if you want to say "multiply": 10*log()
in case you wanted to use log10, that is written log10()
and while that was not your question, note that there is no real industry standard for "dbu", or rather only one for telephone lines (and that is not very similar to analog synthesizers or line level or whatever your reference is. ;) )
also (i am an expr lover myself but...) there are fine non-signalrate [dbtoa] and [atodb] objects, which implement the usual log10()*20, which all audio software uses to convert to linear.
if you start from those, you can be sure that you at least have that right, and then you can later still hack everything into a oneliner after the algo works. (that whole patch fits into a single expression, btw.)
You've helped me figure it out!
Thanks!!