stupakov | 3 Jun 2009 20:13
Picon

Effects Chains


Hi,
I'd like to do the following in one sox invocation, and I'm not sure if this
needs multiple effects chains or not:
1) Change the sample rate of my file
2) Trim a specified number of samples from the front and back (sample count
is at the new sample rate)
3) Zero out the audio at several locations (position should be relative to
the beginning of the resulting resampled and trimmed audio)
4) Write the result to a file

Is this command ok or do I need to use multiple effects chains for this?:
sox $infile $outfile speed $speed_factor rate -v trim "$chopFrontSamples"s
"$chopLengthSamples"s pad "$length1"s <at> "$position1"s
"$length2"s <at> "$position2"s 

Thanks
Alex
--

-- 
View this message in context: http://www.nabble.com/Effects-Chains-tp23856478p23856478.html
Sent from the SoX mailing list archive at Nabble.com.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Tielin Xu | 4 Jun 2009 00:43

How to reduce the size after combine a few wav files

Hi list:

 

I am new on SOX.

I tried to use sox under Windows today, but with some this problem need help.

I tested two wav files, one size at: 247K, another one is 204K. Sox generated

third file without problem, but the size is 4434K, those  two files come from

the same source, so the same format, etc.

 

Please help me to get a smaller size of the output file, if bigger than combined

size, but not like 10 times bigger.

 

Many thanks,

 

James

 

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
Fmiser | 4 Jun 2009 01:42
Picon

Re: How to reduce the size after combine a few wav files

> Tielin Xu wrote:

> I am new on SOX.
> I tried to use sox under Windows today, but with some this
> problem need help. I tested two wav files, one size at: 247K,
> another one is 204K. Sox generated third file without problem,
> but the size is 4434K, those  two files come from the same
> source, so the same format, etc.

Wow! That's a pretty neat trick!  *smile*

What command did you use?

Are you wanting to mix the two originals to create the third?
Or are you wanting to concatenate them (connect them end to end)?

You could run "soxi first.wav second.wav third.wav" and let us
know the length, channel count, bit depth, and sample rate
of each of them.

If you are wanting first.wav and second.wav to be connected end
to end in the file third.wav the size is pretty close to just
adding the two sizes together.

Oh, also, what does the third one sound like? Is it functionally
and sonically correct, just too large?

--         Philip

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Tielin Xu | 4 Jun 2009 17:03

Re: How to reduce the size after combine a few wav files

Philip:

I just want to do the simple concatenation, 2-4 files to one.
The big file generated sounds OK, a little off from two originals,
acceptable sound, but too lager the size.

I tried your new command soxi as following:
soxi t1.wav t2.wav t3.wav

The command displays following:
Input File      : 't1.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:35.52 = 1244160 samples ~ 11664 CDDA sectors
Sample Encoding : GSM

Input File      : 't2.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:08.20 = 1025600 samples ~ 9615 CDDA sectors
Sample Encoding : GSM

soxi formats: can't open input file 't3.wav': No such file or directory

Thanks,

James

-----Original Message-----
From: Fmiser [mailto:fmiser <at> gmail.com] 
Sent: Wednesday, June 03, 2009 4:42 PM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

> Tielin Xu wrote:

> I am new on SOX.
> I tried to use sox under Windows today, but with some this
> problem need help. I tested two wav files, one size at: 247K,
> another one is 204K. Sox generated third file without problem,
> but the size is 4434K, those  two files come from the same
> source, so the same format, etc.

Wow! That's a pretty neat trick!  *smile*

What command did you use?

Are you wanting to mix the two originals to create the third?
Or are you wanting to concatenate them (connect them end to end)?

You could run "soxi first.wav second.wav third.wav" and let us
know the length, channel count, bit depth, and sample rate
of each of them.

If you are wanting first.wav and second.wav to be connected end
to end in the file third.wav the size is pretty close to just
adding the two sizes together.

Oh, also, what does the third one sound like? Is it functionally
and sonically correct, just too large?

--         Philip

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Pascal Giard | 4 Jun 2009 17:12
Picon
Gravatar

Re: How to reduce the size after combine a few wav files

On Thu, Jun 4, 2009 at 11:03 AM, Tielin Xu <TIELXU01 <at> noa.nintendo.com> wrote:
> Philip:
>
> I just want to do the simple concatenation, 2-4 files to one.
> The big file generated sounds OK, a little off from two originals,
> acceptable sound, but too lager the size.
>
> I tried your new command soxi as following:
> soxi t1.wav t2.wav t3.wav
>
> The command displays following:
> Input File      : 't1.wav'
> Channels        :  1
> Sample Rate     :  8000
> Precision       : 16-bit
> Duration        : 00:02:35.52 = 1244160 samples ~ 11664 CDDA sectors
> Sample Encoding : GSM
>
> Input File      : 't2.wav'
> Channels        :  1
> Sample Rate     :  8000
> Precision       : 16-bit
> Duration        : 00:02:08.20 = 1025600 samples ~ 9615 CDDA sectors
> Sample Encoding : GSM
>
> soxi formats: can't open input file 't3.wav': No such file or directory
>
> Thanks,
>
> James

James, we now have the information about your two source files... but
what about the resulting files that combines them both?

-Pascal
--

