A few SOX questions

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

A few SOX questions

by box86rowh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello all,
I was wondering if Sox could help me achieve the following goals.
 
1. Take an audio file and manipulate it's volume level at different points during its runtime, so if i wanted the audio to fade to 0 from the 5 second mark to the 6 second mark, then fade back in at the 12 second mark.
 
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
Please let me know if these 2 tasks are possible, and if so, maybe you can point me in the right direction.
 
Thanks
Jason

Lauren found her dream laptop. Find the PC that’s right for you.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Wed, Sep 30, 2009 at 1:00 PM, Jason Candelora <jasonatsmtc@...> wrote:
Hello all,
I was wondering if Sox could help me achieve the following goals.
 
1. Take an audio file and manipulate it's volume level at different points during its runtime, so if i wanted the audio to fade to 0 from the 5 second mark to the 6 second mark, then fade back in at the 12 second mark.

You can make use of the ":" with effects to start new effect chain.  The following can probably be used to do above (untested and from memory... likely I got syntax wrong):

sox infile outfile fade 0 0:5.0 0:1.0 : trim 0:6.0 : fade 0:1.0

 
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
Please let me know if these 2 tasks are possible, and if so, maybe you can point me in the right direction.
 

The general suggestion on the list in the past is to use the "pad" affect to add with silence to point where you want it to start and then mix the files together using the -M option.  But mixing to many files together can have volume issues.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Doug Cook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1. Take an audio file and manipulate it's volume level at different points during its runtime, so if i wanted the audio to fade to 0 from the 5 second mark to the 6 second mark, then fade back in at the 12 second mark.
 
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
As Chris mentioned, SoX certainly can do these things, and it does them well, but the syntax isn't terribly straightforward. It might be easier to use a graphical tool. If you plan to automate a process to do the same thing many times, i.e. in a script, then SoX is probably the best tool. But if you need to adjust the settings each time, a GUI tool might be better. For doing this, my favorite tool is Audacity, http://audacity.sourceforge.net/.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by box86rowh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello,
Thanks for your response.
I am looking to manage the audio with Sox as part of an application that mixes down a soundtrack from multiple audio files and video sound tracks.  The user needs to be able to manipulate the volume level of the individual audio items in my gui and get the end result mixed in the final video.
Thanks for you help!
 

Date: Wed, 30 Sep 2009 16:24:02 -0700
From: idigdoug@...
To: sox-users@...
Subject: Re: [SoX-users] A few SOX questions

1. Take an audio file and manipulate it's volume level at different points during its runtime, so if i wanted the audio to fade to 0 from the 5 second mark to the 6 second mark, then fade back in at the 12 second mark.
 
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
As Chris mentioned, SoX certainly can do these things, and it does them well, but the syntax isn't terribly straightforward. It might be easier to use a graphical tool. If you plan to automate a process to do the same thing many times, i.e. in a script, then SoX is probably the best tool. But if you need to adjust the settings each time, a GUI tool might be better. For doing this, my favorite tool is Audacity, http://audacity.sourceforge.net/.


Microsoft brings you a new way to search the web. Try Bing™ now
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by box86rowh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks very much for the info, I will be feverishly testing these command lines tonight!
 

Date: Wed, 30 Sep 2009 15:19:33 -0500
From: chris@...
To: sox-users@...
Subject: Re: [SoX-users] A few SOX questions



On Wed, Sep 30, 2009 at 1:00 PM, Jason Candelora <jasonatsmtc@...> wrote:
Hello all,
I was wondering if Sox could help me achieve the following goals.
 
1. Take an audio file and manipulate it's volume level at different points during its runtime, so if i wanted the audio to fade to 0 from the 5 second mark to the 6 second mark, then fade back in at the 12 second mark.

You can make use of the ":" with effects to start new effect chain.  The following can probably be used to do above (untested and from memory... likely I got syntax wrong):

sox infile outfile fade 0 0:5.0 0:1.0 : trim 0:6.0 : fade 0:1.0

 
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
Please let me know if these 2 tasks are possible, and if so, maybe you can point me in the right direction.
 

The general suggestion on the list in the past is to use the "pad" affect to add with silence to point where you want it to start and then mix the files together using the -M option.  But mixing to many files together can have volume issues.


Microsoft brings you a new way to search the web. Try Bing™ now
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Parent Message unknown Re: A few SOX questions

by pj-20 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings,

>> 1. Take an audio file and manipulate it's volume level at different
>> points during its runtime, so if i wanted the audio to fade to 0
>> from the 5 second mark to the 6 second mark, then fade back in at
>> the 12 second mark.
> You can make use of the ":" with effects to start new effect chain.
> The following can probably be used to do above (untested and from
> memory...  likely I got syntax wrong):
>   sox infile outfile fade 0 0:5.0 0:1.0 : trim 0:6.0 : fade 0:1.0

