General

The formula for the 100dB stroke fader?

Started by jjlemur on .

Sign in or create an account to join the conversation.

12 posts

Topic starter
Hi guys,

I am making a remote control surface for a digital mixing software.
I want to put "monitor"s for mixing faders' positions in dB as the real console shows, but I don't know what formula I can plug in.

I think it's some sort of Log function but I can not figure out or find the resources.
The fader is -90dB(infinite) to +10dB.

Also, if anybody knows how to make a formula for the panpot(bipolar), which shows L100 -0- R100. I don't need L/R but at least want to have it show 100 -0- 100.

Thank you so much.

JJ
Wow, amazing! Thanks MM.

20*(log(x*127/108))*6/3.241 is great.

But I am wondering if this can be slightly altered so it shows from inf.(-90dB) to +10dB.
Do you know? I tried some, but never reached the correct one...

Thanks!

JJ
Hey Phil999,

Thanks to you too! I needed to know that. It looks great.
But do you know if it can be 100 to the both side L/R? Not like -100 -0- 100?

Or I wonder if we can put texts before those values, like "L"100 and "R"100

Thanks so much!

JJ
jjlemur wrote: But do you know if it can be 100 to the both side L/R? Not like -100 -0- 100?
I'm sure it can be done, but I don't know yet how to express it. You need to multiply with -1 if the value is negative.
Thanks guys!

I tried "()", but it doesn't change anything. Still I have -100 at Right side.

I put like "(100-pan.x*200)" in the item of "value=".

Am I doing something wrong way or misunderstood?

I really appreciate your help!

JJ
jjlemur wrote: I put like "(100-pan.x*200)" in the item of "value=".
It must start with -100, so that it will display 0 in the center position when multiplied with 200.

-100+pan.x*200

to get absolute values (values >=0), write

abs(-100+pan.x*200)
Thanks guys!

I got the C-programming from the manufacturer instead the formula. I don't know if it works or even where I can plug those information in my fader on the Lemur app fader. Could you guys help me out?

It is like this-

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

float DoUnlog(float val) {return (float) pow(10.0f, val/80.0f);}

static float MapFloatValue(float v)
{
const float _minLogResult = DoUnlog(-90.0f);
const float _maxLogResult = DoUnlog(+10.0f);
return (DoUnlog((v*100.0f)-90.0f)-_minLogResult)/(_maxLogResult-_minLogResult);
}

static float GetPositionPercentForDecibelValue(float dB)
{
return MapFloatValue((dB+90.0f)/100.0f);
}

int main(int argc, char ** argv)
{
if (argc < 2)
{
printf("Usage: ./a.out -15dB\n");
return 5;
}

float dB = atof(argv[1]);
float percent = GetPositionPercentForDecibelValue(dB)*100.0f;
printf("%.02fdB corresponds to a fader position at %.02f%%\n", dB, percent);
return 0;
}


Thanks for your help!

JJ
Hi guys,

Or even I got this information. Can we get any formula from these data?
10.00dB corresponds to a fader position at 100.00%
0.00dB corresponds to a fader position at 73.50%
-10.00dB corresponds to a fader position at 53.63%
-90.00dB corresponds to a fader position at 0.00%

Thanks
JJ