-- 
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
LACIME: École de technologie supérieure (http://lacime.etsmtl.ca)

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Tielin Xu | 4 Jun 2009 17:08

Re: How to reduce the size after combine a few wav files

The generate file information:
Input File      : 't3.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:04:43.72 = 2269760 samples ~ 21279 CDDA sectors
Sample Encoding : 16-bit Signed Integer PCM

-----Original Message-----
From: Tielin Xu 
Sent: Thursday, June 04, 2009 8:03 AM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

Philip:

I just want to do the simple concatenation, 2-4 files to one.
The big file generated sounds OK, a little off from two originals,
acceptable sound, but too lager the size.

I tried your new command soxi as following:
soxi t1.wav t2.wav t3.wav

The command displays following:
Input File      : 't1.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:35.52 = 1244160 samples ~ 11664 CDDA sectors
Sample Encoding : GSM

Input File      : 't2.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:08.20 = 1025600 samples ~ 9615 CDDA sectors
Sample Encoding : GSM

soxi formats: can't open input file 't3.wav': No such file or directory

Thanks,

James

-----Original Message-----
From: Fmiser [mailto:fmiser <at> gmail.com] 
Sent: Wednesday, June 03, 2009 4:42 PM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

> Tielin Xu wrote:

> I am new on SOX.
> I tried to use sox under Windows today, but with some this
> problem need help. I tested two wav files, one size at: 247K,
> another one is 204K. Sox generated third file without problem,
> but the size is 4434K, those  two files come from the same
> source, so the same format, etc.

Wow! That's a pretty neat trick!  *smile*

What command did you use?

Are you wanting to mix the two originals to create the third?
Or are you wanting to concatenate them (connect them end to end)?

You could run "soxi first.wav second.wav third.wav" and let us
know the length, channel count, bit depth, and sample rate
of each of them.

If you are wanting first.wav and second.wav to be connected end
to end in the file third.wav the size is pretty close to just
adding the two sizes together.

Oh, also, what does the third one sound like? Is it functionally
and sonically correct, just too large?

--         Philip

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Tielin Xu | 4 Jun 2009 17:35

Re: How to reduce the size after combine a few wav files

My problem is resolved.
Thanks Philip's soxi information.
I read the sox document, add -g option into command line as:
sox t1.wav t2.wav -g t3.wav

The size of new generated file is 451K, it is exactly the sum
of two original files.

I really appreciate the help.

James

-----Original Message-----
From: Tielin Xu 
Sent: Thursday, June 04, 2009 8:09 AM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

The generate file information:
Input File      : 't3.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:04:43.72 = 2269760 samples ~ 21279 CDDA sectors
Sample Encoding : 16-bit Signed Integer PCM

-----Original Message-----
From: Tielin Xu 
Sent: Thursday, June 04, 2009 8:03 AM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

Philip:

I just want to do the simple concatenation, 2-4 files to one.
The big file generated sounds OK, a little off from two originals,
acceptable sound, but too lager the size.

I tried your new command soxi as following:
soxi t1.wav t2.wav t3.wav

The command displays following:
Input File      : 't1.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:35.52 = 1244160 samples ~ 11664 CDDA sectors
Sample Encoding : GSM

Input File      : 't2.wav'
Channels        :  1
Sample Rate     :  8000
Precision       : 16-bit
Duration        : 00:02:08.20 = 1025600 samples ~ 9615 CDDA sectors
Sample Encoding : GSM

soxi formats: can't open input file 't3.wav': No such file or directory

Thanks,

James

-----Original Message-----
From: Fmiser [mailto:fmiser <at> gmail.com] 
Sent: Wednesday, June 03, 2009 4:42 PM
To: sox-users <at> lists.sourceforge.net
Subject: Re: [SoX-users] How to reduce the size after combine a few wav files

> Tielin Xu wrote:

> I am new on SOX.
> I tried to use sox under Windows today, but with some this
> problem need help. I tested two wav files, one size at: 247K,
> another one is 204K. Sox generated third file without problem,
> but the size is 4434K, those  two files come from the same
> source, so the same format, etc.

Wow! That's a pretty neat trick!  *smile*

What command did you use?

Are you wanting to mix the two originals to create the third?
Or are you wanting to concatenate them (connect them end to end)?

You could run "soxi first.wav second.wav third.wav" and let us
know the length, channel count, bit depth, and sample rate
of each of them.

If you are wanting first.wav and second.wav to be connected end
to end in the file third.wav the size is pretty close to just
adding the two sizes together.

Oh, also, what does the third one sound like? Is it functionally
and sonically correct, just too large?

--         Philip

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
robs | 4 Jun 2009 17:48
Picon
Favicon

Re: Effects Chains


--- On Wed, 3/6/09, stupakov <stupakov+nabble <at> gmail.com> wrote:

> Is this command ok or do I need to use multiple effects
> chains for this?:
> sox $infile $outfile speed $speed_factor rate -v trim
> "$chopFrontSamples"s
> "$chopLengthSamples"s pad "$length1"s <at> "$position1"s
> "$length2"s <at> "$position2"s 

It looks okay to me -- give it a try...

Only thing I would add is that pad doesn't zero-out samples (i.e. a 'mute' function) it inserts silence;
hope that's what you need.

Cheers,
Rob

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
robs | 4 Jun 2009 18:35
Picon
Favicon

Re: How to reduce the size after combine a few wav files


--- On Thu, 4/6/09, Tielin Xu <TIELXU01 <at> noa.nintendo.com> wrote:

> I read the sox document, add -g option into command line
> as:
> sox t1.wav t2.wav -g t3.wav

Ah, but this is a bug: the -g should be implied in this case.
Fixed in CVS.

Cheers,
Rob

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
net_hw | 13 Jun 2009 08:53
Picon

SoX trim begining

Hello...

I have a folder with 2000 audio files and I need

remove 1.45 seconds from the beginning of each

the stretch of 1.45 seconds is not only silent

I imagined about something that leaves me know the length of each file
to put on my shell script

like

sox fileyouhave.wav newfile.wav trim 00:01.45 $durationofthefileyouhave


thank you

[]´s
hw
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Sox-users mailing list
Sox-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

Gmane