Re: merging mono files

classic Classic list List threaded Threaded
55 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
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:

Basson16L
....rel00150
........
036-C
........037-C#
........038-D
........etc
....rel00600

........036-C
........037-C#
........038-D
........etc

....rel99999

........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc


Basson16R
....rel00150
........
036-C
........037-C#
........038-D
........etc
....rel00600

........036-C
........037-C#
........038-D
........etc

....rel99999

........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc

Each subfolder has similarly names files as shown.

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!!!

I hope that loops and markers (cues) are not erased in the process!!!


Regards

Mark
(marcusfb(at)gmail.com)





Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Peter P.
* Dr. Mark Bugeja MD <[hidden email]> [2016-12-07 20:54]:
> Hi guys,
Hi Dr. Mark
 
> I cannot interact directly on the mailing list for some reason and had to
> post my question via email.
This is how mailing lists work. You post your question by mail, others
read it and respond via mail (which is what I am doing).
 
> 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.
SoX is a program that you run in a comman line window. Depending on the
operating system you are on you have to open a terminal window
(sometimes called shell) and type commands in there. SoX is one of the
commands you type.
An ixquick.com internet search gave the following webpage as third
result: https://github.com/JoFrhwld/FAVE/wiki/Sox-on-Windows
This, combined with the following instructions how to open that terminal
window (aka shell aka command prompt)
http://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/
should get you going. Try to combine two mono files to one stereo file
as a first example. You might have to get into some shell scripting.
Feel free to report back to this list if basic sox operation is still
not working after you read both sites.

cheers, P
 

> 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:
>
> Basson16L
> ....rel00150
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> ....rel00600
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> ....rel99999
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> 036-C
> 037-C#
> 038-D
> etc
>
>
> Basson16R
> ....rel00150
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> ....rel00600
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> ....rel99999
> ........036-C
> ........037-C#
> ........038-D
> ........etc
> 036-C
> 037-C#
> 038-D
> etc
>
> Each subfolder has similarly names files as shown.
>
> 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!!!
>
> I hope that loops and markers (cues) are not erased in the process!!!
>
> Regards
> Mark
> (marcusfb(at)gmail.com)
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus

> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD

Hi Peter,

Thanks for your reply. Been there, done that. I figured out how to open cmd prompt and set the path.

What I now wish to know is what "code" do I put into a .txt file which I would then change to .bat in order to achieve what I need to achieve?

Regards

Mark



On 07/12/2016 22:07, Peter P. wrote:
* Dr. Mark Bugeja MD [hidden email] [2016-12-07 20:54]:
Hi guys,
Hi Dr. Mark
 
I cannot interact directly on the mailing list for some reason and had to
post my question via email.
This is how mailing lists work. You post your question by mail, others
read it and respond via mail (which is what I am doing).
 
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.
SoX is a program that you run in a comman line window. Depending on the
operating system you are on you have to open a terminal window
(sometimes called shell) and type commands in there. SoX is one of the
commands you type.
An ixquick.com internet search gave the following webpage as third
result: https://github.com/JoFrhwld/FAVE/wiki/Sox-on-Windows
This, combined with the following instructions how to open that terminal
window (aka shell aka command prompt)
http://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/
should get you going. Try to combine two mono files to one stereo file
as a first example. You might have to get into some shell scripting.
Feel free to report back to this list if basic sox operation is still
not working after you read both sites.

cheers, P
 
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:

Basson16L
....rel00150
........036-C
........037-C#
........038-D
........etc
....rel00600
........036-C
........037-C#
........038-D
........etc
....rel99999
........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc


Basson16R
....rel00150
........036-C
........037-C#
........038-D
........etc
....rel00600
........036-C
........037-C#
........038-D
........etc
....rel99999
........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc

Each subfolder has similarly names files as shown.

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!!!

I hope that loops and markers (cues) are not erased in the process!!!

Regards
Mark
(marcusfb(at)gmail.com)




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

      
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users





Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
In reply to this post by Peter P.

jOrgan and GrandOrgue fora (both on sourceforge too) work differently.

Regards
Mark

On 07/12/2016 22:07, Peter P. wrote:
* Dr. Mark Bugeja MD [hidden email] [2016-12-07 20:54]:
Hi guys,
Hi Dr. Mark
 
