Results 1 to 4 of 4
This has been a huge head scratcher for me!
There are "GUI" vu meters out there for linux and I've tried what appears to be the simplest, but it required ...
- 07-10-2010 #1
All I want is a simple command line VU meter!
This has been a huge head scratcher for me!
There are "GUI" vu meters out there for linux and I've tried what appears to be the simplest, but it required "jack" and that was far more than I was willing to get into since the box it is needed for has limited resources and hard drive space. Next I've tried arecord and understand it can be used as a vu meter but it's not working for me at all. My card is at hw:0,0 so I've tried:
And all I wind up with is 00%.Code:arecord -vv -D plughw:0,0
Does anyone know of an easy way to get vu metering from one's sound card from the command line?
Thanks.
- 07-16-2010 #2Linux User
- Join Date
- Mar 2008
- Posts
- 287
All I want is a simple command line VU meter!
Don't know what you are measuring but presuming it is in real time. A script using the following is what I have frequently used for such stuff.
Reserve a line (can be done vertically too; see following commands) to be used say line 1 on the screen (very top is line 0). Note: <esc> is keys ctrl-V followed by the ESC key.
Using echo -e "<esc>[nd" where n is the line number used (1) and
echo -e "<esc>[n:mf" move cursor to line number: n and column number: m. f is the command.
Then presuming 50 colums = 100% of what you measure, value/maxVal*100/2 gives the column
of the current value
Then echo -e "<esc>[nm" here n is now 30-37 (foreground colors) and m is just the command will placd that color in that column.
I'll leave it up to you to fill in the preceding columns and use the foreground color which matches the background to erase to the right (sorry should've said this builds left to right but can be done otherwise if you keep good track of the column numbers).
Hope that helps.
- 07-16-2010 #3
Thanks for the tips clickit! I fiddled with it some more and ultimately got what I wanted and even dressed it up a little inside xterm:
Code:xterm -sb -rightbar -fg yellow -bg black -e arecord -f cd -d 0 -vv /dev/null
- 10-21-2010 #4
Just an update for those who have also been looking for a Linux VU solution in a streaming situation. I've found an app that so far is doing everything I need and more!
Butt!
This great little encoder requires very little to get going, fires right up without complaints and is available for Linux, Mac and Windows! It encodes to streaming servers such as Shoutcast and Icecast and is very easy to configure. Best of all, it has a built in VU Meter! I've been doing trials with it and although it isn't a command line app, it has exceeded my expectations.
I love butt!


Reply With Quote
