Re: merging mono files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 08 02:36:41, marcusfb@xxxxxxxxx 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
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux