From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Stary Newsgroups: gmane.comp.audio.sox Subject: Re: merging mono files Date: Thu, 8 Dec 2016 08:06:47 +0100 Message-ID: <20161208070646.GA96771@www.stare.cz> References: <20161207210754.6rliezfgvdzgzco3@fastmail.com> <20161208000702.5lguodmrnv322tdi@fastmail.com> <20161208000944.bumm4xfhe7e4kmm7@fastmail.com> <4b7caa1b-b4a1-52f4-66b9-3a7755f58d94@gmail.com> Reply-To: sox-users@lists.sourceforge.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1481182424 1644 195.159.176.226 (8 Dec 2016 07:33:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2016 07:33:44 +0000 (UTC) User-Agent: Mutt/1.7.1 (2016-10-04) To: sox-users@lists.sourceforge.net Original-X-From: sox-users-bounces@lists.sourceforge.net Thu Dec 08 08:33:39 2016 Return-path: Envelope-to: gcas-sox-users@gmane.org X-ACL-Warn: Mail-Followup-To: sox-users@lists.sourceforge.net Content-Disposition: inline In-Reply-To: <4b7caa1b-b4a1-52f4-66b9-3a7755f58d94@gmail.com> X-Headers-End: 1cEtCw-0006nY-90 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:6339 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEtD1-0007wG-1s for gcas-sox-users@gmane.org; Thu, 08 Dec 2016 08:33:39 +0100 Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cEtCy-0007oP-SH; Thu, 08 Dec 2016 07:33:36 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cEtCy-0007oK-EM for sox-users@lists.sourceforge.net; Thu, 08 Dec 2016 07:33:36 +0000 Received: from ns.stare.cz ([79.98.77.229] helo=mx.stare.cz) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1cEtCw-0006nY-90 for sox-users@lists.sourceforge.net; Thu, 08 Dec 2016 07:33:36 +0000 Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 4ae20964 for ; Thu, 8 Dec 2016 08:06:47 +0100 (CET) On Dec 08 02:36:41, marcusfb@gmail.com wrote: > Manually I was able to open a pair of files in Sony Soundforge. Copy the > right channel from the R file and simply paste it into the blank channel in > the L file. Save. Done. Loops and markers are all left intact. > > This is the process I'd like to emulate and automate for a number of file > pairs. I can handle modification of a bat file to specify different pairs of > folders and do a "rank" (instrument or stop) at a time. I can batch process > renaming of the files. It's the code that I need to create an appropriate > bat file to merge pairs of files from 2 folders. I did find "codes" to do > this but I don't understand which parts I would need to modify, if at all, > to direct the process to my named folders and the files within. > > Folder 1 may be called *TrumpetL* > > Folder 2 may be called *TrumpetR* > > In each, there are files with identical names: 036-C.wav, 037-C#.wav, > 038-D.wav, 039-D#.wav, 040-E.wav.................. 096-C.wav > > Pairing would involve merging the files sharing the same name, one from each > of the two folders, eg 036-C.wav from folder *TrumpetL *with 036-C.wav from > folder *TrumpetR *so that the output file would be 036-C.wav (now a stereo > file following the merger) into a folder *Trumpet*. > > What code would I need to achieve this? That's what I am after. In a standard shell, you would do something like this for left in TrumpetL/*wav; do name=${left##*/} right=TrumpetR/$name sox -M $left $right stereo-$name done The syntax of the Windows command line will be different of course. Also, the above skips all error checking: does the correpsonding right file exist for the left file? Did the SoX run succeed? etc. ------------------------------------------------------------------------------ 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