Jump to content

db to linear scale


skavan

Recommended Posts

A bit of a wacky question.

Cakewalk faders run from +6db to -INF in a relative db scale.

But of course they are linear faders.

I am building a software equivalent of the Mackie MCU.

I can happily receive and translate the cakewalk midi stream such that a value of 16368 equals +6db and 2352 equals -36db and 0 equals -INF.

Could someone at Cakewalk tell me the two formulas used by the engine: linear value to db (a log function) and db to linear value (an exponential function).

There are several standards out there -- but I don't think Cakewalk uses those. 

Thanks in advance!

s.

Link to comment
Share on other sites

  • 2 weeks later...
On 6/6/2020 at 7:03 PM, msmcleod said:

I can't remember if the Mackie does any scaling at all for the fader values before it sends out or not, but the formula for going between a linear  & db scale is pretty standard:

https://sound.stackexchange.com/questions/38722/convert-db-value-to-linear-scale

 

Thanks very much for the reply.

Unfortunately,  while you are correct about the "standard", cakewalk doesn't seem to use it.  (The mackie isn't the issue, its Cakewalk).

If you do a screenshot of the cakewalk fader strips, they go from INF to +6. Once can approximately measure the linear location of each label (-24, -12, -6, 0 etc..).

Doesn't even closely resemble the formula!

Cakewalk seems to have its own logic...and that's what I'm trying to get some insight into.

The Mackie is just a dumb strip. It's labels don't conform to cakewalks -- it just sends an receives an integer between 0 and 16368 .

Hopefully, someone who touches the code can copy and paste the formula. I tried reverse engineering it, by building an x, y scatter plot and i get:

image.png.98c2c40409dd0016f3c138bdc817298b.pngy = 21.148ln(x) - 199.66, where y is dB and x is a linear value between 0 and 16368

But that formula seems totally wacko - even though it has an r^2 of 0.997.

s.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...