sox adding noize when file smashing

View: New views
5 Messages — Rating Filter:   Alert me  

sox adding noize when file smashing

by Robert Ferney :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Yall,
I'm using sox to convert and downgrade audio files to 8bit 8khz mono wav files ( Microsoft PCM and IMA ADPCM encodings ) to be used in a hardware device, which is only programmed to read those two formats.

Test input file is 16bit 44.1khz WAV

I'm currently using..
> sox input.wav -s -1 -r8000 -c1 output1.wav stat
and
> sox input.wav -s -1 -r8000 -c1 output_.wav stat

When I listen to the files afterwards, I can hear static in the background.
How can I eliminate this?
When using GUI tools to do the transformation, they don't have the static I hear from SoX
sox -version reports..  sox: v13.0.0

--
-Robert Ferney  ( Kolbe 4357 Demonstrator / Myer Brigs INTJ )
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: sox adding noize when file smashing

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Mar 05, 2008 at 01:15:54PM -0700, Robert Ferney wrote:

> Hi Yall,
> I'm using sox to convert and downgrade audio files to 8bit 8khz mono wav
> files ( Microsoft PCM and IMA ADPCM encodings ) to be used in a hardware
> device, which is only programmed to read those two formats.
>
> Test input file is 16bit 44.1khz WAV
>
> I'm currently using..
> > sox input.wav -s -1 -r8000 -c1 output1.wav stat
> and
> > sox input.wav -s -1 -r8000 -c1 output_.wav stat
>
> When I listen to the files afterwards, I can hear static in the background.
> How can I eliminate this?
> When using GUI tools to do the transformation, they don't have the static I
> hear from SoX
> sox -version reports..  sox: v13.0.0
>

I don't really use ADPCM files so can't comment much on if I've heard
noise or not.  But here are some suggestions that might help:

1) Upgrade to v14.0.1 in case a bugfix in this area was already done.
2) Try lowering the volume some to prevent clipping.

  sox -v 0.80 input.wav -s -1 -r8000 -c1 output1.wav

3) Do a search on the SoX mailing list for ADPCM and DCShift.  Rob's
mentioned in the past about how you can add a filter effect to
the command line to simulate what some GUI's are doing.  It may
clear up your noise.  A DCShift could be the cause of clipping/noise.

Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: sox adding noize when file smashing

by Robert Ferney :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok. upgraded SoX to 14.0.1, the output files test as identical. Here's the output from stat
> sox orig_000001jl.wav -s -1 -r8000 -c1 000001jl.wav stat
Samples read:             62583
Length (seconds):      7.822875
Scaled by:         2147483647.0
Maximum amplitude:     0.273477
Minimum amplitude:    -0.244540
Midline amplitude:     0.014468
Mean    norm:          0.016802
Mean    amplitude:    -0.000016
RMS     amplitude:     0.030996
Maximum delta:         0.169841
Minimum delta:         0.000000
Mean    delta:         0.006950
RMS     delta:         0.013814
Rough   frequency:          567
Volume adjustment:        3.657

On Wed, Mar 5, 2008 at 1:31 PM, Chris Bagwell <chris@...> wrote:
On Wed, Mar 05, 2008 at 01:15:54PM -0700, Robert Ferney wrote:
> Hi Yall,
> I'm using sox to convert and downgrade audio files to 8bit 8khz mono wav
> files ( Microsoft PCM and IMA ADPCM encodings ) to be used in a hardware
> device, which is only programmed to read those two formats.
>
> Test input file is 16bit 44.1khz WAV
>
> I'm currently using..
> > sox input.wav -s -1 -r8000 -c1 output1.wav stat
> and
> > sox input.wav -s -1 -r8000 -c1 output_.wav stat
>
> When I listen to the files afterwards, I can hear static in the background.
> How can I eliminate this?
> When using GUI tools to do the transformation, they don't have the static I
> hear from SoX
> sox -version reports..  sox: v13.0.0
>

I don't really use ADPCM files so can't comment much on if I've heard
noise or not.  But here are some suggestions that might help:

1) Upgrade to v14.0.1 in case a bugfix in this area was already done.
2) Try lowering the volume some to prevent clipping.

 sox -v 0.80 input.wav -s -1 -r8000 -c1 output1.wav

3) Do a search on the SoX mailing list for ADPCM and DCShift.  Rob's
mentioned in the past about how you can add a filter effect to
the command line to simulate what some GUI's are doing.  It may
clear up your noise.  A DCShift could be the cause of clipping/noise.

Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users



--
-Robert Ferney  ( Kolbe 4357 Demonstrator / Myer Brigs INTJ )
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: sox adding noize when file smashing

by D. S. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think I'm getting the same thing when I try to use an 8-bit output
format. Static that enters.in.  Also happens when I convert  to .au
with -1 ... but -2 sounds fine.  I can provide  .wav file examples if
needed.


Also ... noticing that the -s seems to be ignored for 8-bit ... or
play isn't seeing it right. Even though -s is given, still play says
it is unsigend.


$ sox --version
sox: SoX v14.0.1

$ sox -v 0.80  cherry.wav    -1 -r8000 -c1 t.wav

$ play t.wav

Input File     : 't.wav'
Sample Size    : 8-bit (1 byte)
Sample Encoding: unsigned
Channels       : 1
Sample Rate    : 8000

Time: 00:07.24 [00:00.00] of 00:07.24 (100% ) Samples out: 57.9k Clips: 0
Done.

$ sox -v 0.80  cherry.wav   -s  -1 -r8000 -c1 t.wav

$ play t.wav

Input File     : 't.wav'
Sample Size    : 8-bit (1 byte)
Sample Encoding: unsigned
Channels       : 1
Sample Rate    : 8000

Time: 00:07.24 [00:00.00] of 00:07.24 (100% ) Samples out: 57.9k Clips: 0
Done.


$ file t.wav
t.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 8000 Hz


$ uname -a
CYGWIN_NT-5.1 DS_XP 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: sox adding noize when file smashing

by robs-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- "D. S." <news.observer@...> wrote:

> I think I'm getting the same thing when I try to use an 8-bit output
> format. Static that enters.in.  Also happens when I convert  to .au
> with -1 ... but -2 sounds fine.  I can provide  .wav file examples if
> needed.
>
>
> Also ... noticing that the -s seems to be ignored for 8-bit ... or
> play isn't seeing it right. Even though -s is given, still play says
> it is unsigend.

This is because -s -1 isn't a valid combination for wav (as per wav
specification); valid combinations include -u -1 and -s -2.

> $ play t.wav
>
> Input File     : 't.wav'
> Sample Size    : 8-bit (1 byte)
> Sample Encoding: unsigned
> Channels       : 1
> Sample Rate    : 8000

I'm guessing that this may be a bug in the audio driver that play is using.

Try play t.wav -s (and add a -V for verbose output), if that sounds okay, it
means that the wav is in fact correct, and the problem is that the audio driver
has a problem with unsigned.

Cheers,
Rob


      ___________________________________________________________
Rise to the challenge for Sport Relief with Yahoo! For Good  

http://uk.promotions.yahoo.com/forgood/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users
LightInTheBox - Buy quality products at wholesale price