I cannot interact directly on the mailing list for some reason and had to
post my question via email.
This is how mailing lists work. You post your question by mail, others
read it and respond via mail (which is what I am doing).
 
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.
SoX is a program that you run in a comman line window. Depending on the
operating system you are on you have to open a terminal window
(sometimes called shell) and type commands in there. SoX is one of the
commands you type.
An ixquick.com internet search gave the following webpage as third
result: https://github.com/JoFrhwld/FAVE/wiki/Sox-on-Windows
This, combined with the following instructions how to open that terminal
window (aka shell aka command prompt)
http://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/
should get you going. Try to combine two mono files to one stereo file
as a first example. You might have to get into some shell scripting.
Feel free to report back to this list if basic sox operation is still
not working after you read both sites.

cheers, P
 
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:

Basson16L
....rel00150
........036-C
........037-C#
........038-D
........etc
....rel00600
........036-C
........037-C#
........038-D
........etc
....rel99999
........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc


Basson16R
....rel00150
........036-C
........037-C#
........038-D
........etc
....rel00600
........036-C
........037-C#
........038-D
........etc
....rel99999
........036-C
........037-C#
........038-D
........etc
036-C
037-C#
038-D
etc

Each subfolder has similarly names files as shown.

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!!!

I hope that loops and markers (cues) are not erased in the process!!!

Regards
Mark
(marcusfb(at)gmail.com)




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

      
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users





Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Jeremy Nicoll - ml sox users
On 2016-12-07 22:27, Dr. Mark Bugeja MD wrote:
> jOrgan and GrandOrgue fora (both on sourceforge too) work differently.

Do you mean, "differently from this mail list"?   They would do, as this
is
a mail list not a forum.


Apart from the way of merging two mono files into a stereo file, you
also said
originally:

>>> I hope that loops and markers (cues) are not erased in the process!!!


I think you need to explain what you mean by that. I would expect audio
files
processed by sox to contain just audio data; I don't understand how one
could
contain loop or marker information, and therefore I also don't
understand how
you could possibly expect sox to conserve such information.

Are all your audio files prepared in exactly the same way?

Are they all of exactly the same length, or failing that, are each of
the pairs
you want to merge all of the same length?

Are each pair also at the same sampling rate, bit depth and volume, or
will
differences in those respects need to be solved first?




--
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Peter P.
In reply to this post by Dr. Mark Bugeja MD
* Dr. Mark Bugeja MD <[hidden email]> [2016-12-07 22:08]:
> Hi Peter,
>
> Thanks for your reply. Been there, done that. I figured out how to open cmd
> prompt and set the path.
And I hope you can try simple sox examples such as
 sox input.wav output.wav reverb
etc.
 
> What I now wish to know is what "code" do I put into a .txt file which I
> would then change to .bat in order to achieve what I need to achieve?
I am afraid I can not be of great help here, as I am on Linux where you
would do it with something like

