Page 2 of 2
Re: MeterGadget.pbi, create analog style meters for your pro
Posted: Fri Mar 29, 2013 9:01 pm
by Simo_na
BasicallyPure 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
Thank you
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))
......
Re: MeterGadget.pbi, create analog style meters for your pro
Posted: Sat Mar 30, 2013 10:58 pm
by Simo_na
Hi, I would like to pass the X and Y variables below
Code: Select all
.....
EndIf
position = Radian(0.9 * position - 45)
x = \mid_X + Sin(position) * (\arcRadius)
y = \height - Cos(position) * (\arcRadius)
StartDrawing(CanvasOutput(GadNum))
....
@ this point...
Code: Select all
.....
py = \height - Cos(Radian(angle)) * (\arcRadius - 5)
x = \mid_X + Sin(Radian(angle)) * (\arcRadius + 5)
y = \height - Cos(Radian(angle)) * (\arcRadius + 5)
LineXY(px, py, x, y, \scaleColor)
------> . <------ here
DrawingFont(FontID(\scaleFont))
x = \mid_X + Sin(Radian(angle-1)) * (\arcRadius + 20)
y = \height - Cos(Radian(angle-1)) * (\arcRadius + 20)
DrawRotatedText(x, y, Str(angle/9 + 5), -angle, \captionColor)
angle + inc
Until angle > 45
......
what method can do that ?
i've used *null = @null and PeekL (*null) but it is volatile....

Re: MeterGadget.pbi, create analog style meters for your pro
Posted: Wed Jul 24, 2013 10:00 pm
by minimy
Some boby know how take the peaks from the speakers output? not mic, speakers please.
is possible that without external libraries, using the Windows API?
Thanks friends!!
Re: MeterGadget.pbi, create analog style meters for your pro
Posted: Wed Jul 24, 2013 11:03 pm
by BasicallyPure
minimy wrote:Some boby know how take the peaks from the speakers output? not mic, speakers please.
This is the only help I have to offer.
http://www.sevenforums.com/tutorials/20 ... nable.html
BP
Re: MeterGadget.pbi, create analog style meters for your pro
Posted: Sun Aug 25, 2013 8:12 pm
by minimy
Thank you very much, you help me a little smoothing the way, but still do not know how to access the audio output. Even so thank you very much BasicallyPure !