Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630

    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:
    Code:
    arecord -vv -D plughw:0,0
    And all I wind up with is 00%.
    Does anyone know of an easy way to get vu metering from one's sound card from the command line?

    Thanks.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  2. #2
    Linux 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.

  3. #3
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    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
    Linux Mint + IceWM Registered: #371367 New Members: click here

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    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!
    Linux Mint + IceWM Registered: #371367 New Members: click here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •