I want to integrate this formula in Max:
Δ L in dB = 20 × log (Distanc r2 / Distanc r1)
which object can I use to achieve the result of this calculation.
Thank you very much for your answers
I would say look into the [expr] object. Something like this probably: [expr 20 * log($f1 / $f2)]
and if you still need to calculate the distance r2 and r1: [expr sqrt((pow(($f1 - $f3),2) + pow(($f2 - $f4) ,2)))] where $f1 and $f3 are r1.x and r2.x and $f2, $f4 = r1.y and r2.y
I think that should work (none of those are tested in max), but then again, my math skills aren’t all that polished ;)
Expr will do it, but you need to use log10 instead of log (log is natural log).
Might as well use vexpr, though since if you ever need to process lists of distances, you can do all your calculations in one place…
vexpr 20.*(log10(abs($f1/$f2))) @scalarmode 1
That works great, I am happy! Thank you very much.
C74 RSS Feed | © Copyright Cycling '74