sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeff Learman <jjlearman@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: BatchProcessing Files on Windows
Date: Wed, 27 May 2020 08:50:44 -0400	[thread overview]
Message-ID: <CAGyjer4oRmJVc96MC5xgCG1523Xa6ttb+pma7LTVA5MdZu3aNw@mail.gmail.com> (raw)
In-Reply-To: <HE1PR0102MB32250804F59B9F62ED745959AAB10@HE1PR0102MB3225.eurprd01.prod.exchangelabs.com>


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

"It doesn't work" is not helpful.  Is there an error message?  What DOES
happen?

Forget that for now, though.  Let's stick with Windows CLI.  Evidently the
link I sent wasn't a good one.  Try this

mkdir foo
for %i in (*.wav) do sox %i -b 8 foo\%i

You can use "help for" in Windows cmd window for more info on how to use
"for".

On Wed, 27 May 2020 at 04:10, Nils Wallgren <affarer@hotmail.com> wrote:

> Thanks for the reply. I am using windows 10 command prompt. Maybe not
> optimal but It’s kind of hard to know
>
> which one to use if your not an experienced programmer. I have Git Bash,
> is this is what you mean? But I don’t use it
>
> because I can’t get the set audiodriver to work as I could in the command
> prompt. In cmd.exe this is the first thing I do
>
> set audiodriver=waveaudio and I am ready to go. I guess there is a simple
> way to set up this from bash but
>
> I havn’t found any answer. The amount of questions quickly escalates
>
>
>
> When I ran your first script inside bash it didn’t work
>
> Just to make things clear:
>
> I ran this inside of Git Bash from a chosen folder set as my cd
>
> I also have to create a new folder within in this cd with mkdir?
>
>
>
> Then I’ll use for F in *.wav ; do
>
>     sox $F -b 8 nameoffolder/$F
>
> done
>
>
>
> But It doesn’t work
>
>
>
> But It would be nice to run it inside Command Prompt in windows 10.
>
> I have been using sox in with cmd.exe because it worked for but most
> information I find using sox is on Linux
>
> So maybe I should switch..
>
>
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Jeff Learman <jjlearman@gmail.com>
> *Sent: *Wednesday, 27 May 2020 02:23
> *To: *sox-users@lists.sourceforge.net
> *Subject: *Re: [SoX-users] BatchProcessing Files on Windows
>
>
>
> For the first question, I'll let the devs answer, but apparently sox
> doesn't batch.
>
>
>
> For the second question, that's not a sox issue; it's a scripting
> question.  What shell are you using?  For bash:
>
>
>
> for F in *.wav ; do
>
>     sox $F -b 8 mydir/$F
>
> done
>
>
>
> I'm guessing you use Windows CLI?  For that I'd use this:
> https://ss64.com/nt/for2.html -- so it looks like you just need %%
> instead of %, and a backslash between the dir name and the wave file name.
>
>
>
> Jeff
>
>
>
>
>
>
>
>
>
> On Tue, 26 May 2020 at 18:31, Nils Wallgren <affarer@hotmail.com> wrote:
>
> I have some problems getting these things to work:
>
>
>
> 1 I want the duration of a couple of soundfiles in a directory
>
>
>
> sox --i -D kick_*.wav
>
>
>
> the name of the sound files are kick_1.wav, kick_2.wav, kick_3.wav etc
>
> but it doesn’t work with the wildcard.
>
>
>
> 2 If I want to batch process a couple of files in a directory and
> process/convert them to something else
>
> And put the processed files in a new folder, how do I do that?
>
>
>
> for %i in *.wav do sox "%i" -b 8  "n_%i" .flac
>
>
>
> (also not sure of the conversion of the files when batching)
>
>
>
> Best,
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

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

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



[-- 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

  parent reply	other threads:[~2020-05-27 12:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 22:30 BatchProcessing Files on Windows Nils Wallgren
2020-05-27  0:21 ` Jeff Learman
2020-05-27  8:09   ` Nils Wallgren
     [not found]     ` <173dc6c3-ff96-e8b7-a072-3d3f84220e5d@bayern-mail.de>
2020-05-27  8:34       ` tsepp2000
2020-05-27  9:48         ` Nils Wallgren
2020-05-27 12:31           ` tsepp2000
     [not found]             ` <HE1PR0102MB3225333E72970AB67FB1D914AAB10@HE1PR0102MB3225.eurprd01.prod.exchangelabs.com>
2020-05-28  5:35               ` tsepp2000
2020-05-28 14:07                 ` Jeff Learman
2020-05-28 14:17                   ` Jeff Learman
2020-05-29 12:24                     ` Nils Wallgren
2020-05-28  5:53               ` tsepp2000
2020-05-27 12:50     ` Jeff Learman [this message]
2020-05-27 12:55       ` Jeff Learman
2020-05-27 12:20 ` Måns Rullgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGyjer4oRmJVc96MC5xgCG1523Xa6ttb+pma7LTVA5MdZu3aNw@mail.gmail.com \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).