Setting the bit depth of an output file

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

Setting the bit depth of an output file

by Gerald.Hinton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi there,

I am using sox to combine two audio files together as a quick mix on windows using version 14.0.1.

One file is a 16 bit wav and the other is a 24 bit wav file.

The mix function works just fine but I would like to be able to force sox to create a 16bit output rather than the 24bit output it is creating at present.

I tried using '-b 16' in the output parameters but that doesn't seem to do the trick

Here is my current syntax without the bit depth setting:
 'sox.exe -S -m -v 0.6 wav01.wav -v 0.4 wav02.wav -r 48000 out.wav'

Could you please suggest a syntax to do this.

Many thanks

Gerald

Deluxe Digital Studios
Registered Office: 7-11 Lexington Street, London W1F 9AF
Company Registration No. 03669201 England


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: Setting the bit depth of an output file

by robs-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- Gerald.Hinton@... wrote:

> I tried using '-b 16' in the output parameters but that doesn't seem to do
> the trick
>
> Here is my current syntax without the bit depth setting:
>  'sox.exe -S -m -v 0.6 wav01.wav -v 0.4 wav02.wav -r 48000 out.wav'
>
> Could you please suggest a syntax to do this.

Putting `-2' (i.e. 2 bytes = 16 bits) before `out.wav' should do the trick.

/Rob


      ___________________________________________________________
Yahoo! For Good helps you make a difference  

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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: Setting the bit depth of an output file

by Gerald.Hinton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Many thanks Rob, that correctly gives me exactly the 16bit file I was looking for.

If possible it  would be good to make setting the bit depth a bit more explicit in the documentation and perhaps use the term Bit Depth in the explanation of the "-1/-2/-3/-4/-8" section

Here is the syntax to set 16 bit  48Khz output for future refernce of others

 'sox.exe -S -m -v 0.6 wav01.wav -v 0.4 wav02.wav -r 48000  -2 out.wav'

Gerald

>Putting `-2' (i.e. 2 bytes = 16 bits) before `out.wav' should do the trick.

Deluxe Digital Studios
Registered Office: 7-11 Lexington Street, London W1F 9AF
Company Registration No. 03669201 England


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users