for a in dir1/*.wav; do sox -M dir1/"$a" dir2/"$a" dir3/"$a"; done

(though this is untested and might not even be the precise syntax that
would work on Linux)
In the above example it is assumed that all left-channel files are in
directory dir1, the right channels in dir2 and that an output directory
dir3 exists.

Now I don't know how that is done in the windows command window, but you
might search ixquick.com for "dos run command on all files in directory"
which in my case yields something like
https://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script
https://stackoverflow.com/questions/14237548/batch-script-run-command-on-each-file-in-directory
etc.
and work on from there.

Or some windows users from this list might be able to help out.

cheers, P

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Peter P.
* Peter P. <[hidden email]> [2016-12-08 01:07]:
[...]
> Now I don't know how that is done in the windows command window, but you
> might search ixquick.com for "dos run command on all files in directory"
> which in my case yields something like
> https://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script
> https://stackoverflow.com/questions/14237548/batch-script-run-command-on-each-file-in-directory

Or look at
http://sox.sourceforge.net/Docs/Scripts
or
https://superuser.com/questions/489024/run-sox-batch-on-files-in-a-relative-folder



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
In reply to this post by Jeremy Nicoll - ml sox users

I wish I can send you a photo... but if I did the message will get delayed by moderators as the first message I sent did and is still awaiting moderation!

The fora I mentioned are also mailing-lists so one has 2 options by way of which to post.

The mono pairs match in every way. They were processed by a friend who has since passed away and he must have processed them as stereo samples then separated them in preparation for Hauptwerk software with tremmed samples included too. I am not interested in tremmed samples and for all intents and purposes I need the pairs matched up again so that they can be used for all 3 major software: jOrgan, GrandOrgue and even Hauptwerk itself.

The loops and releases are there already and visible in Sony Soundforge and all pairs of samples match in this respect too.

Regards

Mark


On 08/12/2016 00:05, Jeremy Nicoll - ml sox users wrote:
On 2016-12-07 22:27, Dr. Mark Bugeja MD wrote:
jOrgan and GrandOrgue fora (both on sourceforge too) work differently.
Do you mean, "differently from this mail list"?   They would do, as this 
is
a mail list not a forum.


Apart from the way of merging two mono files into a stereo file, you 
also said
originally:

I hope that loops and markers (cues) are not erased in the process!!!

I think you need to explain what you mean by that. I would expect audio 
files
processed by sox to contain just audio data; I don't understand how one 
could
contain loop or marker information, and therefore I also don't 
understand how
you could possibly expect sox to conserve such information.

Are all your audio files prepared in exactly the same way?

Are they all of exactly the same length, or failing that, are each of 
the pairs
you want to merge all of the same length?

Are each pair also at the same sampling rate, bit depth and volume, or 
will
differences in those respects need to be solved first?








Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
In reply to this post by Peter P.

I am trying to understand all the lingo but not getting anywhere. It would be simpler for me to try and understand Chinese written backwards and upside-down!

Mark


On 08/12/2016 01:09, Peter P. wrote:
* Peter P. [hidden email] [2016-12-08 01:07]:
[...] 
Now I don't know how that is done in the windows command window, but you
might search ixquick.com for "dos run command on all files in directory"
which in my case yields something like
https://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script
https://stackoverflow.com/questions/14237548/batch-script-run-command-on-each-file-in-directory
Or look at
http://sox.sourceforge.net/Docs/Scripts
or 
https://superuser.com/questions/489024/run-sox-batch-on-files-in-a-relative-folder



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users





Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Jeremy Nicoll - ml sox users
On 2016-12-08 00:34, Dr. Mark Bugeja MD wrote:
> I am trying to understand all the lingo but not getting anywhere. It
> would be simpler for me to try and understand Chinese written
> backwards and upside-down!

First, forget about trying to do all the files automatically.  You need
to
find, by trial and error, issuing commands in a command window, a
command
that will take one pair of mono files and produce the merged result you
expect, in the place you expect.

Next, do you have any experience of writing scripts or programs in any
programming
language?  If you do, it's probably easier to develop a script/program
in a
language you understand.  If you don't then someone will be able to show
you how
to adapt the command you find for one pair of files, to work for a
subset or
even perhaps all of your files.


--
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD

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.


On 08/12/2016 02:01, Jeremy Nicoll - ml sox users wrote:
On 2016-12-08 00:34, Dr. Mark Bugeja MD wrote:
I am trying to understand all the lingo but not getting anywhere. It
would be simpler for me to try and understand Chinese written
backwards and upside-down!
First, forget about trying to do all the files automatically.  You need 
to
find, by trial and error, issuing commands in a command window, a 
command
that will take one pair of mono files and produce the merged result you
expect, in the place you expect.

Next, do you have any experience of writing scripts or programs in any 
programming
language?  If you do, it's probably easier to develop a script/program 
in a
language you understand.  If you don't then someone will be able to show 
you how
to adapt the command you find for one pair of files, to work for a 
subset or
even perhaps all of your files.






Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Kevin Conder
In reply to this post by Dr. Mark Bugeja MD
On Wed, Dec 7, 2016 at 1:52 PM, Dr. Mark Bugeja MD <[hidden email]> 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.

--
Kevin Conder

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
Hi,

I shall reply below:


On 08/12/2016 03:15, Kevin Conder wrote:

> On Wed, Dec 7, 2016 at 1:52 PM, Dr. Mark Bugeja MD <[hidden email]> 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
The bat files seems to run with no error but the stereo file is not
created. I am working within the sox folder calling the wav files left
and right respectively and having created a Test.bat file and running it
from cmd prompt:
c:\Program Files (x86)\sox-14-4-2>Test.bat
> 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
Miocrosoft (R) Windows Script Host Version 5.812
> 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:
Done and saved on desktop.

> 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.
No such message pops up. Instead cmd prompt window raises the error:
Input Error: Can not find script file "c:\hello.vbs"
But if I place the vbs file in the sox folder and run the cmd:
c:\Program Files (x86)\sox-14-4-2>cscript hello.vbs
then yes.... I get Hello, World! on the cmd window


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
In reply to this post by Kevin Conder

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 [hidden email] 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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Jan Stary
In reply to this post by Dr. Mark Bugeja MD
On Dec 08 02:36:41, [hidden email] 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Jan Stary
In reply to this post by Jeremy Nicoll - ml sox users
> >>> I hope that loops and markers (cues) are not erased in the process!!!
>
> I think you need to explain what you mean by that. I would expect audio
> files
> processed by sox to contain just audio data; I don't understand how one
> could
> contain loop or marker information, and therefore I also don't
> understand how
> you could possibly expect sox to conserve such information.

Some handheld recorders, for example, allow for saving "markers"
in the file. This is not inbetween the samples, obviously;
these are saved in the header.

A typical application of that is e.g. a journalist marking "next
question" or a field recording marking "next song". I have a ZOOM H1
recorder and a Microtrack II recorder which do that.

I believe SoX does preserve that information in the audio header,
but it's been a long time I checked so I am not sure.

What Mark has seem to be sampled trumpet notes,
so I don't know what kind of markers would that use and why,
but let's see what he reports.

        Jan


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Jeremy Nicoll - ml sox users
On 2016-12-08 07:12, Jan Stary wrote:

> Some handheld recorders, for example, allow for saving "markers"
> in the file. This is not inbetween the samples, obviously;
> these are saved in the header.

Ah, I see.

> A typical application of that is e.g. a journalist marking "next
> question" or a field recording marking "next song". I have a ZOOM H1
> recorder and a Microtrack II recorder which do that.

I've a Tascam HD-P2 which records on to a CF card.  If you look at that
from
a computer, each project is a series of Take<nn>.wav files, plus two
others:
settings.xml & markers.xml.  Clearly, for me, sox would never see the
latter.


--
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD

If Sox does not preserve loops and cues yet.... then please add that to the wish list. It would be very handy for several people doing serious digital sound processing. :-)

Mark


On 08/12/2016 11:46, Jeremy Nicoll - ml sox users wrote:
On 2016-12-08 07:12, Jan Stary wrote:

Some handheld recorders, for example, allow for saving "markers"
in the file. This is not inbetween the samples, obviously;
these are saved in the header.
Ah, I see.

A typical application of that is e.g. a journalist marking "next
question" or a field recording marking "next song". I have a ZOOM H1
recorder and a Microtrack II recorder which do that.
I've a Tascam HD-P2 which records on to a CF card.  If you look at that 
from
a computer, each project is a series of Take<nn>.wav files, plus two 
others:
settings.xml & markers.xml.  Clearly, for me, sox would never see the 
latter.






Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Dr. Mark Bugeja MD
In reply to this post by Jan Stary

I sent an email with a picture.... again it is being held for moderation..... :-(


On 08/12/2016 08:12, Jan Stary wrote:
I hope that loops and markers (cues) are not erased in the process!!!
I think you need to explain what you mean by that. I would expect audio 
files
processed by sox to contain just audio data; I don't understand how one 
could
contain loop or marker information, and therefore I also don't 
understand how
you could possibly expect sox to conserve such information.
Some handheld recorders, for example, allow for saving "markers"
in the file. This is not inbetween the samples, obviously;
these are saved in the header.

A typical application of that is e.g. a journalist marking "next
question" or a field recording marking "next song". I have a ZOOM H1
recorder and a Microtrack II recorder which do that.

I believe SoX does preserve that information in the audio header,
but it's been a long time I checked so I am not sure.

What Mark has seem to be sampled trumpet notes,
so I don't know what kind of markers would that use and why,
but let's see what he reports.

	Jan


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users





Avast logo

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



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: merging mono files

Peter P.
* Dr. Mark Bugeja MD <[hidden email]> [2016-12-08 12:02]:
> I sent an email with a picture.... again it is being held for
> moderation..... :-(
Don't send picture attachments to email lists until you absolutely have
to. Try to describe your problem in words which are then also readable
by visually impaired.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
123