From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 989151F55B for ; Wed, 27 May 2020 12:56:22 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jdvbU-0001tO-SY; Wed, 27 May 2020 12:56:16 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdvbU-0001tC-DZ for sox-users@lists.sourceforge.net; Wed, 27 May 2020 12:56:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Yzq80DRypHXAzAJ3sUOW20ghScPnQA8w9K8ji56zFVA=; b=XmiKSaqV2wuA4bUd9oFv9kp4j JL701r+cv5ZOF7cdXDBcErnFDgoYOyn0QpbFtNIVSpuNUQWZZrISBLhBc2eu1iCigglCcSTd0ZXn2 y6vBkNnbb//aOiyW/VKtNQocWzTXyYCgDtPutB1fqce4BT2eY9ZOm6XG3k3FbWbzffEW4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Yzq80DRypHXAzAJ3sUOW20ghScPnQA8w9K8ji56zFVA=; b=bno6AgHroY7bhEwdHgFW5Q+9/w GnF2E4GImRAO8xtHpjdN5YViwPuhbhKMqEZwntRue10NpmcxrTZYwNb3KQRUnj72HyOsHsH5dSaSe gTA40kBBYg1xakOtrZfYQGYWQzQmIUUBbfi0o3u45+usoqcbr39pkzwlkye4r4ToUPkM=; Received: from mail-wm1-f54.google.com ([209.85.128.54]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jdvbS-009FQE-PI for sox-users@lists.sourceforge.net; Wed, 27 May 2020 12:56:16 +0000 Received: by mail-wm1-f54.google.com with SMTP id f5so2928411wmh.2 for ; Wed, 27 May 2020 05:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Yzq80DRypHXAzAJ3sUOW20ghScPnQA8w9K8ji56zFVA=; b=orljbaZpzDZt6C7QeJCJU9SRAHwmAF0foTfcKj4g03IYZv4Yatlh7sBoRuKUXTjt2v W8XCJyQJjKuTmHlIisF0g8JMEFExsPceCQV1xcuKOGAv0qHYWClRSA5QXT7lpIV0mN/U coL+1qFha4OfEU7tIKPA0rm0KIJAjdfCVbl0PcUdXCl56Mc/w42ggzVywpljlpIkzADF 77oGCbKNKxhr3tTmsqdVv7ke68lljle+UX7I2BvOpHR57nGZQNwhJFaAzsWdogOEsUrP 7arMbJXb1lAJYWi/O5p0ThQlV2aKuDhimR7dnJG7JiAMZ3MmW7DOaNzndxUiM/4Jv90n /gaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Yzq80DRypHXAzAJ3sUOW20ghScPnQA8w9K8ji56zFVA=; b=Vnh5Q5dU8HaY3YucxuZg7sl3UgraXwfMc0MPfq4bEvGpH8Dkm/Dhsquzlzhxvc5JxY MwaXGJosJ+HkjZOmSJZYdptv/xk62StCQbctlMjqmpIUz9+LqSLLsnFjzy3yS6sUg+9O sQ6/Blji3gkwz2qXT/XRoNNh9zs7Gr+kdClOHqI8bxsIvICV2pKkIHXU12pJMl0p3RTI TWVQc59utyuT342GUkdyPQ8RQbwbZwmoWeZVTuAxHBLfAd0FRF3ruIHfoQTLQ94BnIRQ sV9GmWQ82INx1+qCLI8jh7RCHhBXTcdl5IKDVfW4/aPSrnVGpCEt3B6hh6sBEsKAXgNx 1JjA== X-Gm-Message-State: AOAM531UbXSSLItAIkk7qA1QZ3jYPf+cQw6AThtpuMhK2iGqpq9MpAq1 DQZmMRBCeegjHIUxdzy2AjsrOotlxJ0g+9m6uDq7 X-Google-Smtp-Source: ABdhPJyu9YywLJ1sQaVW/+i7gBPIfllz+DweCItWcDC+3lSVeR3Ie3uKmCXaA7DA4P5a7XrY6OkuX2FVbyORJv2FzkU= X-Received: by 2002:a1c:9dc7:: with SMTP id g190mr4482167wme.129.1590584168170; Wed, 27 May 2020 05:56:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jeff Learman Date: Wed, 27 May 2020 08:55:56 -0400 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1jdvbS-009FQE-PI Subject: Re: BatchProcessing Files on Windows X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="===============4533116840276681083==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============4533116840276681083== Content-Type: multipart/alternative; boundary="0000000000005448a805a6a0bc1c" --0000000000005448a805a6a0bc1c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oops didn't see other replies. Please ignore my response. I now see that the only remaining issue is what we would use "basename -s" for in linux. On Wed, 27 May 2020 at 08:50, Jeff Learman wrote: > "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 th= e > 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 wrote: > >> Thanks for the reply. I am using windows 10 command prompt. Maybe not >> optimal but It=E2=80=99s 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=E2=80=99t use it >> >> because I can=E2=80=99t get the set audiodriver to work as I could in th= e command >> prompt. In cmd.exe this is the first thing I do >> >> set audiodriver=3Dwaveaudio and I am ready to go. I guess there is a sim= ple >> way to set up this from bash but >> >> I havn=E2=80=99t found any answer. The amount of questions quickly escal= ates >> >> >> >> When I ran your first script inside bash it didn=E2=80=99t 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=E2=80=99ll use for F in *.wav ; do >> >> sox $F -b 8 nameoffolder/$F >> >> done >> >> >> >> But It doesn=E2=80=99t 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 for >> Windows 10 >> >> >> >> *From: *Jeff Learman >> *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 nam= e. >> >> >> >> Jeff >> >> >> >> >> >> >> >> >> >> On Tue, 26 May 2020 at 18:31, Nils Wallgren 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=E2=80=99t 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 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 >> > --0000000000005448a805a6a0bc1c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Oops didn't see other replies.=C2=A0 Please ignore my = response.=C2=A0 I now see that the only remaining issue is what we would us= e "basename -s" for in linux.


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".

