sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* batch sox process on a folder of files
@ 2017-06-30 13:29 Chris Pierpoint
  2017-06-30 16:26 ` Jan Stary
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Pierpoint @ 2017-06-30 13:29 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 1093 bytes --]

Hello,

 

I use sox to simply resample wav-format files from 500 kHz to 48 kHz
sampling rate.  I have a batch of 940 files to convert, but I can only do
about 100 files at a time because, I think, the number of characters in the
command line code exceeds a certain limit.

 

The batch file code is:

cd %~dp0

FOR %%A IN (%*) DO sox %%A "G:\LADC 2017 data\WAV48/%%~nxA" rate -v 48000

pause

 

Please can you show me how to execute the sox command on a whole folder of
files, so I don't have to drag the files onto the .bat file shortcut several
times.  I just want to start the process and let it run.

 

The file folder path is:

G:\LADC 2017 data\WAV500

 

The destination folder for the converted files is:

G:\LADC 2017 data\WAV48

 

Could you also explain why it does not work when I drag files onto the batch
file (located in the sox.exe folder in the C:\Program (x86) Files\sox.?  It
only works when i drag them onto a shortcut to the batch file on the
external G:\ drive.

 

Thanks v much,

 

 

Chris



---
This email has been checked for viruses by AVG.
http://www.avg.com

[-- Attachment #1.2: Type: text/html, Size: 4397 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch sox process on a folder of files
  2017-06-30 13:29 batch sox process on a folder of files Chris Pierpoint
@ 2017-06-30 16:26 ` Jan Stary
  2017-06-30 17:11   ` Chris Pierpoint
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stary @ 2017-06-30 16:26 UTC (permalink / raw)
  To: sox-users

On Jun 30 14:29:01, cp@eurydice.co.uk wrote:
> I use sox to simply resample wav-format files
> from 500 kHz to 48 kHz sampling rate.

Can you please share how you obtain 500kHz srate audio and how you use them?
(Or why you convert them to 48kHz first?)

	Jan


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch sox process on a folder of files
  2017-06-30 16:26 ` Jan Stary
@ 2017-06-30 17:11   ` Chris Pierpoint
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Pierpoint @ 2017-06-30 17:11 UTC (permalink / raw)
  To: sox-users

Hi Jan,

I sample my hydrophone array at 500 kHz, 2 ch, 16 bit using a National Instruments USB-6251 DAQ.  This is when recording marine mammal echolocation.  Some species click at high frequencies (e.g. harbour porpoise at 140 kHz), hence the high sampling rate.  For some analyses when I don't need the higher frequencies, I resample at a lower rate because it's easier on PC resources and I can use shorter fast Fourier transform windows to look at spectrograms of the sounds in frequency domaine.

Chris

Sent from my iPhone

> On 30 Jun 2017, at 17:26, Jan Stary <hans@stare.cz> wrote:
> 
>> On Jun 30 14:29:01, cp@eurydice.co.uk wrote:
>> I use sox to simply resample wav-format files
>> from 500 kHz to 48 kHz sampling rate.
> 
> Can you please share how you obtain 500kHz srate audio and how you use them?
> (Or why you convert them to 48kHz first?)
> 
>    Jan
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-30 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 13:29 batch sox process on a folder of files Chris Pierpoint
2017-06-30 16:26 ` Jan Stary
2017-06-30 17:11   ` Chris Pierpoint

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).