What mValue.mVUMeter (0..1) means what value in dB

page.mHostAccess.mTrackSelection.mValue.mVUMeter

returns a value between 0 and 1

Has anyone ever drawn up a table showing which values between 0 and 1 correspond to which values in dB?

Hi, I haven’t done such table, however, I did use the mOnDisplayValueChange of the vuMeters to send midi messages to a controller (Komplete Kontrol MK2) receiving 0-127 values.

I basically did linear approximations, but it does work to a decent extent.
Not sure if it would be useful, but you can have a look about the conversion in this snippet.

channel.mValue.mVUMeter.mOnDisplayValueChange=function(activeDevice,activeMapping,arg2,arg3){
            
            //just approximations here, I didn't want to put pressure by calculating logarithms. Also, we don't get real stereo levels here (R/L)

            var value=0
            var vu=-96
            
            if(!isNaN(arg2)){
                
                vu=1*arg2
            
            }
            
            if(vu>0){
            
                value=107+vu*3.32
            
            } else if (vu>-6){
            
                value=107+vu*3.83
            
            } else if (vu>-12){
            
                value=100+vu*2.67
            
            } else if (vu>-24){
            
                value=98+vu*2.5
            
            } else if (vu>-48){
            
                value=60+vu*0.92
            
            } else {
            
                value=32+vu/3
            
            }

            controllerVariables.vuMeters[this.channelIndex]=value 
            
            Helper_updateVUMeters(activeDevice)
            
        }.bind({channelIndex})

3 Likes

Yes, this is useful for me.
If I divide value by 127, I get my correct floating range between 0 and 1.
Thanks, m.c

1 Like

Hi m.c,

I used your calculation-formulas in an excel-table.
You can see what it looks like in the zip-file in the xlsx-file.
That looks pretty good, although I need it quite precisely for my use case, but I can adjust that later.

One more import question:
Are these assignments identical for you
if you change the project setting ‘max. volume’ from +6 dB to +12 dB ?

dB - value.zip (10.4 KB)

From a small testing here, I didn’t see different values with both settings.

Generally, I don’t see exact values every time I run a test signal, though they do seem to be OK at 3 digits. Note that the range (0-1) seems to be coming from 24-digits integers.

Furthermore, I don’t see exact logarithms appearing in my calculations based on the original formula for db, so I somehow suspect there is a mixture of approximations per db sections, but only a Steinberg dev would confirm or give more precise info about it. Or perhaps a more experienced user with these levels.

2 Likes

I have now run a few more tests.
My tests are based on a value range from 0 to 1.

If I analyze a signal that increases from -oo dB, I first get a value at -86 dB,
which in my case is 0,000035357054.

And at exactly +3 dB I reach the value 1,0.

If I use this to calculate a logarithmic distribution between -86 dB and +3 dB, I get the following table, which fits quite well if I check some examples of this:

0,000035357054    A = determined manually for -86 dB
1,000000000000    B = determined manually for +3 dB
1,011583442589    logarithmic factor per 0,1 dB = (B/A)^(1/89)^0,1
1,059274606811    logarithmic factor per 0,5 dB = (B/A)^(1/89)^0,5
1,122062692634    logarithmic factor per 1,0 dB = (B/A)^(1/89)
1,259024686201    logarithmic factor per 2,0 dB = (B/A)^(1/89)^2

dB    value
+3    1,000000
+2,5  0,944042
+2    0,891216
+1,5  0,841345
+1    0,794266
+0,5  0,749820
+0,4  0,741234
+0,3  0,732747
+0,2  0,724356
+0,1  0,716062
 0    0,707862
-0,1  0,699756
-0,2  0,691744
-0,3  0,683823
-0,4  0,675992
-0,5  0,668252
-1    0,630858
-1,5  0,595556
-2    0,562230
-2,5  0,530769
-3    0,501069
-3,5  0,473030
-4    0,446560
-4,5  0,421572
-5    0,397982
-6    0,354688
-7    0,316103
-8    0,281716
-9    0,251070
-10   0,223757
-11   0,199416
-12   0,177723
-13   0,158389
-14   0,141159
-15   0,125803
-16   0,112118
-17   0,099921
-18   0,089051
-19   0,079364
-20   0,070730
-22   0,056179
-24   0,044621
-26   0,035441
-28   0,028149
-30   0,022358
-32   0,017758
-34   0,014105
-36   0,011203
-38   0,008898
-40   0,007067
-42   0,005613
-44   0,004459
-46   0,003541
-48   0,002813
-50   0,002234
-52   0,001774
-54   0,001409
-56   0,001119
-58   0,000889
-60   0,000706
-62   0,000561
-64   0,000446
-66   0,000354
-68   0,0002811
-70   0,0002232
-72   0,0001773
-74   0,0001408
-76   0,0001119
-78   0,0000888
-80   0,0000706
-82   0,0000560
-84   0,0000445
-86   0,0000354

dB - value.zip (9.9 KB)

4 Likes