Trim by proportion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trim by proportion

Michael Karr
I have a folder of about 1500 sound files, each of different lengths around 10 seconds, I would like to trim these all into exactly 47 equal samples (for reconstructive purposes) and wonder if there is an efficient way of doing this (i.e. can I specify percentages instead of in/out times?)

Cheers, Michael

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Trim by proportion

Ulrich Klauer-2
Michael Karr wrote:

> I have a folder of about 1500 sound files, each of different lengths  
> around 10 seconds, I would like to trim these all into exactly 47  
> equal samples (for reconstructive purposes) and wonder if there is  
> an efficient way of doing this (i.e. can I specify percentages  
> instead of in/out times?)

There is no way to specify a "proportional" position, but it should be  
easy to write a script that, for each file, queries the length with  
"soxi -s", then calculates 1/47 of that and hands this value to SoX.

Ulrich


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Trim by proportion

Jan Stary
In reply to this post by Michael Karr
On Jul 30 17:13:54, [hidden email] wrote:
> I have a folder of about 1500 sound files, each of different lengths around
> 10 seconds, I would like to trim these all into exactly 47 equal samples

What do you mean? Each of the files should be trimmed so that
exactly 47 audio samples are left? Which 47 audio samples
of the original file should those be?

> (for reconstructive purposes)

Can you elaborate?

> and wonder if there is an efficient way of
> doing this (i.e. can I specify percentages instead of in/out times?)

The 'trim' effect itself does not support this,
but you can find the length of each file with 'soxi -s' first
and then "trim by proportion", whatever that means.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users