Thank youBasicallyPure wrote:
If the input signal value is one half of full scale then the dB is calculate like this.
dB = 20 * Log10(0.5)
the result is -6 dB.
So if full scale is +3 then half scale is +3 dB subtract 6 dB gives -3 dB.
This is the value shown at half scale on the VU scale.
BP
I have understand correctly ?


Code: Select all
.........
For cnt=0 To #N
outputarray(cnt)=(IMX(cnt)*IMX(cnt))+(REX(cnt)*REX(cnt))
Next
SortArray(outputarray(),#PB_Sort_Descending)
media1=(outputarray(0))
;my_log=(20*Log10(media1/44100*4096)*1.081) ;old code
;my_log = (media1 / 8192)
my_log= 20 * Log10(media1 * 0.5)
SetMeterState(my_ll,my_log)
EndProcedure
.......
EDIT
i've modified few lines...
now seems work fine... (i'm waiting your approbation....

thank you.
....
#SAMPLE_RATE=32767
....
flags=#MTR_STYLE_VU | #MTR_STYLE_LED | #MTR_NEEDLE_VAR1
.....
rex(i2)=(value/#SAMPLE_RATE)
.....
my_log=(20*Log10(media1*0.14))
......