Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 14:15
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Sound Input Level meter
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Fri 13 Apr 2012, 23:09    Post_subject:  Sound Input Level meter  

A simple visualisation for the sound input level (e.g. microphone input, etc). Good to check whether your input is working or in the correct range.
Note: please close this before you start the actual application (recording, voip, or whatever) as the script uses arecord, and arecord blocks other applications from doing their work.

EDIT: two packages now provided, one for 32-bit puppies and one for 64-bit puppies (fatdog).

EDIT: updated to version 1.1, remove the stereo files - thanks for OscarTalks for reporting the bug.
alsa-input-level-1.1-x86_64.pet
Description  package for 64-bit puppies
pet

 Download 
Filename  alsa-input-level-1.1-x86_64.pet 
Filesize  27.15 KB 
Downloaded  294 Time(s) 
alsa-input-level-1.1.pet
Description  Updated package for 32-bit puppies
pet

 Download 
Filename  alsa-input-level-1.1.pet 
Filesize  25.16 KB 
Downloaded  412 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread

Edited_times_total
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Fri 13 Apr 2012, 23:13    Post_subject:  

If you can't be bothered with stdbuf and GUI, just open terminal and do this:
Code:
arecord -vv /dev/null

There is your input level meter. Of course, as above, you need to stop this before starting your actual application.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Sun 15 Apr 2012, 02:19    Post_subject:  

Updated post for 32-bit systems too.
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
Master_wrong

Joined: 19 Mar 2008
Posts: 456

PostPosted: Sun 15 Apr 2012, 02:35    Post_subject:  

thanks... I do realize that during recording video using tv-tuner i have to use :
Quote:

amixer set Capture 2%

v4lctl volume mute off

ffmpeg -y -f oss -i /dev/dsp -itsoffset 1 -acodec pcm_s16le -f video4linux2 -s 640x480 -r 15 -qscale 5 -vc 1 -tvstd PAL-DK -i /dev/video0 -sws_flags bicubic -ss 00:00:03 -t 00:00:15 -f avi test.avi


other wise the sound would be terrible.

even with my script, it is "just ok" quality. do you have any suggestion ?

thanks

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send_private_message 
OscarTalks

Joined: 05 Feb 2012
Posts: 901
Location: London, England

PostPosted: Sun 15 Apr 2012, 21:16    Post_subject:  

Hello JamesBond,

Thanks for that. A useful little tool. A lot of people seem to report problems with sound input and this is a nice way of providing an indication of what (if anything) is happening.

By the way, is there any chance that you might be able to offer help and advice regarding PSIP at some stage please? Cheers!

_________________
Oscar in England

Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Mon 16 Apr 2012, 11:05    Post_subject:  

@Master_Wrong, I can't help with that, I don't have tvtuner myself. But I suggest you try to capture from alsa (-f alsa) instead of from OSS (-f oss) if your tvtuner supports it.

@OscarTalks, yes, I'd like to help but I'm a bit busy right now. I will see what I can do. Haven't been in the PSIP forum for a few months Wink

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
OscarTalks

Joined: 05 Feb 2012
Posts: 901
Location: London, England

PostPosted: Mon 16 Apr 2012, 12:28    Post_subject:  

Installed your sound input meter in Saluki 019. Is it supposed to be saving the audio as a .wav file called "stereo" in root? Mine did. Deleted it of course.
My PSIP disappeared completely from the menu as well which was strange. Had to uninstall and re-install PSIP in PPM. Just wondering if my installing this tool had anything to do with it as I hadn't done much else. EDIT, just noticed, looks like my Precord may have gone for a burton as well. Uninstalled and re-installed to get it back.

_________________
Oscar in England

Back to top
View user's profile Send_private_message 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Mon 16 Apr 2012, 20:38    Post_subject:  

OscarTalks wrote:
Installed your sound input meter in Saluki 019. Is it supposed to be saving the audio as a .wav file called "stereo" in root? Mine did. Deleted it of course.

No, it's not supposed to do that. My stupidity of course. Fixed Very Happy
Quote:
My PSIP disappeared completely from the menu as well which was strange. Had to uninstall and re-install PSIP in PPM. Just wondering if my installing this tool had anything to do with it as I hadn't done much else. EDIT, just noticed, looks like my Precord may have gone for a burton as well. Uninstalled and re-installed to get it back.
I haven't tried it on Saluki yet, but it isn't supposed to do that. It's just a simple one-line script file. I used Fatdog64 to package the pet, perhaps it's a bit too old and the PET format no longer works for newer puppies. Anyway, you can just get the PET, extract it manually (tar -xvf alsa-input-level.pet) and copy the files to /usr/bin/ (and the desktop files to /usr/share/applications).

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
Pelo


Joined: 10 Sep 2011
Posts: 3224
Location: Mer méditerrannée (1 kms°)

PostPosted: Fri 29 Aug 2014, 03:53    Post_subject: rien, rien de rien. niet audio
Sub_title: Sound Input Level Meter
 

Sound Input Level Meter, alsamixer, retrovol, precord, i give up.
NO, succes with Sound Input Level Meter.
But my voice is weak, very weak (up to 5% only...)

_________________
Puppy, il ne lui manque que la parole !

Edited_time_total
Back to top
View user's profile Send_private_message YIM 
greengeek

Joined: 20 Jul 2010
Posts: 2596
Location: New Zealand

PostPosted: Fri 29 Aug 2014, 04:15    Post_subject: Re: rien, rien de rien. niet audio
Sub_title: Sound Input Level Meter
 

