From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Dr. Mark Bugeja MD" Newsgroups: gmane.comp.audio.sox Subject: Re: merging mono files Date: Thu, 8 Dec 2016 05:34:01 +0100 Message-ID: <989a257c-54b8-fbab-6d4d-4437347a340a@gmail.com> References: Reply-To: sox-users@lists.sourceforge.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1911222172555553017==" X-Trace: blaine.gmane.org 1481171681 19873 195.159.176.226 (8 Dec 2016 04:34:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2016 04:34:41 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: sox-users@lists.sourceforge.net Original-X-From: sox-users-bounces@lists.sourceforge.net Thu Dec 08 05:34:36 2016 Return-path: Envelope-to: gcas-sox-users@gmane.org Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.210.169 as permitted sender) client-ip=209.85.210.169; envelope-from=marcusfb@gmail.com; helo=mail-wj0-f169.google.com; X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=0Gut1tjD+m1Py97XzkM518Md59H3l1JcTVTBuICqVyQ=; b=XY6JpupPFte3r1LUpElMTIeIu7gSFogARUEnaBDuXDdjKdkmZhj+M8I7GGhKs11XzL n1QEkRatfZOZVDBh330sPUH0tJmFEmgHPes0KrKC0fv/6wMvu1myH1zm6RkkFku8AEsF RiTO6NgYO8WKZqrUZfqFbEc7y+ZLQbFTi4qWMsdrunhsP+A7CYwObwmnE/IcBXaXWRLU ptJrlt87HAtuHiTWiI3VQ+dxdWqSGfxXxG6hvuuycY4VXOc3UUxM6xwZKqV7DwtarXDo t+b73vVzCcBxPEHa5ZJNVGsNteSHdx2X/RZ7pdT9K9jHjGS5EliY4baBtOHBFuJzkU3d LpNQ== X-Gm-Message-State: AKaTC01bHyr6EPzvA+8MNLOlU2XgCgXlfhJjvGAp05ofwY1aH8Oah6BsJEGbOHqiD+VzKQ== X-Received: by 10.194.47.203 with SMTP id f11mr64299885wjn.146.1481171650801; Wed, 07 Dec 2016 20:34:10 -0800 (PST) In-Reply-To: X-Antivirus: avast! (VPS 161207-1, 07/12/2016), Outbound message X-Antivirus-Status: Clean X-Headers-End: 1cEqPR-0001NM-7u X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-users-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox:6338 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEqPi-000414-Ms for gcas-sox-users@gmane.org; Thu, 08 Dec 2016 05:34:35 +0100 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cEqPT-0007b4-Cn; Thu, 08 Dec 2016 04:34:19 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cEqPS-0007az-NP for sox-users@lists.sourceforge.net; Thu, 08 Dec 2016 04:34:18 +0000 Received: from mail-wj0-f169.google.com ([209.85.210.169]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1cEqPR-0001NM-7u for sox-users@lists.sourceforge.net; Thu, 08 Dec 2016 04:34:18 +0000 Received: by mail-wj0-f169.google.com with SMTP id tk12so83791845wjb.3 for ; Wed, 07 Dec 2016 20:34:17 -0800 (PST) Received: from [127.0.0.1] ([195.158.99.83]) by smtp.gmail.com with ESMTPSA id 63sm13062455wmg.2.2016.12.07.20.34.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 20:34:10 -0800 (PST) This is a multi-part message in MIME format. --===============1911222172555553017== Content-Type: multipart/alternative; boundary="------------4F775ABA03B851BC63FAC4F3" This is a multi-part message in MIME format. --------------4F775ABA03B851BC63FAC4F3 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit I shifted the Test.bat, left.wav, right.wav in a subfolder called "input" (arbitrarily) and ran c:\Program Files (x86)\sox-14-4-2\input>Test.bat and YES I get a stereo.wav which appears correct on Soundforge!!! Horrah!! On 08/12/2016 03:15, Kevin Conder wrote: > On Wed, Dec 7, 2016 at 1:52 PM, Dr. Mark Bugeja MD wrote: > >> Hi guys, >> >> I cannot interact directly on the mailing list for some reason and had to post my question via email. >> >> I have just installed SoX and upon running it I only get a back window appearing momentarily and then vanishes. Consider me a complete noob and treat me with some patience. >> >> I need to combine several mono wav samples to corresponding stereo files. I am running Windows 10 not linux. The files are in folder and named as as follows: >> >> I need to merge corresponding lefts and rights to output as new stereo files in new folders bearing the original name of the instrument (organ stop in this case) and subfolders and I want to ensure the appropriate files are merged together. Identical names exist in the subfolders that bear the release/ tail of a wave profile because each must correspond to the corresponding main file when eventually played in the appropriate software. Those of you who may have processed sound files for jOrgan, GrandOrgue or Hauptwerk know what I am talking about. >> >> How do I get to use SoX for this exercise. Total files I need to process run into 2000+ mono files x 2 to get 2000+ stereo files. That's a lot to process manually!!! >> > Let's break your question into two parts: combining two 1-channel > audio files into one 2-channel audio file and scripting this > combination with multiple files in different directories. > > There is one caveat: I don't have access to Windows 10, I'm using Windows 7. > > 1. Does this sox command work for combining two 1-channel files, > left.wav and right.wav, into one 2-channel audio file: stereo.wav? > > sox -M -c 1 left.wav -c 1 right.wav stereo.wav > > > > 2. I would use a scripting language to work with multiple files in > different directories. Do you have Windows Script Host available on > your system? > > a. Go to the command prompt. (Search for "Command Prompt" or "cmd.exe".) > > b. At the command prompt, type this command: > > cscript.exe > > If the command returns an error, you don't have Windows Script Host > installed. If you do have it installed, let's see if you can create > and run a VBScript program. Type this command: > > notepad hello.vbs > > This will bring up the Notepad text editor for a VBScript program > called hello.vbs. Type the following text into Notepad, then save and > close it: > > Wscript.Echo "Hello, World!" > > To run the hello.vbs VBScript program, type the following command at > the command prompt: > > cscript hello.vbs > > The command prompt should display "Hello, World!". Let me know if > you're able to complete #1 and #2 to your satisfaction and I'll help > you combine the two to solve your problem. > --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus --------------4F775ABA03B851BC63FAC4F3 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

I shifted the Test.bat, left.wav, right.wav in a subfolder called "input" (arbitrarily) and ran

c:\Program Files (x86)\sox-14-4-2\input>Test.bat

and YES I get a stereo.wav which appears correct on Soundforge!!!

Horrah!! 


On 08/12/2016 03:15, Kevin Conder wrote:
On Wed, Dec 7, 2016 at 1:52 PM, Dr. Mark Bugeja MD <marcusfb@gmail.com> wrote:

Hi guys,

I cannot interact directly on the mailing list for some reason and had to post my question via email.

I have just installed SoX and upon running it I only get a back window appearing momentarily and then vanishes. Consider me a complete noob and treat me with some patience.

I need to combine several mono wav samples to corresponding stereo files. I am running Windows 10 not linux. The files are in folder and named as as follows:

I need to merge corresponding lefts and rights to output as new stereo files in new folders bearing the original name of the instrument (organ stop in this case) and subfolders and I want to ensure the appropriate files are merged together. Identical names exist in the subfolders that bear the release/ tail of a wave profile because each must correspond to the corresponding main file when eventually played in the appropriate software. Those of you who may have processed sound files for jOrgan, GrandOrgue or Hauptwerk know what I am talking about.

How do I get to use SoX for this exercise. Total files I need to process run into 2000+ mono files x 2 to get 2000+ stereo files. That's a lot to process manually!!!

Let's break your question into two parts: combining two 1-channel
audio files into one 2-channel audio file and scripting this
combination with multiple files in different directories.

There is one caveat: I don't have access to Windows 10, I'm using Windows 7.

1. Does this sox command work for combining two 1-channel files,
left.wav and right.wav, into one 2-channel audio file: stereo.wav?

sox -M -c 1 left.wav -c 1 right.wav stereo.wav



2. I would use a scripting language to work with multiple files in
different directories. Do you have Windows Script Host available on
your system?

a. Go to the command prompt. (Search for "Command Prompt" or "cmd.exe".)

b. At the command prompt, type this command:

cscript.exe

If the command returns an error, you don't have Windows Script Host
installed. If you do have it installed, let's see if you can create
and run a VBScript program. Type this command:

notepad hello.vbs

This will bring up the Notepad text editor for a VBScript program
called hello.vbs. Type the following text into Notepad, then save and
close it:

Wscript.Echo "Hello, World!"

To run the hello.vbs VBScript program, type the following command at
the command prompt:

cscript hello.vbs

The command prompt should display "Hello, World!". Let me know if
you're able to complete #1 and #2 to your satisfaction and I'll help
you combine the two to solve your problem.





Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com


--------------4F775ABA03B851BC63FAC4F3-- --===============1911222172555553017== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi --===============1911222172555553017== 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 --===============1911222172555553017==--