sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <hans@stare.cz>
To: sox-users@lists.sourceforge.net
Subject: Re: merging mono files
Date: Thu, 8 Dec 2016 08:06:47 +0100	[thread overview]
Message-ID: <20161208070646.GA96771@www.stare.cz> (raw)
In-Reply-To: <4b7caa1b-b4a1-52f4-66b9-3a7755f58d94@gmail.com>

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

  reply	other threads:[~2016-12-08  7:33 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f8656c10-854d-2f07-72bc-0b5016a5401b@gmail.com>
2016-12-07 19:52 ` merging mono files Dr. Mark Bugeja MD
2016-12-07 21:07   ` Peter P.
2016-12-07 21:07     ` Dr. Mark Bugeja MD
2016-12-08  0:07       ` Peter P.
2016-12-08  0:09         ` Peter P.
2016-12-08  0:34           ` Dr. Mark Bugeja MD
2016-12-08  1:01             ` Jeremy Nicoll - ml sox users
2016-12-08  1:36               ` Dr. Mark Bugeja MD
2016-12-08  7:06                 ` Jan Stary [this message]
2016-12-07 22:27     ` Dr. Mark Bugeja MD
2016-12-07 23:05       ` Jeremy Nicoll - ml sox users
2016-12-08  0:28         ` Dr. Mark Bugeja MD
2016-12-08  7:12         ` Jan Stary
2016-12-08 10:46           ` Jeremy Nicoll - ml sox users
2016-12-08 10:58             ` Dr. Mark Bugeja MD
2016-12-08 11:45               ` Peter P.
2016-12-08 12:06                 ` Erich Eckner
2016-12-08 13:19                 ` Dr. Mark Bugeja MD
2016-12-08 19:58                   ` fmiser
2016-12-08 20:37                     ` Dr. Mark Bugeja MD
2016-12-08 22:23                       ` Jeremy Nicoll - ml sox users
2016-12-08 23:23                         ` Dr. Mark Bugeja MD
2016-12-09  5:43                           ` Jeremy Nicoll - ml sox users
2016-12-09 12:37                             ` Dr. Mark Bugeja MD
2016-12-09 19:46                               ` Jeremy Nicoll - ml sox users
2016-12-09 20:50                                 ` Dr. Mark Bugeja MD
2016-12-09 13:21                           ` Jan Stary
2016-12-09 13:59                             ` Dr. Mark Bugeja MD
2016-12-09  9:08                       ` fmiser
2016-12-09 11:08                         ` René Bastian
2016-12-09 12:33                         ` Dr. Mark Bugeja MD
2016-12-09 13:36                           ` Jan Stary
2016-12-09 14:03                             ` Dr. Mark Bugeja MD
2016-12-09 12:41                         ` Dr. Mark Bugeja MD
2016-12-09 13:27                         ` Jan Stary
2016-12-09 13:17                       ` Jan Stary
2016-12-09 13:44                         ` Dr. Mark Bugeja MD
2016-12-09 22:48                           ` Jan Stary
2016-12-09 13:02                 ` Jan Stary
2016-12-09 13:38                   ` Jan Stary
2016-12-10  1:21             ` Jeremy Nicoll - ml sox users
2016-12-08 11:00           ` Dr. Mark Bugeja MD
2016-12-08 11:42             ` Peter P.
2016-12-08 13:16               ` Dr. Mark Bugeja MD
2016-12-08 13:47                 ` Doug Lee
2016-12-09 12:49                   ` Dr. Mark Bugeja MD
2016-12-09 13:39                 ` Jan Stary
2016-12-09 14:05                   ` Dr. Mark Bugeja MD
2016-12-08 12:28             ` Jeremy Nicoll - ml sox users
2016-12-08 13:43               ` Dr. Mark Bugeja MD
2016-12-09 13:40               ` Jan Stary
2016-12-09 14:06                 ` Dr. Mark Bugeja MD
2016-12-08  2:15   ` Kevin Conder
2016-12-08  4:29     ` Dr. Mark Bugeja MD
2016-12-08  4:34     ` Dr. Mark Bugeja MD

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=20161208070646.GA96771@www.stare.cz \
    --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).