Is that : documented in a man page somewhere ?  I couldn't find
it man sox or soxexam or soxeffect...
I'm not finding it easy to grasp what "starting a new effect
chain" means :-(
Presumably : must be surrounded by spaces, else there'd be
confusion with hh:mm:ss ?

Regards,  Peter Billam

http://www.pjb.com.au       pj@...      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/30/2009 07:54 PM, pj@... wrote:

> Greetings,
>
>    
>>> 1. Take an audio file and manipulate it's volume level at different
>>> points during its runtime, so if i wanted the audio to fade to 0
>>> from the 5 second mark to the 6 second mark, then fade back in at
>>> the 12 second mark.
>>>        
>> You can make use of the ":" with effects to start new effect chain.
>> The following can probably be used to do above (untested and from
>> memory...  likely I got syntax wrong):
>>    sox infile outfile fade 0 0:5.0 0:1.0 : trim 0:6.0 : fade 0:1.0
>>      
> Is that : documented in a man page somewhere ?  I couldn't find
> it man sox or soxexam or soxeffect...
> I'm not finding it easy to grasp what "starting a new effect
> chain" means :-(
> Presumably : must be surrounded by spaces, else there'd be
> confusion with hh:mm:ss ?
>
>    

The feature was added in SoX 14.2.0 and in its man pages so make sure
you have that version or newer.

Search for "EFFECTS" section in man page for overview of a chain and
then specifically "Multiple Effect Chains".

Chris

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/30/2009 06:24 PM, Doug Cook wrote:
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
As Chris mentioned, SoX certainly can do these things, and it does them well, but the syntax isn't terribly straightforward. It might be easier to use a graphical tool. If you plan to automate a process to do the same thing many times, i.e. in a script, then SoX is probably the best tool. But if you need to adjust the settings each time, a GUI tool might be better. For doing this, my favorite tool is Audacity, http://audacity.sourceforge.net/.

BTW, if you do decide to use SoX, or even another command line tool, you might look at the "crossfade_cat.sh" script on SoX web page.  From a high level, its doing what you want to do... That is using a trim effect to isolate audio from multiple audio files, do some fade ins and outs, and then mixing them back together into a single audio file.

http://sox.cvs.sourceforge.net/viewvc/sox/sox/scripts/crossfade_cat.sh?view=markup

The concepts in the script could be applied to any GUI or command line tool.

Chris

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by box86rowh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Question,
on a fade, does it have to go to silent? or can i fade to 1/2 volume? or some other arbitrary number?
Jason
 

Date: Wed, 30 Sep 2009 20:31:09 -0500
From: chris@...
To: sox-users@...
Subject: Re: [SoX-users] A few SOX questions

On 09/30/2009 06:24 PM, Doug Cook wrote:
2 I also want to mix multiple audio files, but bring them in at different times with some overlapping.
 
As Chris mentioned, SoX certainly can do these things, and it does them well, but the syntax isn't terribly straightforward. It might be easier to use a graphical tool. If you plan to automate a process to do the same thing many times, i.e. in a script, then SoX is probably the best tool. But if you need to adjust the settings each time, a GUI tool might be better. For doing this, my favorite tool is Audacity, http://audacity.sourceforge.net/.

BTW, if you do decide to use SoX, or even another command line tool, you might look at the "crossfade_cat.sh" script on SoX web page.  From a high level, its doing what you want to do... That is using a trim effect to isolate audio from multiple audio files, do some fade ins and outs, and then mixing them back together into a single audio file.

http://sox.cvs.sourceforge.net/viewvc/sox/sox/scripts/crossfade_cat.sh?view=markup

The concepts in the script could be applied to any GUI or command line tool.

Chris


Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Thu, Oct 1, 2009 at 9:48 AM, Jason Candelora <jasonatsmtc@...> wrote:
Question,
on a fade, does it have to go to silent? or can i fade to 1/2 volume? or some other arbitrary number?
Jason
 


Current fade effect only allows controlling the shape of fade curve but always goes to 0 volume.

BTW, on topic of crossfade_cat.sh script... I also recommend looking at latest SoX man page and the "splice" effect.  It may be a better way then simple concat to put the mixed audio files back together to prevent clicking noises from sudden transitions. 

Also, its implements same feature as crossfade_cat.sh script does... The script is more for example purposes.

Chris



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: A few SOX questions

by Fmiser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Doug Cook wrote:

> But if you need to adjust the settings each time, a GUI tool
> might be better. For doing this, my favorite tool is Audacity,
> http://audacity.sourceforge.net/.

The OS platform isn't mentioned. Audacity works well on an
number of different platforms, so there it's not an issue.

If you happen to be using Linux, I have found rezound and
mhwaveedit to be rather useful as well.  Then there's the "big
daddy" Arduor. It's a heavy tool - but if you need heavy work
it's a good choice.

Another CLI tool I use is ecasound.  It has some multitrack
features that do very well.  I think SoX is overall more
versatile but I do use both.

--      Philip

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users