Pelo wrote:
Sound Input Level Meter, alsamixer, retrovol, precord, i give up.
Pelo - can you try a different machine? Surely there must be something funny with your hardware???

Can you plug in a usb soundcard ($4 on ebay) and see if you have different results?

@jamesbond - I see "Alsa input level" in my Multimedia menu but if I click it my system hangs (except the mouse which still moves). I have to use CtrlAltBkspace then xwin to get going again. Have you seen such a symptom?? (This is on Slacko 5.3)

I found the best way to run this was to create a script as follows:
Code:
#!/bin/bash
urxvt -e arecord -vv /dev/null &

When I click that it works well.
Thank you!
.
Back to top
View user's profile Send_private_message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 29 Aug 2014, 05:38    Post_subject: Re: rien, rien de rien. niet audio
Sub_title: Sound Input Level Meter
 

greengeek wrote:


I found the best way to run this was to create a script as follows:
Code:
#!/bin/bash
urxvt -e arecord -vv /dev/null &

When I click that it works well.
Thank you!
.


As forum member SFR discovered, you should avoid using that command because it causes the special file /dev/null to be overwritten with a text file of the same name, which can cause serious system errors for some other apps. A workable way of using arecord VU meter is described in the following link:

http://www.murga-linux.com/puppy/viewtopic.php?p=784147&search_id=273583738#784147

Note that Bacon Recorder VU meter code has the same error overwriting /dev/null, the VU meter code used in both Precord and pAVrecord, however, already contains the above fix.

William

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send_private_message Visit_website 
jamesbond

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Fri 29 Aug 2014, 06:10    Post_subject:  

Haha, a revival of 2 year old thread - finally the original poster is still around Laughing

@mcewann - thank you, you're right. I found a simpler fix, though, at least for the version of arecord that I have:
Code:
arecord -vv > /dev/null


@greengeek - make sure you have "stdbuf". Here's the fixed version of alsa-input-level GUI:
Code:
#!/bin/sh
exec arecord -vvv 2>&1 > /dev/null | stdbuf -o0 sed '/%$/ !d' | Xdialog --title "Sound Input Level" --progress "Close this when done, before starting recording." 0 0

If you don't have stdbuf then this won't work.

@Pelo - make sure your remove $HOME/.asoundrc (that would be removing /root/.asoundrc, /root/spot/.asoundrc) and also /etc/asoundrc. If you can post the content of your "/proc/asound/cards" - that would help too.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 29 Aug 2014, 06:19    Post_subject:  

jamesbond wrote:

@mcewann - thank you, you're right. I found a simpler fix, though, at least for the version of arecord that I have:
Code:
arecord -vv > /dev/null



Yes, we tried that too, but that only works for some versions of arecord. As far as I recall that code worked in recent Slacko but not in Precise. I'll try it again sometime to double check though. The solution adopted at present at least, whilst a bit complicated is a workaround that works everywhere so far.

William

EDIT: This is the note I took from previous conversations about this. The additional issue is that vu-meter output gets mixed with general data in alsa version < 1.0.26 so gets discarded altogether when construct >/dev/null is used:

Quote:
However in Slacko it's perfectly fine.
1.0.25 (Precise/DDog) vs. 1.0.26 (Slacko) would make such a difference..?
Perhaps the relevant change (though it says only 'aplay') was:
Quote:
aplay: print vu-meter to stderr, not stdout

Src.: http://www.alsa-project.org/main/index.php/Changes_v1.0.25_v1.0.26

If that's the case, then in Alsa < 1.0.26 vu-meter gets mixed with actual data (at least if there's no output file specified) and that's how it looks like in terminal, and most likely that's why >/dev/null discards both elements.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Fri 29 Aug 2014, 06:30    Post_subject:  

jamesbond wrote:
Haha, a revival of 2 year old thread - finally the original poster is still around :lol:


Whilst not the same thread, its actually a revival of an over six year old topic ;-)

http://murga-linux.com/puppy/viewtopic.php?p=373193#373193

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send_private_message Visit_website 
gcmartin

Joined: 14 Oct 2005
Posts: 4368
Location: Earth

PostPosted: Fri 29 Aug 2014, 12:05    Post_subject: Shouldn't this be a simple part of WOOFCE?  

@Jamesbond made this several years ago when several of us were struggling with identifying sound in our desktop use. This has been a great tool and is practical.

Every PUP should come with this built into its Menu as many/most in the community have progressed to a point where we need this as a tool insuring the system can see audio/mic input. I think we all understand the value of this, hence it was presented to us by @Jamesbond.

Couple of things:
  • Its a Puppy exclusive script
  • It has excellent value in its presence
  • It carries so few instructions that it ISO weight is too small to measure
  • It has NO system performance impact as it is simple a test tool
  • Every PC/Laptop/Netbook/etc comes with Microphone ports
Sound recording on the motherboard is now over 20 years old. This simple tool should be a basic part of all PUPs from this point forward, one would think, to eliminate/reduce developer support for any user need.

Users/developers shouldn't have to hunt for this thread for something that is so simple and widespread.

Questions
  • How does something like this get presented and included in WOOFCE such that it results in all PUPs?
  • Does this tool need amending for ALSA or Retrovol or ... version level(s).
I know I did this before when wrestling with this in a prior FATDOG, BUT AGAIN, THANKS @Jamesbond Very Happy

Cheers!

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0986s ][ Queries: 13 (0.0043s) ][ GZIP on ]