[Gambas-user] How to display a VU meter

RICHARD WALKER richard.j.walker at ...247...
Tue Jun 12 20:03:14 CEST 2012


On 12/06/2012, Grant Taylor <zl1wtt at ...43...> wrote:
> reinvent the wheel. I have put together a Media viewer program in Gambas
> using the Mplayer plug-in. I need to display two channel VU meter
> display within this viewer.

If you want to use volume unit metering then the best place I can
think of to find out how to implement that law is the meterbridge
code. I would have said the same thing if you were intending to
implement peak programme meters too :-)

To quote snippets from Steve Harris meterbridge page:
"PPM - Peak Program level Meters. Approximatly conforming to BS 6840-10.
VU - Volume Unit meters. Conforming to BS 6840-17:1991."

> Do know of any examples of code that will do this? so I can get an
> understanding of how read information from sound cards devices and get a
> starting point to work from. I'm just not sure what is involved to read data
> from the sound mixer to do this.
>
Kjetil Matheussen has written a program called jack_capture which
provides a curses based level indicator for which I believe he got the
inspiration from meterbridge. Once you have your data in your program
then either of these metering examples should show you how to handle
the arithmetic.

Gambas uses the SDL library for handling sound and music, but it seems
only to expose a very high level view of the process. That is good for
simple stuff. Perhaps you could check out the SDL documentation and
the Gambas implementation of Channels.Volume. If that can act on the
data then maybe it could point the way to how you would read the same
data and display it in a meter.

On the face of it it looks like the gb.media component might give you
a way to implement your meter as a gstreamer plugin. That could be a
better way to go - but I am really only guessing ;-(

My skills are limited to things like the Gambas front end I am writing
for the jack_capture command and if I need metering I will probably
embed an instance of meterbridge.

Richard




More information about the User mailing list