|
From: Chris B. <ch...@cn...> - 2008-02-11 09:03:27
|
Andreas Mock wrote: > Is there a way to do something like VU meter? I want to adjust the > microphone volume so that no clipping occurs. Is there something? > Can I interpret raw-format for that like 'rec -c 1 -t raw | vuscript'? > > A VU meter is kinda a cool idea but I've never seen another command line app implement it. It wouldn't be to hard to implement inside of SoX but you'd lose the current status you get during recording. The VU would have to fit on 1 line to work to erase previous date. A seperate program like you mention is probably a better idea. Anyways, what your probably looking for is just the maximum value you received over some range of audio. I haven't tried this but it should work: rec -n stat Run that and after you've finished playing your loudest audio, type ctrl-c. It should print out information about your audio including how much clipping occured. There is "Volume adjustment" field printed. The thats 1.0 or less then you've pegged your VU meter. You can adjust recording volume until you see that value greater then 1.0 which means you've never clipped. Its not as useful as a VU meter though since we all don't mind a small amount of clipping if its just a one time burst. Chris |