Author Topic: left/right meter  (Read 4675 times)

Titeuf

  • Posts: 4
left/right meter
« on: 24 Mar '03 - 14:37 »
How to get the left/right meter in VB6 ?

ipuiuna

  • Posts: 8
Re: left/right meter
« Reply #1 on: 24 Mar '03 - 17:46 »
I want to do this in delphi.... :-[

bigjim

  • Posts: 232
Re: left/right meter
« Reply #2 on: 24 Mar '03 - 18:06 »
The answer is in the bass help file- to get the level of the left and right channel of a stream use:
BASS_ChannelGetLevel

in delphi something like this:

Code: [Select]

procedure timer1.........
var
level : DWORD;
begin
 level := BASS_ChannelGetLevel(stream_handle);
 label1.caption := IntToStr(LOWORD(level));
 label2.caption := IntToStr(HIWORD(level));
end;

bdinnocenzo

  • Posts: 5
Re: left/right meter
« Reply #3 on: 24 Mar '03 - 22:27 »
Are you looking for a meter control, or how to get the VU levels from BASS?

If you need the control, I created a simple control that I could send you.  It has a few properties like LeftLevel, RightLevel and MonoLevel.  It also has one method 'Off' that dims all the "LEDs".  It can be used horizontally or vertically and it can be resized to some degree.

-Bill


Titeuf

  • Posts: 4
Re: left/right meter
« Reply #4 on: 25 Mar '03 - 08:41 »
Yes I'm OK for your control if you can send me !

(excuse my english I'm French)

ipuiuna

  • Posts: 8
Re: left/right meter
« Reply #5 on: 26 Mar '03 - 13:44 »
please send to me too

thanks

lagarto

  • Posts: 34
Re: left/right meter
« Reply #6 on: 30 Mar '03 - 05:48 »
----In Timer-----
Dim VU As Long
Dim L , R As Single

  VU = Bass_ChannelGetLevel(Handle)
  L = Int(GetLoWord(VU))
  R = Int(GetHiWord(VU))
  Label1.Caption = L
  Label2.Caption = R ;D

bdinnocenzo

  • Posts: 5
Re: left/right meter
« Reply #7 on: 31 Mar '03 - 09:35 »

Quote

----In Timer-----
Dim VU As Long
Dim L , R As Single

  VU = Bass_ChannelGetLevel(Handle)
  L = Int(GetLoWord(VU))
  R = Int(GetHiWord(VU))
  Label1.Caption = L
  Label2.Caption = R ;D


Please note that although the logic above is correct, the declaration statement "Dim L, R As Single" actually declares L as a variant and R as a single.  The proper way is Dim L as Single, R as Single.  This is a common mistake and one that usually does not cause problems, but can.

As for the requests for the ActiveX control for the LED bars, I will post them on my web site at http://www.laidbackradio.net/beta/VUBars.zip.  It's simple to use.  The input to the channels is 0 to 10 for off to all on.

-Bill