[linux-audio-user] Lower Output Level after Mono to Stereo Conversion with SOX

Martin McCormick martin at dc.cis.okstate.edu
Wed Jun 9 08:50:10 EDT 2004

Malcolm Baldridge writes:
>It's most likely a consequence of being run through a filter.  Remember,
>filters generally REMOVE power rather than add it.  And even though you're
>upsampling, some filtering is being done to eliminate synthetically created
>aliasing noise.

	That turned out to be sort of what was going on.  I noticed
the reduced audio on both the up-sampling script and a script that did
no sample conversion but was supposed to send one mono feed to two
stereo channels.

	I tried the -e -stat function and it showed a gain factor of
1.0 in the mono to stereo script.  I stuck a gain conversion of 2 in
the output and my level came right up to where it should be except for
lots of clipping.

	After another look at the manual, I found that I had
overlooked the avg settings.  These settings control how much audio is
sent to each channel.  sox invokes this function but with defaults if
you don't set it and I had not.  Apparently, the default is to send
half the audio to each channel.
avg 1,1 did the trick and my stereo from mono recording is now as loud
as the original mono .wav without clipping.

	That script I included that produces a stereo 44100 .wav out
of 8000-HZ PCM probably also needs the avg settings adjusted.  I just
didn't realize that I had lost some level at the time.

	My thanks for answers that got me pointed in the right

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Division Network Operations Group

More information about the linux-audio-user mailing list