Thanks for the reply. I am usin= g windows 10 command prompt. Maybe not optimal but It=E2=80=99s kind of har= d to know

which one to use if your not an= experienced programmer. I have Git Bash, is this is what you mean? But I d= on=E2=80=99t use it

because I can=E2=80=99t 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=3Dwaveaudio and= I am ready to go. I guess there is a simple way to set up this from bash b= ut

I havn=E2=80=99t found any answ= er. The amount of questions quickly escalates

=C2=A0

When I ran your first script in= side bash it didn=E2=80=99t work

Just to make things clear:

I ran this inside of Git Bash from a chosen folder s= et as my cd

I also have to create a new folder within in this cd= with mkdir?

=C2=A0

Then I=E2=80=99ll use for F in *.wav ; do<= /u>

=C2=A0=C2=A0=C2=A0 sox $F -b 8 nameoffolder/$F

done

=C2=A0

But It doesn=E2=80=99t work

=C2=A0

But It would be nice to run it inside Command Prompt= in windows 10.=C2=A0

I have been using sox in with cmd.exe because it wor= ked for but most information I find using sox is on Linux

So maybe I should switch..

=C2=A0

=C2=A0

Sent from Mail for Windows 10

=C2=A0

From: Jeff Learman=
Sent: Wednesday, 27 May 2020 02:23
To: sox-users@lists.sourceforge.net
Subject: Re: [SoX-users] BatchProcessing Files on Windows

=C2=A0

For the first question, I'll let the devs answer= , but apparently sox doesn't batch.

=C2=A0

For the second question, that's not a sox issue;= it's a scripting question.=C2=A0 What shell are you using?=C2=A0 For b= ash:

=C2=A0

for F in *.wav ; do

=C2=A0=C2=A0=C2=A0 sox $F -b 8 mydir/$F

done

=C2=A0

I'm guessing you use Windows CLI?=C2=A0 For that= I'd use this: https://ss64.com/nt/for2.html -- so it looks like you just need %% inst= ead of %, and a backslash between the dir name and the wave file name.

=C2=A0

Jeff

=C2=A0

=C2=A0

=C2=A0

=C2=A0

________________________= _______________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

=C2=A0

_______________________________________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-users
--0000000000005448a805a6a0bc1c-- --===============4533116840276681083== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4533116840276681083== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============4533116840276681083==--