Discussion:
[SoX-users] merging mono files
Dr. Mark Bugeja MD
2016-12-07 19:52:45 UTC
Permalink
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)




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Peter P.
2016-12-07 21:07:54 UTC
Permalink
Post by Dr. Mark Bugeja MD
Hi guys,
Hi Dr. Mark
Post by Dr. Mark Bugeja MD
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).
Post by Dr. Mark Bugeja MD
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
Post by Dr. Mark Bugeja MD
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
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Dr. Mark Bugeja MD
2016-12-07 21:07:11 UTC
Permalink
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
Post by Peter P.
Post by Dr. Mark Bugeja MD
Hi guys,
Hi Dr. Mark
Post by Dr. Mark Bugeja MD
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).
Post by Dr. Mark Bugeja MD
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
Post by Dr. Mark Bugeja MD
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
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
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Peter P.
2016-12-08 00:07:02 UTC
Permalink
Post by 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.
And I hope you can try simple sox examples such as
sox input.wav output.wav reverb
etc.
Post by Dr. Mark Bugeja MD
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
Peter P.
2016-12-08 00:09:44 UTC
Permalink
* Peter P. <***@fastmail.com> [2016-12-08 01:07]:
[...]
Post by Peter P.
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
Dr. Mark Bugeja MD
2016-12-08 00:34:09 UTC
Permalink
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
Post by Peter P.
[...]
Post by Peter P.
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-08 01:01:59 UTC
Permalink
Post by Dr. Mark Bugeja MD
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
Dr. Mark Bugeja MD
2016-12-08 01:36:41 UTC
Permalink
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.
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
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.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-08 07:06:47 UTC
Permalink
Post by 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.
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.
Dr. Mark Bugeja MD
2016-12-07 22:27:47 UTC
Permalink
jOrgan and GrandOrgue fora (both on sourceforge too) work differently.

Regards
Mark
Post by Peter P.
Post by Dr. Mark Bugeja MD
Hi guys,
Hi Dr. Mark
Post by Dr. Mark Bugeja MD
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).
Post by Dr. Mark Bugeja MD
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
Post by Dr. Mark Bugeja MD
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
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
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-07 23:05:05 UTC
Permalink
Post by Dr. Mark Bugeja MD
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
Post by Dr. Mark Bugeja MD
Post by Dr. Mark Bugeja MD
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
Dr. Mark Bugeja MD
2016-12-08 00:28:58 UTC
Permalink
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
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
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
Post by Dr. Mark Bugeja MD
Post by Dr. Mark Bugeja MD
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?
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-08 07:12:01 UTC
Permalink
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
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
Jeremy Nicoll - ml sox users
2016-12-08 10:46:33 UTC
Permalink
Post by Jan Stary
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.
Post by Jan Stary
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
Dr. Mark Bugeja MD
2016-12-08 10:58:40 UTC
Permalink
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
Post by Jeremy Nicoll - ml sox users
Post by Jan Stary
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.
Post by Jan Stary
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
settings.xml & markers.xml. Clearly, for me, sox would never see the
latter.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Peter P.
2016-12-08 11:45:14 UTC
Permalink
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. :-)
I was thinking about the problem of markers in the file headers when
mixing files together, as Dr. Mark is trying to do. What if the
markers in the left channel and the right channel are not completely
identical? I think this is a more complicated task than just copying
input file markers to the output file when mixing.
Erich Eckner
2016-12-08 12:06:35 UTC
Permalink
Post by Peter P.
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. :-)
I was thinking about the problem of markers in the file headers when
mixing files together, as Dr. Mark is trying to do. What if the
markers in the left channel and the right channel are not completely
identical? I think this is a more complicated task than just copying
input file markers to the output file when mixing.
Hi,

in that case I would propose to issue a warning and copy the markers
from one source - this can be achieved without understanding the markers.
A more elaborate solution could use both markers, but ommit markers
which are too close together. This, however requires extracting and
understanding the information of the markers.

regards,
Erich
Dr. Mark Bugeja MD
2016-12-08 13:19:35 UTC
Permalink
They are *identical *and most probably created when the samples were
still in stereo format as the original recordings were made. The
separation must have been done after to accommodate for Hauptwerk
software's special features. The person who processed them like this
died a year ago. I am now picking up the pieces and re-assembling them
for a different software.
Post by Peter P.
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. :-)
I was thinking about the problem of markers in the file headers when
mixing files together, as Dr. Mark is trying to do. What if the
markers in the left channel and the right channel are not completely
identical? I think this is a more complicated task than just copying
input file markers to the output file when mixing.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
fmiser
2016-12-08 19:58:09 UTC
Permalink
Post by Peter P.
Post by 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. :-)
Keep in mind, SoX is used by a lot of us for a lot of
different tasks. The one task you are wanting to us it for
(joint two mono files into a stereo file) is a very tiny piece
of what SoX can do.
Post by Peter P.
I was thinking about the problem of markers in the file
headers when mixing files together, as Dr. Mark is trying to
do. What if the markers in the left channel and the right
channel are not completely identical? I think this is a more
complicated task than just copying input file markers to the
output file when mixing.
They are *identical*...
In _your_ case, they are identical. But a SoX effect or
function can't be added just for _your_ case. At least, not
if it doesn't behave well for other cases.
... and most probably created
So what should SoX do if it happens to be something other than
"most probably"? SoX is good partly because it does work so
predictably even when doing odd or unusual things.
The separation must have been done after to accommodate
for Hauptwerk software's special features.
Again - in your case. There is no guarantee, or even a high
probability, that other people and other files would be the
same situation.

Something like "preserving loops and cues" has the potential for
being tricky for the reasons Peter wrote. Then, as Jeremy pointed
out, they may be in a sidecar file and not in the audio file
itself.

Have you tested the stereo file you made using SoX? Are the
markers intact? If so, your situation is resolved. If not -
maybe there is a way to copy the info from one of the mono
files to the stereo file.

But so far, I haven't seen from you what these "loops and
cues" are. You described how you use them - but is it in the
header? If so, where? If not the header, then where is it?
Is it in a sidecar file like Jeremy described?
Dr. Mark Bugeja MD
2016-12-08 20:37:02 UTC
Permalink
I cannot give any more information on where the loops and markers are.
They are created using audio software.

It does not matter if SoX would not include features like these. I
thought I'd make my perfectly legitimate request.... I tried.

I'll just have to be patient and do the job manually.

Thanks everyone for your interaction in trying to solve my difficulty.
SoX was recommended to me by a friend with whom I create samplesets. I
took up that recommendation but clearly this is not the software I need,

Apologies for any inconvenience caused. At least I got as far as merging
two files using a bat process. Re-creating loops and markers and
checking each is as much of a task as the process at hand so might as
well just get on with it.

Best wishes to all,

Mark
Post by fmiser
Post by Peter P.
Post by 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. :-)
Keep in mind, SoX is used by a lot of us for a lot of
different tasks. The one task you are wanting to us it for
(joint two mono files into a stereo file) is a very tiny piece
of what SoX can do.
Post by Peter P.
I was thinking about the problem of markers in the file
headers when mixing files together, as Dr. Mark is trying to
do. What if the markers in the left channel and the right
channel are not completely identical? I think this is a more
complicated task than just copying input file markers to the
output file when mixing.
They are *identical*...
In _your_ case, they are identical. But a SoX effect or
function can't be added just for _your_ case. At least, not
if it doesn't behave well for other cases.
... and most probably created
So what should SoX do if it happens to be something other than
"most probably"? SoX is good partly because it does work so
predictably even when doing odd or unusual things.
The separation must have been done after to accommodate
for Hauptwerk software's special features.
Again - in your case. There is no guarantee, or even a high
probability, that other people and other files would be the
same situation.
Something like "preserving loops and cues" has the potential for
being tricky for the reasons Peter wrote. Then, as Jeremy pointed
out, they may be in a sidecar file and not in the audio file
itself.
Have you tested the stereo file you made using SoX? Are the
markers intact? If so, your situation is resolved. If not -
maybe there is a way to copy the info from one of the mono
files to the stereo file.
But so far, I haven't seen from you what these "loops and
cues" are. You described how you use them - but is it in the
header? If so, where? If not the header, then where is it?
Is it in a sidecar file like Jeremy described?
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-08 22:23:55 UTC
Permalink
Post by Dr. Mark Bugeja MD
I cannot give any more information on where the loops and markers are.
They are created using audio software.
Well, what software?
Post by Dr. Mark Bugeja MD
Apologies for any inconvenience caused.
I'm sure no-one thinks you've caused any inconvenience. We're all here
because we want to process audio files, and like the approach that sox
offers.

In my case, I use sox for things because it's easy to keep notes
describing
what sox command I used to do something or other, whereas documenting
how I
may have used a GUI-based application is far more difficult. And, I
worked
as a computer programmer so have little difficulty using sox (& other
tools)
to find things out about portions of a set of audio files, and then use
my
own programs to generate sox commands to manipulate those files.
Post by Dr. Mark Bugeja MD
At least I got as far as
merging two files using a bat process. Re-creating loops and markers
and checking each is as much of a task as the process at hand so might
as well just get on with it.
Does the audio tool within which you created these markers offer any
options
for exporting marker definitions separate from audio data?
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-08 23:23:21 UTC
Permalink
I have already alluded to the audio software I use, in previous posts.
However there is one other I have not mentioned.

I create markers using /*iZotope RX3 Advanced*/. It allows me also to
clean up samples from noise, cut pieces out, and do all sort of editing,
like eliminating artefacts, change frequency of a good sample to say
create missing/ unplayable or discordant notes when sampling a real
instrument like an old pipe organ.

Loops are then generated. I use /*L*//*oop*//*A*//*uditioneer*/
(https://sourceforge.net/projects/loopauditioneer/) created by Lars
Palo, a small but marvellous piece of software. It also sports other
features eg generating pitch information to wav files vital when
selecting to play the virtual instrument set to a different temperament
to that which it was created from.

Some software if used may not show the loops/ markers and if I recall
may even ignore and delete them upon saving any changes. I think, but I
may be wrong, Audacity would do that but /*Sony Soundforge*/ doesn't. I
stand to be corrected. I don't use Audacity that much.

Just for those who are interested, I have a website about my project in
creating digital samplesets of instruments from recorded samples of real
instruments:

* http://maltesepipeorgans.webs.com

One may listen to these virtual instruments, as they are played by
remote musicians in their homes, in my other website:

* http://maltesepipeorgans2.webs.com

I cannot add more than this since I am in no way technically minded to
be able to answer certain questions. I am capable of using some pieces
of software in so far as what I have been taught to do by others in the
know and, like a monkey, I just copy the steps I was shown to accomplish
specific, routine and repetitive tasks in the process of creating
digital wav files. Some processes are carried out by others eg noise
reduction which can prove quite challenging at times considering that
recording are made in churches where chairs are dragged across, doors
banged, people talk in the background, cars, buses, trucks and motor
bikes zooming past and hooting their horn in the busy streets outside,
church bells ringing half way through a session, birds chirping, etc etc
etc. Most frustrating. But the end results of hundreds or even thousands
of hours of hard work are the clear and crisp wav files that can do
justice to the instrument being replicated digitally.

The task I am now performing is basically reversing part of the process
that was done to these files after loops and markers were created....
that of recombining the L and R channels back into single stereo samples
preserving the processing done before the separation. Loops and markers
are created in positions that apply to both channels in a stereo file so
they are bound to match exactly when recombining them again.

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I cannot give any more information on where the loops and markers are.
They are created using audio software.
Well, what software?
Post by Dr. Mark Bugeja MD
Apologies for any inconvenience caused.
I'm sure no-one thinks you've caused any inconvenience. We're all here
because we want to process audio files, and like the approach that sox
offers.
In my case, I use sox for things because it's easy to keep notes
describing
what sox command I used to do something or other, whereas documenting
how I
may have used a GUI-based application is far more difficult. And, I
worked
as a computer programmer so have little difficulty using sox (& other
tools)
to find things out about portions of a set of audio files, and then use
my
own programs to generate sox commands to manipulate those files.
Post by Dr. Mark Bugeja MD
At least I got as far as
merging two files using a bat process. Re-creating loops and markers
and checking each is as much of a task as the process at hand so might
as well just get on with it.
Does the audio tool within which you created these markers offer any
options
for exporting marker definitions separate from audio data?
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-09 05:43:48 UTC
Permalink
Post by Dr. Mark Bugeja MD
I have already alluded to the audio software I use, in previous posts.
However there is one other I have not mentioned....
Thanks for that; I've had a quick look at some of the documentation for
these.
I've also looked for tools that might help; this seems (to me) to be
promising:

http://tonbandstimmen.de/cuelisttool/index_e.htm

It appears to support export of cuelist data (which might include your
loop
& marker info) from WAV files, and also support adding such data back
into
WAV files.

Have you tried it?
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-09 12:37:25 UTC
Permalink
I just did. It lists the cues as text. I copied that, opened the stereo
sample created by sox and similar text appeared for that. Neither would
show a wav profile with the stereo sox generated sample eliciting an
error that it was not in a compatible format. There is no paste button
either!

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I have already alluded to the audio software I use, in previous posts.
However there is one other I have not mentioned....
Thanks for that; I've had a quick look at some of the documentation for
these.
I've also looked for tools that might help; this seems (to me) to be
http://tonbandstimmen.de/cuelisttool/index_e.htm
It appears to support export of cuelist data (which might include your
loop
& marker info) from WAV files, and also support adding such data back
into
WAV files.
Have you tried it?
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-09 19:46:59 UTC
Permalink
Post by Dr. Mark Bugeja MD
I just did. It lists the cues as text. I copied that, opened the
stereo sample created by sox and similar text appeared for that.
So you're saying that the cue info in the mono files DID arrive in the
merged file that sox created?
Post by Dr. Mark Bugeja MD
Neither would show a wav profile
None of the screenshots on that program's website show a 'wav profile'
(if you mean the waveform?) so why would you expect to see one?
Post by Dr. Mark Bugeja MD
with the stereo sox generated sample eliciting an error that it was not
in a compatible format.
But you said at the top that the program did manage to extract cue
information.

Was the cue info from the merged file exactly as you expected it to be?
Post by Dr. Mark Bugeja MD
There is no paste button either!
I've never used the app. Its website says quite clearly that it can
import
cue info to a wave file. Looking at the screenshots, there's a whole
load of
buttons at the righthand side of the main window. Do none of those do
what you
want?


x
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-09 20:50:25 UTC
Permalink
No - the cue information was in the original mono file.

There is a button called wav.... :-/

I tried copying the info from the original file and paste into the
merged stereo one. I couldn't.

I do not have time at present to learn what this program does and how.

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I just did. It lists the cues as text. I copied that, opened the
stereo sample created by sox and similar text appeared for that.
So you're saying that the cue info in the mono files DID arrive in the
merged file that sox created?
Post by Dr. Mark Bugeja MD
Neither would show a wav profile
None of the screenshots on that program's website show a 'wav profile'
(if you mean the waveform?) so why would you expect to see one?
Post by Dr. Mark Bugeja MD
with the stereo sox generated sample eliciting an error that it was not
in a compatible format.
But you said at the top that the program did manage to extract cue
information.
Was the cue info from the merged file exactly as you expected it to be?
Post by Dr. Mark Bugeja MD
There is no paste button either!
I've never used the app. Its website says quite clearly that it can
import
cue info to a wave file. Looking at the screenshots, there's a whole
load of
buttons at the righthand side of the main window. Do none of those do
what you
want?
x
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:21:47 UTC
Permalink
The task I am now performing is basically reversing part of the process that
was done to these files after loops and markers were created.... that of
recombining the L and R channels back into single stereo samples preserving
the processing done before the separation. Loops and markers are created in
positions that apply to both channels in a stereo file so they are bound to
match exactly when recombining them again.
One more question: if these are samples of real instruments,
how much do you need them to be stereo? For e.g. a trumpet,
can you just take the "left trumpet sample" an pronounce it
the stereo trumpet", just duplicating the channel? Or is there
an actual difference? (There will be for pipe organs of course).

But that's probably the same problem when done with SoX:
you would lose the markers.

Jan
Dr. Mark Bugeja MD
2016-12-09 13:59:10 UTC
Permalink
I stated trumpet to give an example. I am processing pipe organs. Pipe
organs have different stops representing different sounds some emulating
and therefore named after the instruments they represent. Each stop
activates that sound for a rage of keys, usually around 61 keys. Each
key pressed will open an airflow vent that channels wind into a pipe and
sound is produced. Successive keys will generate sound from one
(sometimes as many as 20+ pipes) of an array of pipes positioned across
from left to right so one note sounds from a pipe to the left and the
next, a pipe on the right, the next from the left and so on. Since these
pipes in real life are next to each other and occupy a fairly wide space
the stereo recording are used to give that sensation of the pipes'
spacial distribution when played digitally. So it's not a matter of a
simple left and right.

Loops are needed to perpetuate the sound for the duration of time a key
is pressed even though a recorded sample may be of just 6 seconds'
duration. The software loops the sound until the key is release. I have
mentioned this before.

This video may give a bit more insight in what is to be achieved:


Mark
Post by Jan Stary
The task I am now performing is basically reversing part of the process that
was done to these files after loops and markers were created.... that of
recombining the L and R channels back into single stereo samples preserving
the processing done before the separation. Loops and markers are created in
positions that apply to both channels in a stereo file so they are bound to
match exactly when recombining them again.
One more question: if these are samples of real instruments,
how much do you need them to be stereo? For e.g. a trumpet,
can you just take the "left trumpet sample" an pronounce it
the stereo trumpet", just duplicating the channel? Or is there
an actual difference? (There will be for pipe organs of course).
you would lose the markers.
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
fmiser
2016-12-09 09:08:29 UTC
Permalink
Post by Dr. Mark Bugeja MD
I cannot give any more information on where the loops and
markers are. They are created using audio software.
I cannot add more than this since I am in no way technically
minded to be able to answer certain questions.
Okay.

You are embarked on a task that appears to me to involve a
lot of technically minded tasks. I asked because _I_ don't know -
and hoped you would. And just because you don't know the details
doesn't mean SoX and this list can't help.
The list has proven again and again it is eager to help -
especially those who are willing to do some work for themselves.
I will admit, the list is also a bit rough on people who show up
and expect to be handed a solution with no effort of their own.

I'm not wanting to be rude, or harsh, but your early posts
seemed to suggest that you expected the list to tell you
exactly what you must type into the shell to make everything work
just right. That will turn many people away from helping.

Said another way, we are here to _help_ you, not do it for you.
*smiles* The more you help us understand, the more we can help
you.
Post by Dr. Mark Bugeja MD
It does not matter if SoX would not include features like these.
I thought I'd make my perfectly legitimate request.... I tried.
Did you check the one you merged to stereo? Did the markers come
through or did they get lost? Maybe it already does what you want!
Post by Dr. Mark Bugeja MD
and YES I get a stereo.wav which appears correct on Soundforge!!!
Horrah!!
Does that mean the file that SoX merged DID retain the markers you
want? Or is it just the audio and the markers are lost?

What you seem to be describing as loops and cues sure seems to NOT
be part of standard audio file specs. It's impossible for me to
_do_ anything because I don't have any way to be sure any file I
have is what you are working with. Maybe I can add a mark - but
is that the same as the one you have?

If SoX is NOT handling the markers, can you provide sample files?
There are some very clever people who might be able to figure
something out. But if you can't describe it technically, and
can't indicate a standard it conforms to, or provide a sample, we
are probably unable to help you.
Post by Dr. Mark Bugeja MD
I'll just have to be patient and do the job manually.
Do what you want. *smiles* There are a lot of us that are very
happy with what SoX can do for our audio task. I'm willing to bet
every single one of us - probably including the developers - has
had to spend a chuck of time trying to figure out how to use this
supertool called SoX! And if you are not comfortable with command
line, then you have two learning tasks on top of each other.

As to doing a tedious job manually, personally, I prefer spending
time figuring out how to use a batch processing tool - and build a
script to call it - than doing a repetitive task. Then the job is
done AND I have added to my own "toolbox" so I'm better prepared
for the next challenge. But that's just me. You are free - and
welcome - to do as you please.
Post by Dr. Mark Bugeja MD
SoX was recommended to me by a friend with whom I create
samplesets. I took up that recommendation but clearly this is
not the software I need,
SoX is very good at a LOT of audio processing tasks. But it's
also not able to do everything.
Familiarity with using a command line and writing a batch file is
almost essential to what you are wanting to do. Whether using SoX
or one of the tool I list below, success depends on BOTH what
command to run AND how to manipulate the command so it will
process a whole bunch.
You could also look at ecasound, though I think that may be a *nix
only program. It too is a command line audio tool. It
specializes in multitrack recording and editing, and your task of
merging two mono files into a stereo file is just the sort of
thing it does well.

ffmpeg is capable of combining two mono files into a stereo file.
I know it is available for MS Win.

I ran a search for "batch process stereo from two mono files" and found
BatchPro.
http://www.digitalbrain-instruments.com/batchpro

I could not load the website, so I cannot comment further.
René Bastian
2016-12-09 11:08:30 UTC
Permalink
Hello happy soxers,

I use sox/play every day, in rehearsals & performances: it is a good
guy. So some users think: sox does so many things, why does it not
make what i need? Sox can be adapted; for my proper use, i wrote some
little pythons:

def joue(xnom):
" joue le fichier "
if xnom[-4:] == ".raw":
comm = "play -c2 -e signed-integer -r44100 -b16 " + xnom
os.system(comm)
elif xnom[-4:] == ".wav":
comm = "play " + xnom
os.system(comm)

I dont like audiofiles with headers; i prefer couples of 2 files:
audiofilename.raw & audiofilename.info.

The raw files are strictly numeric (made with Python3 + Numpy); the
needed infos (SR, wordsize, markers [if any], etc) are in the
audiofilename.info.

Often headers are of fixed length (in wav files the header size is often
44 bytes long). In my sense, the best is to decode the header and then
to cut it. So one can handle the numeric file as you like it - given
that the OS permits it).

sox, i thank you

rb
--
René Bastian
www.pythoneon.org
Dr. Mark Bugeja MD
2016-12-09 12:33:15 UTC
Permalink
Thank you very much for your feedback. I must admit that this exercise
was presented to me by a friend and I am myself trying to help him. To
do so it seems like I have to learn a lot of things which would be
beyond the routine tasks I do for myself. Generally I do not like
automated processes in my project as it tends to increase artificiality
rather than preserving the warts and all in the creation of digital
replicas of real instruments. I do not want to achieve perfection to end
up with perfect, dull, "synthesized" sounds that would be tiring to the
ears. These just don't sound right and have been an issue with branded
electronic instruments one can buy at music stores for as long as they
have been in existence.

Though I am willing to learn new stuff, learning syntax and codes is not
something I am prepared for at this point in time. I have already gone
well out of my way to help someone else in my benevolence.... putting on
the back burner my own stuff which I need to work on desperately. Whilst
I did request the feature in a SoX update, I retract that completely as
I realised that this situation was a one-off in the line of work I am
doing and I doubt I'd ever come across a similar situation again. Most
samplesets are processed in stereo and left as such. I recently learnt
that it is only Hauptwerk software that apparently needs seperate
channels to achieve a specific effect when tremolo is used.

What I hoped for was that someone had done this before and could tell me
what lines of characters, dots, dashes and stars I needed to type to
create a bat file that would do the job. It appears that many have not
understood the task of creating digital samplesets, don not know what
loops are etc. Fair enough. We're into different field in audio
sampling. Granted. I am a doctor not a brain surgeon and I am not
expected to handle brain tumours other than referring the patient to
hospital if I suspect one.

My apologies if I sounded like I wanted a quick fix. I did want one,
indeed. I don't think anyone would be prepared to learn Japanese to do a
single translation for a friend or himself for that matter.

Regards

Mark
Post by fmiser
Post by Dr. Mark Bugeja MD
I cannot give any more information on where the loops and
markers are. They are created using audio software.
I cannot add more than this since I am in no way technically
minded to be able to answer certain questions.
Okay.
You are embarked on a task that appears to me to involve a
lot of technically minded tasks. I asked because _I_ don't know -
and hoped you would. And just because you don't know the details
doesn't mean SoX and this list can't help.
The list has proven again and again it is eager to help -
especially those who are willing to do some work for themselves.
I will admit, the list is also a bit rough on people who show up
and expect to be handed a solution with no effort of their own.
I'm not wanting to be rude, or harsh, but your early posts
seemed to suggest that you expected the list to tell you
exactly what you must type into the shell to make everything work
just right. That will turn many people away from helping.
Said another way, we are here to _help_ you, not do it for you.
*smiles* The more you help us understand, the more we can help
you.
Post by Dr. Mark Bugeja MD
It does not matter if SoX would not include features like these.
I thought I'd make my perfectly legitimate request.... I tried.
Did you check the one you merged to stereo? Did the markers come
through or did they get lost? Maybe it already does what you want!
Post by Dr. Mark Bugeja MD
and YES I get a stereo.wav which appears correct on Soundforge!!!
Horrah!!
Does that mean the file that SoX merged DID retain the markers you
want? Or is it just the audio and the markers are lost?
What you seem to be describing as loops and cues sure seems to NOT
be part of standard audio file specs. It's impossible for me to
_do_ anything because I don't have any way to be sure any file I
have is what you are working with. Maybe I can add a mark - but
is that the same as the one you have?
If SoX is NOT handling the markers, can you provide sample files?
There are some very clever people who might be able to figure
something out. But if you can't describe it technically, and
can't indicate a standard it conforms to, or provide a sample, we
are probably unable to help you.
Post by Dr. Mark Bugeja MD
I'll just have to be patient and do the job manually.
Do what you want. *smiles* There are a lot of us that are very
happy with what SoX can do for our audio task. I'm willing to bet
every single one of us - probably including the developers - has
had to spend a chuck of time trying to figure out how to use this
supertool called SoX! And if you are not comfortable with command
line, then you have two learning tasks on top of each other.
As to doing a tedious job manually, personally, I prefer spending
time figuring out how to use a batch processing tool - and build a
script to call it - than doing a repetitive task. Then the job is
done AND I have added to my own "toolbox" so I'm better prepared
for the next challenge. But that's just me. You are free - and
welcome - to do as you please.
Post by Dr. Mark Bugeja MD
SoX was recommended to me by a friend with whom I create
samplesets. I took up that recommendation but clearly this is
not the software I need,
SoX is very good at a LOT of audio processing tasks. But it's
also not able to do everything.
Familiarity with using a command line and writing a batch file is
almost essential to what you are wanting to do. Whether using SoX
or one of the tool I list below, success depends on BOTH what
command to run AND how to manipulate the command so it will
process a whole bunch.
You could also look at ecasound, though I think that may be a *nix
only program. It too is a command line audio tool. It
specializes in multitrack recording and editing, and your task of
merging two mono files into a stereo file is just the sort of
thing it does well.
ffmpeg is capable of combining two mono files into a stereo file.
I know it is available for MS Win.
I ran a search for "batch process stereo from two mono files" and found
BatchPro.
http://www.digitalbrain-instruments.com/batchpro
I could not load the website, so I cannot comment further.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:36:54 UTC
Permalink
Thank you very much for your feedback. I must admit that this exercise was
presented to me by a friend and I am myself trying to help him. To do so it
seems like I have to learn a lot of things which would be beyond the routine
tasks I do for myself. Generally I do not like automated processes in my
project as it tends to increase artificiality rather than preserving the
warts and all in the creation of digital replicas of real instruments. I do
not want to achieve perfection to end up with perfect, dull, "synthesized"
sounds that would be tiring to the ears. These just don't sound right and
have been an issue with branded electronic instruments one can buy at music
stores for as long as they have been in existence.
Joining the left and right channel of a trumpet,
an automated process if there is one, surely does not
"increase artificiality", and is precisely a thing
that should be done automatically.
Most samplesets are
processed in stereo and left as such. I recently learnt that it is only
Hauptwerk software that apparently needs seperate channels to achieve a
specific effect when tremolo is used.
Eh, throw it away then.
Dr. Mark Bugeja MD
2016-12-09 14:03:50 UTC
Permalink
Try tell that to professional organist. You won't be getting any
standing ovation!

Hauptwerk is considered the best, most professional software for playing
digital organs, pianos, harpsichords etc. and it does not come cheap
either, as do most of the samplesets for this software!
Post by Jan Stary
Thank you very much for your feedback. I must admit that this exercise was
presented to me by a friend and I am myself trying to help him. To do so it
seems like I have to learn a lot of things which would be beyond the routine
tasks I do for myself. Generally I do not like automated processes in my
project as it tends to increase artificiality rather than preserving the
warts and all in the creation of digital replicas of real instruments. I do
not want to achieve perfection to end up with perfect, dull, "synthesized"
sounds that would be tiring to the ears. These just don't sound right and
have been an issue with branded electronic instruments one can buy at music
stores for as long as they have been in existence.
Joining the left and right channel of a trumpet,
an automated process if there is one, surely does not
"increase artificiality", and is precisely a thing
that should be done automatically.
Most samplesets are
processed in stereo and left as such. I recently learnt that it is only
Hauptwerk software that apparently needs seperate channels to achieve a
specific effect when tremolo is used.
Eh, throw it away then.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Dr. Mark Bugeja MD
2016-12-09 12:41:09 UTC
Permalink
Furthermore, I am sure I have mentioned already in a previous message
that the sox generated stereo sample did not show up and cues or loops.
It merely merged the two mono files.

I'll look into BatchPro as my last chance on the matter.
Post by fmiser
Post by Dr. Mark Bugeja MD
I cannot give any more information on where the loops and
markers are. They are created using audio software.
I cannot add more than this since I am in no way technically
minded to be able to answer certain questions.
Okay.
You are embarked on a task that appears to me to involve a
lot of technically minded tasks. I asked because _I_ don't know -
and hoped you would. And just because you don't know the details
doesn't mean SoX and this list can't help.
The list has proven again and again it is eager to help -
especially those who are willing to do some work for themselves.
I will admit, the list is also a bit rough on people who show up
and expect to be handed a solution with no effort of their own.
I'm not wanting to be rude, or harsh, but your early posts
seemed to suggest that you expected the list to tell you
exactly what you must type into the shell to make everything work
just right. That will turn many people away from helping.
Said another way, we are here to _help_ you, not do it for you.
*smiles* The more you help us understand, the more we can help
you.
Post by Dr. Mark Bugeja MD
It does not matter if SoX would not include features like these.
I thought I'd make my perfectly legitimate request.... I tried.
Did you check the one you merged to stereo? Did the markers come
through or did they get lost? Maybe it already does what you want!
Post by Dr. Mark Bugeja MD
and YES I get a stereo.wav which appears correct on Soundforge!!!
Horrah!!
Does that mean the file that SoX merged DID retain the markers you
want? Or is it just the audio and the markers are lost?
What you seem to be describing as loops and cues sure seems to NOT
be part of standard audio file specs. It's impossible for me to
_do_ anything because I don't have any way to be sure any file I
have is what you are working with. Maybe I can add a mark - but
is that the same as the one you have?
If SoX is NOT handling the markers, can you provide sample files?
There are some very clever people who might be able to figure
something out. But if you can't describe it technically, and
can't indicate a standard it conforms to, or provide a sample, we
are probably unable to help you.
Post by Dr. Mark Bugeja MD
I'll just have to be patient and do the job manually.
Do what you want. *smiles* There are a lot of us that are very
happy with what SoX can do for our audio task. I'm willing to bet
every single one of us - probably including the developers - has
had to spend a chuck of time trying to figure out how to use this
supertool called SoX! And if you are not comfortable with command
line, then you have two learning tasks on top of each other.
As to doing a tedious job manually, personally, I prefer spending
time figuring out how to use a batch processing tool - and build a
script to call it - than doing a repetitive task. Then the job is
done AND I have added to my own "toolbox" so I'm better prepared
for the next challenge. But that's just me. You are free - and
welcome - to do as you please.
Post by Dr. Mark Bugeja MD
SoX was recommended to me by a friend with whom I create
samplesets. I took up that recommendation but clearly this is
not the software I need,
SoX is very good at a LOT of audio processing tasks. But it's
also not able to do everything.
Familiarity with using a command line and writing a batch file is
almost essential to what you are wanting to do. Whether using SoX
or one of the tool I list below, success depends on BOTH what
command to run AND how to manipulate the command so it will
process a whole bunch.
You could also look at ecasound, though I think that may be a *nix
only program. It too is a command line audio tool. It
specializes in multitrack recording and editing, and your task of
merging two mono files into a stereo file is just the sort of
thing it does well.
ffmpeg is capable of combining two mono files into a stereo file.
I know it is available for MS Win.
I ran a search for "batch process stereo from two mono files" and found
BatchPro.
http://www.digitalbrain-instruments.com/batchpro
I could not load the website, so I cannot comment further.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:27:31 UTC
Permalink
Post by fmiser
What you seem to be describing as loops and cues sure seems to NOT
be part of standard audio file specs.
It is standardized a bit:
https://en.wikipedia.org/wiki/Broadcast_Wave_Format

The files I sent earlier are BWF files, which means WAV
with some extensions in the header - such as markers.
Jan Stary
2016-12-09 13:17:11 UTC
Permalink
I cannot give any more information on where the loops and markers are. They
are created using audio software.
Of course they are. How does that mean you cannot give
any more information? Create the stereo file as advised
and look at the result with an "audio software" which
recognizes merkers and loops and cues and whatnot.

Are they there? That is, did SoX preserve them?
I just tested, and it seems SoX does _not_ preserve them.

BTW, here is a teeny tiny "audio software" which can display
the markers and cues, and three files to test it on.

http://stare.cz/utils/libwav.tar
http://stare.cz/.tmp/microtrack.wav
http://stare.cz/.tmp/zoom-H1.wav
http://stare.cz/.tmp/zoom-H2.wav
It does not matter if SoX would not include features like these. I thought
I'd make my perfectly legitimate request.... I tried.
I'll repeat: what kind of recordings is it that you are processing?
So far, it seems they are trumpet note samples? Does it use markers?
If they are small enough, can you show us two of them (left and right)?
I'll just have to be patient and do the job manually.
No, why would you?
Thanks everyone for your interaction in trying to solve my difficulty. SoX
was recommended to me by a friend with whom I create samplesets. I took up
that recommendation but clearly this is not the software I need,
Well, it seems SoX would not preserver the markers for you.
I might add markers copying to the tool above.

Jan
Dr. Mark Bugeja MD
2016-12-09 13:44:38 UTC
Permalink
Sorry.... I meant what not where.

Sox did NOT preserve the markers.

I have sent a link to a picture before.

Here it is again:
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0

Regards

Mark
Post by Jan Stary
I cannot give any more information on where the loops and markers are. They
are created using audio software.
Of course they are. How does that mean you cannot give
any more information? Create the stereo file as advised
and look at the result with an "audio software" which
recognizes merkers and loops and cues and whatnot.
Are they there? That is, did SoX preserve them?
I just tested, and it seems SoX does _not_ preserve them.
BTW, here is a teeny tiny "audio software" which can display
the markers and cues, and three files to test it on.
http://stare.cz/utils/libwav.tar
http://stare.cz/.tmp/microtrack.wav
http://stare.cz/.tmp/zoom-H1.wav
http://stare.cz/.tmp/zoom-H2.wav
It does not matter if SoX would not include features like these. I thought
I'd make my perfectly legitimate request.... I tried.
I'll repeat: what kind of recordings is it that you are processing?
So far, it seems they are trumpet note samples? Does it use markers?
If they are small enough, can you show us two of them (left and right)?
I'll just have to be patient and do the job manually.
No, why would you?
Thanks everyone for your interaction in trying to solve my difficulty. SoX
was recommended to me by a friend with whom I create samplesets. I took up
that recommendation but clearly this is not the software I need,
Well, it seems SoX would not preserver the markers for you.
I might add markers copying to the tool above.
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 22:48:45 UTC
Permalink
Post by Dr. Mark Bugeja MD
Sorry.... I meant what not where.
Sox did NOT preserve the markers.
I have sent a link to a picture before.
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0
Here's the error message again:

An error occurred while loading MEGA.

Filename: :0
Exception: out of memory

Please try again later. We apologize for the inconvenience.
Jan Stary
2016-12-09 13:02:38 UTC
Permalink
Post by Peter P.
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. :-)
I was thinking about the problem of markers in the file headers when
mixing files together, as Dr. Mark is trying to do. What if the
markers in the left channel and the right channel are not completely
identical? I think this is a more complicated task than just copying
input file markers to the output file when mixing.
I believe the markers are just points in time, i.e. they exist for
the stream as a whole, not for individual channels. At least
I have not seen those yet.
Jan Stary
2016-12-09 13:38:23 UTC
Permalink
Post by Jan Stary
Post by Peter P.
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. :-)
I was thinking about the problem of markers in the file headers when
mixing files together, as Dr. Mark is trying to do. What if the
markers in the left channel and the right channel are not completely
identical? I think this is a more complicated task than just copying
input file markers to the output file when mixing.
I believe the markers are just points in time, i.e. they exist for
the stream as a whole, not for individual channels. At least
I have not seen those yet.
(Unless the two channels are separate files of course)
Jeremy Nicoll - ml sox users
2016-12-10 01:21:04 UTC
Permalink
Post by Jeremy Nicoll - ml sox users
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
settings.xml & markers.xml.
I don't normally use the marker facility on this machine, but I've just
made a
small experimental recording and placed three markers in it. Here is
what the
markers.xml file then contained:

<?xml version="1.0"?>
<ProjectMarkers>
<Marker>
<Name>Mark00</Name>
<Location>
<Low>791552l</Low>
<High>0l</High>
</Location>
</Marker>
<Marker>
<Name>Mark01</Name>
<Location>
<Low>1192960l</Low>
<High>0l</High>
</Location>
</Marker>
<Marker>
<Name>Mark02</Name>
<Location>
<Low>1490944l</Low>
<High>0l</High>
</Location>
</Marker>
</ProjectMarkers>

As well as these user-set markers, it's possible to have the machine
insert
markers of its own, when there's "overs", or time-code dropouts.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-08 11:00:32 UTC
Permalink
I sent an email with a picture.... again it is being held for
moderation..... :-(
Post by Jan Stary
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Peter P.
2016-12-08 11:42:30 UTC
Permalink
Post by Dr. Mark Bugeja MD
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.
Dr. Mark Bugeja MD
2016-12-08 13:16:44 UTC
Permalink
A picture saves 100 words
Post by Peter P.
Post by Dr. Mark Bugeja MD
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Doug Lee
2016-12-08 13:47:15 UTC
Permalink
Post by Dr. Mark Bugeja MD
A picture saves 100 words
Unless the recipient is blind.

I am.

Sorry though, I am a seasoned SoX user but have not managed to follow this particular discussion carefully.

On 08/12/2016 12:42, Peter P. wrote:

* Dr. Mark Bugeja MD [1]<***@gmail.com> [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
[2]Sox-***@lists.sourceforge.net
[3]https://lists.sourceforge.net/lists/listinfo/sox-users

__________________________________________________________________

[4]Avast logo

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

References

1. mailto:***@gmail.com
2. mailto:Sox-***@lists.sourceforge.net
3. https://lists.sourceforge.net/lists/listinfo/sox-users
4. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
5. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient

------------------------------------------------------------------------------
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-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
--
Doug Lee ***@dlee.org http://www.dlee.org
SSB BART Group ***@ssbbartgroup.com http://www.ssbbartgroup.com
"I honestly believe it is better to know nothing than to know what ain't so."
- Josh Billings, 1818-1885 (in "Solemn Thoughts")
Dr. Mark Bugeja MD
2016-12-09 12:49:46 UTC
Permalink
Apologies. Many of us tend to take a lot of things forgranted.

Mark
Post by Doug Lee
Post by Dr. Mark Bugeja MD
A picture saves 100 words
Unless the recipient is blind.
I am.
Sorry though, I am a seasoned SoX user but have not managed to follow this particular discussion carefully.
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
[3]https://lists.sourceforge.net/lists/listinfo/sox-users
__________________________________________________________________
[4]Avast logo
This email has been checked for viruses by Avast antivirus software.
[5]www.avast.com
References
3. https://lists.sourceforge.net/lists/listinfo/sox-users
4. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
5. https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:39:01 UTC
Permalink
Post by Dr. Mark Bugeja MD
A picture saves 100 words
A picture wastes 100 kilobytes.
Dr. Mark Bugeja MD
2016-12-09 14:05:49 UTC
Permalink
indeed. But they do drive home in an instant a point far better than a
lengthy description.
Post by Jan Stary
Post by Dr. Mark Bugeja MD
A picture saves 100 words
A picture wastes 100 kilobytes.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-08 12:28:48 UTC
Permalink
Post by Dr. Mark Bugeja MD
I sent an email with a picture.... again it is being held for
moderation..... :-(
Many mail lists don't accept any attachments of any sort to the mails.

The way a mail list works is whatever you send to the machine that runs
the
list gets sent out to every subscriber - which on some lists will be
tens of
thousands of people. Subscribers generally don't want to see what are
often
huge files (and might contain malware).

Instead, if you want us to see a picture, upload it to some picture
hosting
website, and include that picture's URL in your mail. Then anyone who
wants
to look at it will go and fetch it, but the rest of us won't have to
waste
bandwidth getting it even when we didn't want it.

Likewise, don't try to send audio files with your posts...
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-08 13:43:23 UTC
Permalink
jOrgan forum/ mailing list on sourceforge works so well:

http://jorgan.999862.n4.nabble.com/jOrgan-User-f999863.html

Regards

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I sent an email with a picture.... again it is being held for
moderation..... :-(
Many mail lists don't accept any attachments of any sort to the mails.
The way a mail list works is whatever you send to the machine that runs
the
list gets sent out to every subscriber - which on some lists will be
tens of
thousands of people. Subscribers generally don't want to see what are
often
huge files (and might contain malware).
Instead, if you want us to see a picture, upload it to some picture
hosting
website, and include that picture's URL in your mail. Then anyone who
wants
to look at it will go and fetch it, but the rest of us won't have to
waste
bandwidth getting it even when we didn't want it.
Likewise, don't try to send audio files with your posts...
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:40:14 UTC
Permalink
Post by Jeremy Nicoll - ml sox users
Instead, if you want us to see a picture, upload it to some picture
hosting
website, and include that picture's URL in your mail.
wants
to look at it will go and fetch it, but the rest of us won't have to
waste
bandwidth getting it even when we didn't want it.
Likewise, don't try to send audio files with your posts...
But _do_ post them somewhere and give us a link.
Dr. Mark Bugeja MD
2016-12-09 14:06:55 UTC
Permalink
I have twice... but some messages are not being seen or read through, I
guess. :-(
Post by Jan Stary
Post by Jeremy Nicoll - ml sox users
Instead, if you want us to see a picture, upload it to some picture
hosting
website, and include that picture's URL in your mail.
wants
to look at it will go and fetch it, but the rest of us won't have to
waste
bandwidth getting it even when we didn't want it.
Likewise, don't try to send audio files with your posts...
But _do_ post them somewhere and give us a link.
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Kevin Conder
2016-12-08 02:15:46 UTC
Permalink
Post by 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 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
Dr. Mark Bugeja MD
2016-12-08 04:29:47 UTC
Permalink
Hi,
Post by Kevin Conder
Post by 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 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
Post by Kevin Conder
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".)
cscript.exe
Miocrosoft (R) Windows Script Host Version 5.812
Post by Kevin Conder
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
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
Done and saved on desktop.
Post by Kevin Conder
Wscript.Echo "Hello, World!"
To run the hello.vbs VBScript program, type the following command at
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
Dr. Mark Bugeja MD
2016-12-08 04:34:01 UTC
Permalink
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!!
Post by Kevin Conder
Post by 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 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".)
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
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
Wscript.Echo "Hello, World!"
To run the hello.vbs VBScript program, type the following command at
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
Dr. Mark Bugeja MD
2016-12-08 13:36:54 UTC
Permalink
Hi. I hope I can explain.

Loops are markers that allow appropriate software to keep sounding a
note (recorded sample) played digitally on a MIDI keyboard for as long
as the note is held down even though the recorded sample may be of only
a few seconds' duration.

The release marker is placed in the point where the note is released in
the actual recorded sample and where the sounds starts to fade away. The
software needs to know that moment especially if there are multiple
releases available for that note that would represent "staccato",
"portato" and longer held notes. This exercise renders more realism when
recorded samples are played from a "sampleset" loaded in software like
jOrgan, GrandOrgue and Hauptwerk.

Picture (42kB):
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0

In the example demonstated there is no release marker as the "tail" of
the waveform was removed and saved as a separate file. So the end of a
loops would be the release marker in such instances.

Clearly from this picture loops and markers were not retained in the
merger using sox though the exercise was purely a simple exercise
without any frills of extra codes.

Regards

Mark
Post by Jan Stary
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 13:51:53 UTC
Permalink
Loops are markers that allow appropriate software to keep sounding a note
(recorded sample) played digitally on a MIDI keyboard for as long as the
note is held down even though the recorded sample may be of only a few
seconds' duration.
The release marker is placed in the point where the note is released in the
actual recorded sample and where the sounds starts to fade away. The
software needs to know that moment especially if there are multiple releases
available for that note that would represent "staccato", "portato" and
longer held notes. This exercise renders more realism when recorded samples
are played from a "sampleset" loaded in software like jOrgan, GrandOrgue and
Hauptwerk.
This would be a perfect beginning of your original post.
Now I understand why you need to preserve them: you are building
and actual sample library to be used with MIDI. Indeed, attack
and sustain and release and decay are indisposable.
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0
An error occurred while loading MEGA.
Filename: :0
Exception: out of memory
Please try again later. We apologize for the inconvenience
In the example demonstated there is no release marker as the "tail" of the
waveform was removed and saved as a separate file. So the end of a loops
would be the release marker in such instances.
Clearly from this picture loops and markers were not retained in the merger
using sox though the exercise was purely a simple exercise without any
frills of extra codes.
I don't have the picture, but I thnik I can picture it.
How is a piece of audio software (a clickwty editor)
expected to display a waveform with cue points such as release?
Especially if there is more than one possible release point?

Can you please post some of the original files (that do have
the markers) so that we make actually look at them?

Jan
Dr. Mark Bugeja MD
2016-12-09 14:10:25 UTC
Permalink
The mega links works - just tried it myself.

These are the original left and right wav samples and the stereo (sox
generated) file together with the bat file used.

https://mega.nz/#!oYYlARqQ!HMwkzCuDoFjBQvUwEFJjnrDbuJrN5kQ6ptKlEV5QWng
Post by Jan Stary
Loops are markers that allow appropriate software to keep sounding a note
(recorded sample) played digitally on a MIDI keyboard for as long as the
note is held down even though the recorded sample may be of only a few
seconds' duration.
The release marker is placed in the point where the note is released in the
actual recorded sample and where the sounds starts to fade away. The
software needs to know that moment especially if there are multiple releases
available for that note that would represent "staccato", "portato" and
longer held notes. This exercise renders more realism when recorded samples
are played from a "sampleset" loaded in software like jOrgan, GrandOrgue and
Hauptwerk.
This would be a perfect beginning of your original post.
Now I understand why you need to preserve them: you are building
and actual sample library to be used with MIDI. Indeed, attack
and sustain and release and decay are indisposable.
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0
An error occurred while loading MEGA.
Filename: :0
Exception: out of memory
Please try again later. We apologize for the inconvenience
In the example demonstated there is no release marker as the "tail" of the
waveform was removed and saved as a separate file. So the end of a loops
would be the release marker in such instances.
Clearly from this picture loops and markers were not retained in the merger
using sox though the exercise was purely a simple exercise without any
frills of extra codes.
I don't have the picture, but I thnik I can picture it.
How is a piece of audio software (a clickwty editor)
expected to display a waveform with cue points such as release?
Especially if there is more than one possible release point?
Can you please post some of the original files (that do have
the markers) so that we make actually look at them?
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Erich Eckner
2016-12-09 17:48:54 UTC
Permalink
Hi,

I just had a brief look at your example files and it looks like the mono
files are actually stereo, but with one channel muted (in retrospect I
think, you mentioned that). So the correct sox comman to combine these
would be

sox -M left.wav right.wav stereo.wav remix 1 4

this imports all 4 channels (actual left channel, silent right channel
in left file, silent left channel in right file, actual right channel)
to sox and exports only the actual left and right in one file (a.k.a.
stereo).
However, this will still not preserve the markers.

regards,
Erich
Post by Dr. Mark Bugeja MD
The mega links works - just tried it myself.
These are the original left and right wav samples and the stereo (sox
generated) file together with the bat file used.
https://mega.nz/#!oYYlARqQ!HMwkzCuDoFjBQvUwEFJjnrDbuJrN5kQ6ptKlEV5QWng
Post by Jan Stary
Loops are markers that allow appropriate software to keep sounding a note
(recorded sample) played digitally on a MIDI keyboard for as long as the
note is held down even though the recorded sample may be of only a few
seconds' duration.
The release marker is placed in the point where the note is released in the
actual recorded sample and where the sounds starts to fade away. The
software needs to know that moment especially if there are multiple releases
available for that note that would represent "staccato", "portato" and
longer held notes. This exercise renders more realism when recorded samples
are played from a "sampleset" loaded in software like jOrgan, GrandOrgue and
Hauptwerk.
This would be a perfect beginning of your original post.
Now I understand why you need to preserve them: you are building
and actual sample library to be used with MIDI. Indeed, attack
and sustain and release and decay are indisposable.
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0
An error occurred while loading MEGA.
Filename: :0
Exception: out of memory
Please try again later. We apologize for the inconvenience
In the example demonstated there is no release marker as the "tail" of the
waveform was removed and saved as a separate file. So the end of a loops
would be the release marker in such instances.
Clearly from this picture loops and markers were not retained in the merger
using sox though the exercise was purely a simple exercise without any
frills of extra codes.
I don't have the picture, but I thnik I can picture it.
How is a piece of audio software (a clickwty editor)
expected to display a waveform with cue points such as release?
Especially if there is more than one possible release point?
Can you please post some of the original files (that do have
the markers) so that we make actually look at them?
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Dr. Mark Bugeja MD
2016-12-09 18:58:33 UTC
Permalink
neither will it preserve pitch information I noticed. :-(

Ok.... if I were to carry on with sox, what syntax would I need to use
so that all the 61 files in a folder are matched up with the
corresponding ones to output files with the same name in a different folder?

The files are called by notes on a scale preceded by a number eg
036-C.wav, 037-C#.wav, 038-D.wav, and so on. I therefore need to match
the 036-C.wav in the left folder with the 036-C.wav in the right folder.

Mark
Post by Erich Eckner
Hi,
I just had a brief look at your example files and it looks like the mono
files are actually stereo, but with one channel muted (in retrospect I
think, you mentioned that). So the correct sox comman to combine these
would be
sox -M left.wav right.wav stereo.wav remix 1 4
this imports all 4 channels (actual left channel, silent right channel
in left file, silent left channel in right file, actual right channel)
to sox and exports only the actual left and right in one file (a.k.a.
stereo).
However, this will still not preserve the markers.
regards,
Erich
Post by Dr. Mark Bugeja MD
The mega links works - just tried it myself.
These are the original left and right wav samples and the stereo (sox
generated) file together with the bat file used.
https://mega.nz/#!oYYlARqQ!HMwkzCuDoFjBQvUwEFJjnrDbuJrN5kQ6ptKlEV5QWng
Post by Jan Stary
Loops are markers that allow appropriate software to keep sounding a note
(recorded sample) played digitally on a MIDI keyboard for as long as the
note is held down even though the recorded sample may be of only a few
seconds' duration.
The release marker is placed in the point where the note is released in the
actual recorded sample and where the sounds starts to fade away. The
software needs to know that moment especially if there are multiple releases
available for that note that would represent "staccato", "portato" and
longer held notes. This exercise renders more realism when recorded samples
are played from a "sampleset" loaded in software like jOrgan, GrandOrgue and
Hauptwerk.
This would be a perfect beginning of your original post.
Now I understand why you need to preserve them: you are building
and actual sample library to be used with MIDI. Indeed, attack
and sustain and release and decay are indisposable.
https://mega.nz/#!dQIwkDKI!QlrmlYHywFqpG9ujJfJLBm_1skxaYz88AJJJy4Euxs0
An error occurred while loading MEGA.
Filename: :0
Exception: out of memory
Please try again later. We apologize for the inconvenience
In the example demonstated there is no release marker as the "tail" of the
waveform was removed and saved as a separate file. So the end of a loops
would be the release marker in such instances.
Clearly from this picture loops and markers were not retained in the merger
using sox though the exercise was purely a simple exercise without any
frills of extra codes.
I don't have the picture, but I thnik I can picture it.
How is a piece of audio software (a clickwty editor)
expected to display a waveform with cue points such as release?
Especially if there is more than one possible release point?
Can you please post some of the original files (that do have
the markers) so that we make actually look at them?
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
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
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-09 22:55:34 UTC
Permalink
Ok.... if I were to carry on with sox, what syntax would I need to use so
that all the 61 files in a folder are matched up with the corresponding ones
to output files with the same name in a different folder?
http://marc.info/?l=sox-users&m=148118243012683&w=2
Dr. Mark Bugeja MD
2016-12-10 06:42:16 UTC
Permalink
Thanks for that reply. Would that code, reproduced here,

for left in TrumpetL/*wav; do
name=${left##*/}
right=TrumpetR/$name
sox -M $left $right stereo-$name
done

create a new folder called *Trum**pet* and have the stereo files
produced from the merger?

I am assuming this is the bat file I need to create.

Mark**
Post by Jan Stary
Ok.... if I were to carry on with sox, what syntax would I need to use so
that all the 61 files in a folder are matched up with the corresponding ones
to output files with the same name in a different folder?
http://marc.info/?l=sox-users&m=148118243012683&w=2
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-10 21:49:40 UTC
Permalink
Post by Dr. Mark Bugeja MD
Thanks for that reply. Would that code, reproduced here,
for left in TrumpetL/*wav; do
name=${left##*/}
right=TrumpetR/$name
sox -M $left $right stereo-$name
done
create a new folder called *Trum**pet* and have the stereo files produced
from the merger?
No. This would create the merged files in the current directory.
That could trivially be changed by running "mkdir Trumpet" first
and then "sox -M $left $right Trumpet/stereo-$name" instead of the above.
Post by Dr. Mark Bugeja MD
I am assuming this is the bat file I need to create.
No. As I said in the original post, this is written for the
standard UNIX shell. The syntax of your widows command prompt
surely is different. I don't speak that.

Do not just run some code snippet someone offers you here or elsewhere.
Invest enough time into writing it yourself from scratch to understand
precisely what it does. It will be a few lines anyway.

Jan
Post by Dr. Mark Bugeja MD
Post by Jan Stary
Ok.... if I were to carry on with sox, what syntax would I need to use so
that all the 61 files in a folder are matched up with the corresponding ones
to output files with the same name in a different folder?
http://marc.info/?l=sox-users&m=148118243012683&w=2
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Jeremy Nicoll - ml sox users
2016-12-09 23:41:44 UTC
Permalink
Post by Dr. Mark Bugeja MD
neither will it preserve pitch information I noticed. :-(
Ok.... if I were to carry on with sox, what syntax would I need to use
so that all the 61 files in a folder are matched up with the
corresponding ones to output files with the same name in a different folder?
The files are called by notes on a scale preceded by a number eg
036-C.wav, 037-C#.wav, 038-D.wav, and so on. I therefore need to match
the 036-C.wav in the left folder with the 036-C.wav in the right folder.
Someone will need to give you a small program that can do that. I'm not
going to,
because the language I write my utilities in won't be on your system and
you'd
have to install and configure it, and understand what you were doing
before you
could move on and actually use it.

But someone established elsewhere in the thread that VBS (I think it
was) will run
on your system. I know nothing about VBS but someone will tell you what
to do.

Jan Stary has - again - pointed you at some code that would work on a
Linux system
but not on Windows. In essence what it does is

- makes a list of all the files in (eg a 'left files' folder), whose
names end in "wav"
- then one at a time, work through that list, and:
- work out the full name of the corresponding 'right' file
- work out the full name of the corresponding stereo file
- issue a sox command with all three names in it

As Jan pointed out, a simple loop like this isn't a terribly good idea;
it's better if
there are some sanity checks in it as well - making sure that the
derived 'right' file
actually exists before you try to use it, make sure that the result file
doesn't exist,
stop if the sox command fails... If it were my code I would probably
also check that
the left & right files had the exact same size before they were used.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-10 06:44:53 UTC
Permalink
The files have to match in name not size
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
neither will it preserve pitch information I noticed. :-(
Ok.... if I were to carry on with sox, what syntax would I need to use
so that all the 61 files in a folder are matched up with the
corresponding ones to output files with the same name in a different folder?
The files are called by notes on a scale preceded by a number eg
036-C.wav, 037-C#.wav, 038-D.wav, and so on. I therefore need to match
the 036-C.wav in the left folder with the 036-C.wav in the right folder.
Someone will need to give you a small program that can do that. I'm not
going to,
because the language I write my utilities in won't be on your system and
you'd
have to install and configure it, and understand what you were doing
before you
could move on and actually use it.
But someone established elsewhere in the thread that VBS (I think it
was) will run
on your system. I know nothing about VBS but someone will tell you what
to do.
Jan Stary has - again - pointed you at some code that would work on a
Linux system
but not on Windows. In essence what it does is
- makes a list of all the files in (eg a 'left files' folder), whose
names end in "wav"
- work out the full name of the corresponding 'right' file
- work out the full name of the corresponding stereo file
- issue a sox command with all three names in it
As Jan pointed out, a simple loop like this isn't a terribly good idea;
it's better if
there are some sanity checks in it as well - making sure that the
derived 'right' file
actually exists before you try to use it, make sure that the result file
doesn't exist,
stop if the sox command fails... If it were my code I would probably
also check that
the left & right files had the exact same size before they were used.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-10 09:23:48 UTC
Permalink
Post by Dr. Mark Bugeja MD
The files have to match in name not size
Oh?

I think what you mean is that you WANT the final stereo file to have the
same (note/pitch) name as the left & right parts.

But from everything you've said, as each pair of left & right files are
meant to
have been created from the same original source file, they should have
the exact
same size. Putting a check that that's actually the case into a script
that
is automating merging is the kind of thing a programmer would do as an
example
of 'sanity checking'. It should always be true, but if it isn't it's
better
that the script stops what it's doing so the user can investigate why.

On the other hand, if you already have lots of pairs of files which are
not the
same size... why is that?

Maybe they contain the same number of audio samples, but different
amounts of header
data? If that's commonly the case I would add to my script calls of sox
with the
stat or stats (or both) effects to check in more detail that the audio
in each file
has common characteristics.

I might also change code that expected files to be the same size, to
something that
(say) accepted only very small differences in size.


It's normal for carefully-written programs to check that everything they
do actually
works, because a program can get into a terrible mess if it just issues
commands and
assumes that every one of them did exactly what was hoped. Depending
somewhat on the
language that a program is written in, maybe two thirds of the code in a
program will
be all about checking for problems and recovering from them.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-10 10:18:05 UTC
Permalink
Hi all,

What you are saying is right. I did find one pair of files that have
different lengths of audio. This surprised me somewhat. Generally, the
files are identical in length and carry the loop marks in exactly the
same place.

Irrespective of any differences, I would still like to merge all the
pairs of files into stereo. It should not be such a difficult task
recreating loops again and inserting pitch tuning data. LoopAuditioneer
does all that quite fast and what is left is to check that the loops do
not present clicks.... again.... I can do pretty well and efficiently
having done the job so often.

So, forget loops and marks and other data as the issue is complicating
itself unnecessarily.

The question remains how can I use SoX (what is the script that the
program recognises to accomplish the task) to automate the merging
process of a number of L and R pairs of recordings into single stereo
files in a separate folder. As has been pointed out the L and R files
are stereo themselves with one channel muted or blank. The script must
essentially match the name of the file pairs which are located in
respective Left and Right folders eg BourdoneL and BourdoneR, PrincipalL
and PrincipalR, TrumpetL and TrumpetR, etc.

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
The files have to match in name not size
Oh?
I think what you mean is that you WANT the final stereo file to have the
same (note/pitch) name as the left & right parts.
But from everything you've said, as each pair of left & right files are
meant to
have been created from the same original source file, they should have
the exact
same size. Putting a check that that's actually the case into a script
that
is automating merging is the kind of thing a programmer would do as an
example
of 'sanity checking'. It should always be true, but if it isn't it's
better
that the script stops what it's doing so the user can investigate why.
On the other hand, if you already have lots of pairs of files which are
not the
same size... why is that?
Maybe they contain the same number of audio samples, but different
amounts of header
data? If that's commonly the case I would add to my script calls of sox
with the
stat or stats (or both) effects to check in more detail that the audio
in each file
has common characteristics.
I might also change code that expected files to be the same size, to
something that
(say) accepted only very small differences in size.
It's normal for carefully-written programs to check that everything they
do actually
works, because a program can get into a terrible mess if it just issues
commands and
assumes that every one of them did exactly what was hoped. Depending
somewhat on the
language that a program is written in, maybe two thirds of the code in a
program will
be all about checking for problems and recovering from them.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-10 21:53:00 UTC
Permalink
Post by Dr. Mark Bugeja MD
Hi all,
What you are saying is right. I did find one pair of files that have
different lengths of audio. This surprised me somewhat. Generally, the files
are identical in length and carry the loop marks in exactly the same place.
Irrespective of any differences, I would still like to merge all the pairs
of files into stereo. It should not be such a difficult task recreating
loops again and inserting pitch tuning data. LoopAuditioneer does all that
quite fast and what is left is to check that the loops do not present
clicks.... again.... I can do pretty well and efficiently having done the
job so often.
So, forget loops and marks and other data as the issue is complicating
itself unnecessarily.
It seems to me that this is the gist of your problem.
Merging the mono files int ocorresponding stereo files
is a triviality. Losing the loops and marks means
you will _not_ have what you want anyway.

Do you intend to process each and every of the 2000 resulting
files manually in LoopAuditioner to recreate the loops?
Dr. Mark Bugeja MD
2016-12-10 22:28:15 UTC
Permalink
Well not all. Many files are "releases" and these would play at the end
of the corresponding main file (the moment a MIDI keyboard key is
released). That amounts to 75% of the files. So loops will need to be
created and checked for only 25% of those approx 500 files and they can
be processed literally over a few minutes with LoopAuditioneer including
pitch information insertion. Checking the loops will take a few days.
But I've been doing this regularly for thousands of files often having
an average of 6 loops per sample! It is tiring and might cause damage to
the ears with time, sadly.

Merging is the big job. I'd be happy if I can automate this process. If
you cannot solve it because you are not versed with Windows, how am I
expected to sort that out when I don't even come close to understanding
the "logic" behind your string of characters and why it should be
different in Windows? I think I can safely state that I would be far
more confident performing a heart transplant than to play around with
this code business. :-D Consider me dylexic for coding!

Regards,

Mark
Post by Jan Stary
Post by Dr. Mark Bugeja MD
Hi all,
What you are saying is right. I did find one pair of files that have
different lengths of audio. This surprised me somewhat. Generally, the files
are identical in length and carry the loop marks in exactly the same place.
Irrespective of any differences, I would still like to merge all the pairs
of files into stereo. It should not be such a difficult task recreating
loops again and inserting pitch tuning data. LoopAuditioneer does all that
quite fast and what is left is to check that the loops do not present
clicks.... again.... I can do pretty well and efficiently having done the
job so often.
So, forget loops and marks and other data as the issue is complicating
itself unnecessarily.
It seems to me that this is the gist of your problem.
Merging the mono files int ocorresponding stereo files
is a triviality. Losing the loops and marks means
you will _not_ have what you want anyway.
Do you intend to process each and every of the 2000 resulting
files manually in LoopAuditioner to recreate the loops?
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Erich Eckner
2016-12-11 06:43:39 UTC
Permalink
Hi,

a quick search for "bash to windows shell converter" on google lead to:

http://stackoverflow.com/questions/3200018/how-do-i-convert-a-bash-shell-script-to-a-bat-file

wich seems to explain nearly all parts, you need to "translate" the bash
scrip from Jan Stary into a .bat file.

regards,
Erich
Post by Dr. Mark Bugeja MD
Well not all. Many files are "releases" and these would play at the end
of the corresponding main file (the moment a MIDI keyboard key is
released). That amounts to 75% of the files. So loops will need to be
created and checked for only 25% of those approx 500 files and they can
be processed literally over a few minutes with LoopAuditioneer including
pitch information insertion. Checking the loops will take a few days.
But I've been doing this regularly for thousands of files often having
an average of 6 loops per sample! It is tiring and might cause damage to
the ears with time, sadly.
Merging is the big job. I'd be happy if I can automate this process. If
you cannot solve it because you are not versed with Windows, how am I
expected to sort that out when I don't even come close to understanding
the "logic" behind your string of characters and why it should be
different in Windows? I think I can safely state that I would be far
more confident performing a heart transplant than to play around with
this code business. :-D Consider me dylexic for coding!
Regards,
Mark
Post by Jan Stary
Post by Dr. Mark Bugeja MD
Hi all,
What you are saying is right. I did find one pair of files that have
different lengths of audio. This surprised me somewhat. Generally, the files
are identical in length and carry the loop marks in exactly the same place.
Irrespective of any differences, I would still like to merge all the pairs
of files into stereo. It should not be such a difficult task recreating
loops again and inserting pitch tuning data. LoopAuditioneer does all that
quite fast and what is left is to check that the loops do not present
clicks.... again.... I can do pretty well and efficiently having done the
job so often.
So, forget loops and marks and other data as the issue is complicating
itself unnecessarily.
It seems to me that this is the gist of your problem.
Merging the mono files int ocorresponding stereo files
is a triviality. Losing the loops and marks means
you will _not_ have what you want anyway.
Do you intend to process each and every of the 2000 resulting
files manually in LoopAuditioner to recreate the loops?
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
---
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Kevin Conder
2016-12-11 07:44:39 UTC
Permalink
Post by Erich Eckner
http://stackoverflow.com/questions/3200018/how-do-i-convert-a-bash-shell-script-to-a-bat-file
wich seems to explain nearly all parts, you need to "translate" the bash
scrip from Jan Stary into a .bat file.
Here's a quick VBScript file that I wrote instead. Make sure you
change the soxCommand variable to point to where your sox.exe file is
installed. Change all of the directory variables to your actual
directory locations before running it. Save the script as
"combine.vbs" and run it using "cscript combine.vbs".

' combine.vbs - Combine audio files from different directories.
Option Explicit

Dim exec
Dim file
Dim fileName
Dim fso
Dim leftDir
Dim leftFolder
Dim rightDir
Dim shell
Dim soxCommand
Dim stereoDir
Dim subFolder
Dim subName

' Make sure these paths are correct before running.
soxCommand = "C:\Program Files (x86)\sox-14-4-2\sox.exe"
leftDir = "C:\Users\markb\Desktop\instruments\Basson16L\"
rightDir = "C:\Users\markb\Desktop\instruments\Basson16R\"
stereoDir = "C:\Users\markb\Desktop\instruments\Basson16S\"

' Use standard Windows objects.
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")


Sub CreateDir(name)
' Create a directory, if it does not exist.
If Not fso.FolderExists(name) Then
fso.CreateFolder(name)
End If
End Sub


' Create a directory for the combined stereo files.
CreateDir(stereoDir)

' Loop through all of the subdirectories in the Left directory.
Set leftFolder = fso.GetFolder(leftDir)
For Each subFolder in leftFolder.SubFolders
' Create a corresponding subdirectory for the combined files.
subName = subFolder.name
CreateDir(stereoDir & subFolder.name)

' Loop through all of the the files in the subdirectory.
For Each file in subFolder.Files
' Execute the sox command for each file.
fileName = file.Name
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName & " " & _
rightDir & subName & "\" & fileName & " " & _
stereoDir & subName & "\" & fileName)

WScript.Echo stereoDir & subName & "\" & fileName
Next
Next

WScript.Echo "Done."
--
Kevin Conder
Jeremy Nicoll - ml sox users
2016-12-11 08:59:38 UTC
Permalink
Post by Kevin Conder
Here's a quick VBScript file that I wrote instead.
Phew! I was just trying (as a VBS neophyte) to get my head round this
problem, and
now I don't have to. I'd suggest two changes to it though. Where you
have Mark
Post by Kevin Conder
leftDir = "C:\Users\markb\Desktop\instruments\Basson16L\"
rightDir = "C:\Users\markb\Desktop\instruments\Basson16R\"
stereoDir = "C:\Users\markb\Desktop\instruments\Basson16S\"
it'd be easier for him (as he's going to have to change these values a
lot) if he replaces
those three lines with:

Dim pathDir
Dim sampname

pathDir = "C:\Users\markb\Desktop\instruments\"

sampname = "Basson16" ' a sample name, without
trailing L or R

leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"


then each time he'll only need to change the 'sampname' value.
Post by Kevin Conder
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName & " " & _
rightDir & subName & "\" & fileName & " " & _
stereoDir & subName & "\" &
fileName)
the last line of that probably needs to be

stereoDir & subName & "\" & filename & " remix 1 4")
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-11 09:38:53 UTC
Permalink
Thanks all for your willingness and attempts to help in this issue. But
it's like trying to discuss quantum physics with a 1 year old baby or a
total moron.

I am hopping off the train. I can't get to understand the language you
people are so conversant with. From this reply, I don't even know which
part of the text should be script for the "bat" (or is it "vbs" now)
file. I am sending all the files back to my friend for him to sort out.

Regards and a Blessed Christmas to all.

Mark
Post by Kevin Conder
Post by Erich Eckner
http://stackoverflow.com/questions/3200018/how-do-i-convert-a-bash-shell-script-to-a-bat-file
wich seems to explain nearly all parts, you need to "translate" the bash
scrip from Jan Stary into a .bat file.
Here's a quick VBScript file that I wrote instead. Make sure you
change the soxCommand variable to point to where your sox.exe file is
installed. Change all of the directory variables to your actual
directory locations before running it. Save the script as
"combine.vbs" and run it using "cscript combine.vbs".
' combine.vbs - Combine audio files from different directories.
Option Explicit
Dim exec
Dim file
Dim fileName
Dim fso
Dim leftDir
Dim leftFolder
Dim rightDir
Dim shell
Dim soxCommand
Dim stereoDir
Dim subFolder
Dim subName
' Make sure these paths are correct before running.
soxCommand = "C:\Program Files (x86)\sox-14-4-2\sox.exe"
leftDir = "C:\Users\markb\Desktop\instruments\Basson16L\"
rightDir = "C:\Users\markb\Desktop\instruments\Basson16R\"
stereoDir = "C:\Users\markb\Desktop\instruments\Basson16S\"
' Use standard Windows objects.
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
Sub CreateDir(name)
' Create a directory, if it does not exist.
If Not fso.FolderExists(name) Then
fso.CreateFolder(name)
End If
End Sub
' Create a directory for the combined stereo files.
CreateDir(stereoDir)
' Loop through all of the subdirectories in the Left directory.
Set leftFolder = fso.GetFolder(leftDir)
For Each subFolder in leftFolder.SubFolders
' Create a corresponding subdirectory for the combined files.
subName = subFolder.name
CreateDir(stereoDir & subFolder.name)
' Loop through all of the the files in the subdirectory.
For Each file in subFolder.Files
' Execute the sox command for each file.
fileName = file.Name
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName & " " & _
rightDir & subName & "\" & fileName & " " & _
stereoDir & subName & "\" & fileName)
WScript.Echo stereoDir & subName & "\" & fileName
Next
Next
WScript.Echo "Done."
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Erich Eckner
2016-12-11 10:31:52 UTC
Permalink
Hi,

regarding quantum physics for a one year old: that's not too hard - I've
tried and he already understands, that electrons only have descrete
energy levels and may only absorb/emitt discrete amounts of energy ...

regarding the vb-script:
From Kevins answer, you take everything that's indented (starting at "'
combine.vbs - Combine audio ...'" and ending at "WScript.Echo .."), put
that into a file named "combine.vbs" and execute that file with the
command "cscript combine.vbs" from within a command shell.

If you, however, chose to give up, that's also fine (at least for me).

regards,
Erich
Post by Dr. Mark Bugeja MD
Thanks all for your willingness and attempts to help in this issue. But
it's like trying to discuss quantum physics with a 1 year old baby or a
total moron.
I am hopping off the train. I can't get to understand the language you
people are so conversant with. From this reply, I don't even know which
part of the text should be script for the "bat" (or is it "vbs" now)
file. I am sending all the files back to my friend for him to sort out.
Regards and a Blessed Christmas to all.
Mark
Post by Kevin Conder
Post by Erich Eckner
http://stackoverflow.com/questions/3200018/how-do-i-convert-a-bash-shell-script-to-a-bat-file
wich seems to explain nearly all parts, you need to "translate" the bash
scrip from Jan Stary into a .bat file.
Here's a quick VBScript file that I wrote instead. Make sure you
change the soxCommand variable to point to where your sox.exe file is
installed. Change all of the directory variables to your actual
directory locations before running it. Save the script as
"combine.vbs" and run it using "cscript combine.vbs".
' combine.vbs - Combine audio files from different directories.
Option Explicit
Dim exec
Dim file
Dim fileName
Dim fso
Dim leftDir
Dim leftFolder
Dim rightDir
Dim shell
Dim soxCommand
Dim stereoDir
Dim subFolder
Dim subName
' Make sure these paths are correct before running.
soxCommand = "C:\Program Files (x86)\sox-14-4-2\sox.exe"
leftDir = "C:\Users\markb\Desktop\instruments\Basson16L\"
rightDir = "C:\Users\markb\Desktop\instruments\Basson16R\"
stereoDir = "C:\Users\markb\Desktop\instruments\Basson16S\"
' Use standard Windows objects.
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
Sub CreateDir(name)
' Create a directory, if it does not exist.
If Not fso.FolderExists(name) Then
fso.CreateFolder(name)
End If
End Sub
' Create a directory for the combined stereo files.
CreateDir(stereoDir)
' Loop through all of the subdirectories in the Left directory.
Set leftFolder = fso.GetFolder(leftDir)
For Each subFolder in leftFolder.SubFolders
' Create a corresponding subdirectory for the combined files.
subName = subFolder.name
CreateDir(stereoDir & subFolder.name)
' Loop through all of the the files in the subdirectory.
For Each file in subFolder.Files
' Execute the sox command for each file.
fileName = file.Name
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName & " " & _
rightDir & subName & "\" & fileName & " " & _
stereoDir & subName & "\" & fileName)
WScript.Echo stereoDir & subName & "\" & fileName
Next
Next
WScript.Echo "Done."
---
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Jeremy Nicoll - ml sox users
2016-12-11 11:16:23 UTC
Permalink
Post by Erich Eckner
From Kevins answer, you take everything that's indented (starting at "'
combine.vbs - Combine audio ...'" and ending at "WScript.Echo .."), put
that into a file named "combine.vbs" and execute that file with the
command "cscript combine.vbs" from within a command shell.
Correct... in the same way that Mark earlier ran a "Hello World" sample
script.

Mark would have to edit the vbs file (using eg Notepad) to make sure
that it
contained the right definitions of the path to wherever he has his
installed
copy of sox.exe, and - in Kevin's code - the place where one of his sets
of
samples lives. Then running the script would generate all the stereo
files
for that set of L & R samples.

He'd then have to edit the script again to change it so it pointed at a
different
set of samples, and re-run it. And then change it again, & run it, and
so on.


If Mark made the small change I suggested then the re-edit for each
changing set
of samples would be easier.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-11 20:39:04 UTC
Permalink
So before I run the attached vbs file, is it ok?

(please rename to rar as the file would not send)

Mark
Post by Jeremy Nicoll - ml sox users
Post by Erich Eckner
From Kevins answer, you take everything that's indented (starting at "'
combine.vbs - Combine audio ...'" and ending at "WScript.Echo .."), put
that into a file named "combine.vbs" and execute that file with the
command "cscript combine.vbs" from within a command shell.
Correct... in the same way that Mark earlier ran a "Hello World" sample
script.
Mark would have to edit the vbs file (using eg Notepad) to make sure
that it
contained the right definitions of the path to wherever he has his
installed
copy of sox.exe, and - in Kevin's code - the place where one of his sets
of
samples lives. Then running the script would generate all the stereo
files
for that set of L & R samples.
He'd then have to edit the script again to change it so it pointed at a
different
set of samples, and re-run it. And then change it again, & run it, and
so on.
If Mark made the small change I suggested then the re-edit for each
changing set
of samples would be easier.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-11 21:48:22 UTC
Permalink
Post by Dr. Mark Bugeja MD
So before I run the attached vbs file, is it ok?
It looks ok, but you're going to have to edit this file each time you
want to
merge a different set of samples, and you'll have to change three lines
in the
right way, each time.

You would be better to replace the lines that say:

leftDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16L\"
rightDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16R\"
stereoDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16S\"

with

Dim pathDir
Dim sampname

pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"

sampname = "Basson16" ' a sample name, without a trailing L or R

leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"


then when you edit the file to process a different set of samples, you
will only
need to change one line, this one:

sampname = "Basson16" ' a sample name, without a trailing L or
R

each time.


And, as I said before, the actual sox command that Kevin's program
issues is
essentially

sox -M leftfile ritefile stereofile

but someone-else pointed out that because your input files are NOT mono
files (ie
not files with only a single channel in them), you really need to issue

sox -M leftfile ritefile stereofile remix 1 4

and to achieve that you need to find the line that says

stereoDir & subName & "\" & fileName)

and change it to

stereoDir & subName & "\" & filename & " remix 1 4")


For these two changes just copy & paste the text out of this email into
your
combine.vbs file.


There might be another problem though, depending on which version of
Windows you
are using, and whether you have UAC turned on (the thing that in W7, W8,
W8.1 &
W10 asks for your administrator's password when you do things that need
extra
authority). You've apparently placed your sample files in

C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\...

which is a folder, as the name "C:\Program Files (x86)" implies, which
is meant
to contain programs and other parts of applications, not sample data.
Normally
on W7 (perhaps) & definitely on W8, W8.1 and W10, Windows will not let a
running
program create or alter any data files in subfolders of that folder.

It disallows this so that malware cannot write files into C:\Program
Files... or
make malicious alterations to files that are correctly installed there.
Now while
you are just reading audio samples from there, it will work ok, but when
you run a
sox command that tries to create a stereo file there, Windows should
either prevent
it, or ask for your admin password EVERY TIME.

The best solution would be for you to move all the audio samples out of
C:\Program
Files... and put them in a normal place for user data, eg your Documents
folder, or
a folder on your Desktop.

If you do move them then in your combine.vbs file that you sent, you
need to change
all three lines that say where the L & R files are and the S file be
written, or, if
you adopt the code I suggested, you will need to change this line:

pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"

so that it points at the place you moved the sample files to.
Post by Dr. Mark Bugeja MD
(please rename to rar as the file would not send)
There's no need to attach a file; just copy & paste the contents
straight into your
email.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-12 10:41:33 UTC
Permalink
This is what I got so far.

' combine.vbs - Combine audio files from different directories.

Option Explicit

Dim exec
Dim file
Dim fileName
Dim fso
Dim leftDir
Dim leftFolder
Dim rightDir
Dim shell
Dim soxCommand
Dim stereoDir
Dim subFolder
Dim subName

soxCommand = "C:\Program Files (x86)\sox-14-4-2\sox.exe"

Dim pathDir
Dim sampname

pathDir = "E:\Recit-Organ\"

' a sample name, without a trailing L or R
sampname = "Basson16"

leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"

' Use standard Windows objects.
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")

' Create a directory, if it does not exist.
Sub CreateDir(name)
If Not fso.FolderExists(name) Then
fso.CreateFolder(name)
End If
End Sub

' Create a directory for the combined stereo files.
CreateDir(stereoDir)

' Loop through all of the subdirectories in the Left directory.
Set leftFolder = fso.GetFolder(leftDir)
For Each subFolder in leftFolder.SubFolders
' Create a corresponding subdirectory for the combined files.
subName = subFolder.name
CreateDir(stereoDir & subFolder.name)

' Loop through all of the the files in the subdirectory.
For Each file in subFolder.Files
' Execute the sox command for each file.
fileName = file.Name
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName
& " " & _
rightDir & subName & "\" & fileName
& " " & _
stereoDir & subName & "\" &
fileName & " remix 1 4")

WScript.Echo stereoDir & subName & "\" & fileName
Next
Next

WScript.Echo "Done."

Would I be correct in saying that this will handle files in subfolders
in the same way?

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
So before I run the attached vbs file, is it ok?
It looks ok, but you're going to have to edit this file each time you
want to
merge a different set of samples, and you'll have to change three lines
in the
right way, each time.
leftDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16L\"
rightDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16R\"
stereoDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16S\"
with
Dim pathDir
Dim sampname
pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"
sampname = "Basson16" ' a sample name, without a trailing L or R
leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"
then when you edit the file to process a different set of samples, you
will only
sampname = "Basson16" ' a sample name, without a trailing L or
R
each time.
And, as I said before, the actual sox command that Kevin's program
issues is
essentially
sox -M leftfile ritefile stereofile
but someone-else pointed out that because your input files are NOT mono
files (ie
not files with only a single channel in them), you really need to issue
sox -M leftfile ritefile stereofile remix 1 4
and to achieve that you need to find the line that says
stereoDir & subName & "\" & fileName)
and change it to
stereoDir & subName & "\" & filename & " remix 1 4")
For these two changes just copy & paste the text out of this email into
your
combine.vbs file.
There might be another problem though, depending on which version of
Windows you
are using, and whether you have UAC turned on (the thing that in W7, W8,
W8.1 &
W10 asks for your administrator's password when you do things that need
extra
authority). You've apparently placed your sample files in
C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\...
which is a folder, as the name "C:\Program Files (x86)" implies, which
is meant
to contain programs and other parts of applications, not sample data.
Normally
on W7 (perhaps) & definitely on W8, W8.1 and W10, Windows will not let a
running
program create or alter any data files in subfolders of that folder.
It disallows this so that malware cannot write files into C:\Program
Files... or
make malicious alterations to files that are correctly installed there.
Now while
you are just reading audio samples from there, it will work ok, but when
you run a
sox command that tries to create a stereo file there, Windows should
either prevent
it, or ask for your admin password EVERY TIME.
The best solution would be for you to move all the audio samples out of
C:\Program
Files... and put them in a normal place for user data, eg your Documents
folder, or
a folder on your Desktop.
If you do move them then in your combine.vbs file that you sent, you
need to change
all three lines that say where the L & R files are and the S file be
written, or, if
pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"
so that it points at the place you moved the sample files to.
Post by Dr. Mark Bugeja MD
(please rename to rar as the file would not send)
There's no need to attach a file; just copy & paste the contents
straight into your
email.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Dr. Mark Bugeja MD
2016-12-12 12:12:19 UTC
Permalink
Should files in subfolders be handled in the same way as those in the
main folders, by running the script, then it might be even better to
separate the L folders from the R folders:

Recit Organ > Left > Bourdon16L
BassoonHautbois8L
Cor-De-Buit8L
etc etc
Right > Bourdon16R
BassoonHautbois8R
Cor-De-Buit8R
etc etc
NB: each folder has a list of files + 3 folders, each with its own list
of files. Structure and names of L folders correspond to R folders.
__________________
Then modifying the script to:

pathDir = "E:\"

' a sample name, without a trailing L or R
sampname = "Recit Organ"

leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname

__________________

.... also, Stereo files could be placed directly into folders without
the "S"

Whilst bearing in mind that files have no L or R in their file names,
lefts and rights being only denoted in the folder names, would this
alteration to the script be expected to create folders and files under
the E:\Recit Organ folder with subfolders being created accordingly?

Files names must not be altered.

Mark
This is what I got so far.
' combine.vbs - Combine audio files from different directories.
Option Explicit
Dim exec
Dim file
Dim fileName
Dim fso
Dim leftDir
Dim leftFolder
Dim rightDir
Dim shell
Dim soxCommand
Dim stereoDir
Dim subFolder
Dim subName
soxCommand = "C:\Program Files (x86)\sox-14-4-2\sox.exe"
Dim pathDir
Dim sampname
pathDir = "E:\Recit-Organ\"
' a sample name, without a trailing L or R
sampname = "Basson16"
leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"
' Use standard Windows objects.
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = CreateObject("WScript.Shell")
' Create a directory, if it does not exist.
Sub CreateDir(name)
If Not fso.FolderExists(name) Then
fso.CreateFolder(name)
End If
End Sub
' Create a directory for the combined stereo files.
CreateDir(stereoDir)
' Loop through all of the subdirectories in the Left directory.
Set leftFolder = fso.GetFolder(leftDir)
For Each subFolder in leftFolder.SubFolders
' Create a corresponding subdirectory for the combined files.
subName = subFolder.name
CreateDir(stereoDir & subFolder.name)
' Loop through all of the the files in the subdirectory.
For Each file in subFolder.Files
' Execute the sox command for each file.
fileName = file.Name
Set exec = shell.Exec(soxCommand & " -M " & _
leftDir & subName & "\" & fileName & " " & _
rightDir & subName & "\" &
fileName & " " & _
stereoDir & subName & "\" &
fileName & " remix 1 4")
WScript.Echo stereoDir & subName & "\" & fileName
Next
Next
WScript.Echo "Done."
Would I be correct in saying that this will handle files in subfolders
in the same way?
Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
So before I run the attached vbs file, is it ok?
It looks ok, but you're going to have to edit this file each time you
want to
merge a different set of samples, and you'll have to change three lines
in the
right way, each time.
leftDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16L\"
rightDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16R\"
stereoDir = "C:\Program Files
(x86)\sox-14-4-2\input\Recit-Organ\Basson16S\"
with
Dim pathDir
Dim sampname
pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"
sampname = "Basson16" ' a sample name, without a trailing L or R
leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname & "S\"
then when you edit the file to process a different set of samples, you
will only
sampname = "Basson16" ' a sample name, without a trailing L or
R
each time.
And, as I said before, the actual sox command that Kevin's program
issues is
essentially
sox -M leftfile ritefile stereofile
but someone-else pointed out that because your input files are NOT mono
files (ie
not files with only a single channel in them), you really need to issue
sox -M leftfile ritefile stereofile remix 1 4
and to achieve that you need to find the line that says
stereoDir & subName & "\" & fileName)
and change it to
stereoDir & subName & "\" & filename & " remix 1 4")
For these two changes just copy & paste the text out of this email into
your
combine.vbs file.
There might be another problem though, depending on which version of
Windows you
are using, and whether you have UAC turned on (the thing that in W7, W8,
W8.1 &
W10 asks for your administrator's password when you do things that need
extra
authority). You've apparently placed your sample files in
C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\...
which is a folder, as the name "C:\Program Files (x86)" implies, which
is meant
to contain programs and other parts of applications, not sample data.
Normally
on W7 (perhaps) & definitely on W8, W8.1 and W10, Windows will not let a
running
program create or alter any data files in subfolders of that folder.
It disallows this so that malware cannot write files into C:\Program
Files... or
make malicious alterations to files that are correctly installed there.
Now while
you are just reading audio samples from there, it will work ok, but when
you run a
sox command that tries to create a stereo file there, Windows should
either prevent
it, or ask for your admin password EVERY TIME.
The best solution would be for you to move all the audio samples out of
C:\Program
Files... and put them in a normal place for user data, eg your Documents
folder, or
a folder on your Desktop.
If you do move them then in your combine.vbs file that you sent, you
need to change
all three lines that say where the L & R files are and the S file be
written, or, if
pathDir = "C:\Program Files (x86)\sox-14-4-2\input\Recit-Organ\"
so that it points at the place you moved the sample files to.
Post by Dr. Mark Bugeja MD
(please rename to rar as the file would not send)
There's no need to attach a file; just copy & paste the contents
straight into your
email.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-12 18:00:10 UTC
Permalink
Post by Dr. Mark Bugeja MD
Should files in subfolders be handled in the same way as those in the
main folders, by running the script, then it might be even better to
Recit Organ > Left > Bourdon16L
BassoonHautbois8L
Cor-De-Buit8L
etc etc
Right > Bourdon16R
BassoonHautbois8R
Cor-De-Buit8R
etc etc
NB: each folder has a list of files + 3 folders, each with its own
list of files. Structure and names of L folders correspond to R
folders.
For the purposes of running the merges I'd suggest you don't change the
structure of the files.

After you've merged them, you can move the individual files around
however
you please.
Post by Dr. Mark Bugeja MD
pathDir = "E:\"
' a sample name, without a trailing L or R
sampname = "Recit Organ"
leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname
This will not work because you've lost the "Basson16" (etc) part of a
sample name.

WORSE, from a programmer's perspective, and likely to complicate your
understanding
of what the script does, is that having a 'variable' called 'sampname'
and then
storing in it something that does not include a sample name, just
obscures what the
code is meant to do.
Post by Dr. Mark Bugeja MD
.... also, Stereo files could be placed directly into folders without
the "S"
Yes, they could be... but at the moment you have a 'standard convention'
in that
folder names are the base sample name plus one letter. Programmers like
simple
ideas like this because it means that if you find in future you need to
do other
automated manipulation of folders, it's easy to write code that 'knows'
that every
such folder is named 'samplename' + L/R/S. If you change that then you
lose some
knowledge about what's in that kind of folder, and increase the chance
that you
accidentally damage the wrong files, and you also need to write more
logic that
knows when the suffix letter is there and when it is not.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-12 18:15:07 UTC
Permalink
At the end of the day I only need the merged files. By what I suggested,
I though I could go one step further of automating the lot with a single
click since, as you say, subfolders are processed too. So I reckoned
that creating a structure of folders and subfolders like this, the
entire lot could be processed without having to go back to the script
and change the name each time.

I hope to get the most out of the script and should I have reasons to
process other files similary, all I would have to do is keep the
structure the same irrespective of the different names that other
samplesets would carry.

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
Should files in subfolders be handled in the same way as those in the
main folders, by running the script, then it might be even better to
Recit Organ > Left > Bourdon16L
BassoonHautbois8L
Cor-De-Buit8L
etc etc
Right > Bourdon16R
BassoonHautbois8R
Cor-De-Buit8R
etc etc
NB: each folder has a list of files + 3 folders, each with its own
list of files. Structure and names of L folders correspond to R
folders.
For the purposes of running the merges I'd suggest you don't change the
structure of the files.
After you've merged them, you can move the individual files around
however
you please.
Post by Dr. Mark Bugeja MD
pathDir = "E:\"
' a sample name, without a trailing L or R
sampname = "Recit Organ"
leftDir = pathDir & sampname & "L\"
rightDir = pathDir & sampname & "R\"
stereoDir = pathDir & sampname
This will not work because you've lost the "Basson16" (etc) part of a
sample name.
WORSE, from a programmer's perspective, and likely to complicate your
understanding
of what the script does, is that having a 'variable' called 'sampname'
and then
storing in it something that does not include a sample name, just
obscures what the
code is meant to do.
Post by Dr. Mark Bugeja MD
.... also, Stereo files could be placed directly into folders without
the "S"
Yes, they could be... but at the moment you have a 'standard convention'
in that
folder names are the base sample name plus one letter. Programmers like
simple
ideas like this because it means that if you find in future you need to
do other
automated manipulation of folders, it's easy to write code that 'knows'
that every
such folder is named 'samplename' + L/R/S. If you change that then you
lose some
knowledge about what's in that kind of folder, and increase the chance
that you
accidentally damage the wrong files, and you also need to write more
logic that
knows when the suffix letter is there and when it is not.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-12 18:51:32 UTC
Permalink
Post by Dr. Mark Bugeja MD
At the end of the day I only need the merged files. By what I
suggested, I though I could go one step further of automating the lot
with a single click since, as you say, subfolders are processed too.
So I reckoned that creating a structure of folders and subfolders like
this, the entire lot could be processed without having to go back to
the script and change the name each time.
That would require a somewhat more complicated script, because you'd be
expecting the thing to work through a list of sample names, then for
each
of them do what the current script does.

Yes, someone could change the script to do that, but the more logic
that's
put in a script the more there is to go wrong.
Post by Dr. Mark Bugeja MD
I hope to get the most out of the script and should I have reasons to
process other files similary, all I would have to do is keep the
structure the same irrespective of the different names that other
samplesets would carry.
You should make an effort to understand how the present script works,
then.
--
Jeremy Nicoll - my opinions are my own
Jeremy Nicoll - ml sox users
2016-12-12 17:46:28 UTC
Permalink
Post by Dr. Mark Bugeja MD
This is what I got so far.
[snip]
Post by Dr. Mark Bugeja MD
Would I be correct in saying that this will handle files in subfolders
in the same way?
Yes.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-12 11:31:03 UTC
Permalink
Does the file need to be placed anywhere in particular eg in the folder
where the files to be processed are kept. I think not.

When I open the cmd promt window, do I need to configure a path before
executing the script?

Mark
Post by Kevin Conder
Save the script as
"combine.vbs" and run it using "cscript combine.vbs".
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-12 18:06:21 UTC
Permalink
Post by Dr. Mark Bugeja MD
Does the file need to be placed anywhere in particular eg in the
folder where the files to be processed are kept. I think not.
It doesn't matter where you keep the script.
Post by Dr. Mark Bugeja MD
When I open the cmd promt window, do I need to configure a path before
executing the script?
No; execute the command as

C:\> cscript.exe "C:\wherever\you\put\it\combine.vbs"


After you've run it once, then edited the script to make it point at
another set
of samples, you don't need to retype the whole cscript.exe ...
command, provided
you still have the command window open on screen.

Just press up arrow and the system will bring the old command back (if
you press up
several times it will bring back successively older commands). Once a
previous
command is visible again, either just press Enter to run it again
unaltered, or
(though in this case you have no need to) use the left & right arrow
keys, and insert,
backspace and Del as required, to change the details in the command,
then press Enter
to run that altered command.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-12 18:35:06 UTC
Permalink
I ran the script. It seems to have merged the files in the subfolders
but not those in the main folder!
Post by Jeremy Nicoll - ml sox users
C:\> cscript.exe "C:\wherever\you\put\it\combine.vbs"
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-12 19:02:41 UTC
Permalink
Post by Dr. Mark Bugeja MD
I ran the script. It seems to have merged the files in the subfolders
but not those in the main folder!
I don't think you described files being in a main folder. Your example
showed
that they were in eg

\Basson16L\relnnnnn\
& \Basson16R\relnnnnn\

The existing script, given the path and a sample name like "Basson16"
finds and
merges files in subfolders of Basson16L and Basson16R.

That's what I expected it to need to do, and what Kevin expected it to
need to do.
If you wanted it to do something else as well, you'd have needed to
explain that
more clearly.


But more to the point, if you do have sample files in a main folder as
well as sub-
folders, it's hard to understand why. Do they not also correspond to a
particular
stop? Even if they don't, and they had to be a separate collection, I'd
have put
them in a dummy subfolder of their own, eg

\~mainfilesL\relnnnnn\
& \~mainfilesR\relnnnnn\

simply because that would have kept the file structure the same for all
of them,
& thus kept the scripts simple. That "~mainfilesL" has a "~" at the
start so it
would appear at the start of an alphabetically-sorted list of folders.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-12 20:06:16 UTC
Permalink
I did explain before that the main folders have samples PLUS 3 folders,
each with samples of their own. I just sent a reply to highlight this fact.

I am in the process of creating "main" subfolders, shifting the main
files there and repeating the process. Seems to be working fine like this.

The structure of the folders is how GrandOrgue and Hauptwerk recognize
the main files for a note/sound, with releases for those notes in
appropriate subfolders. There are usually 2 or 3 releases per main file.
Sometimes the longest release is part of the main file and marked with a
cue point where it starts hence the additional 2 releases are in
separate folders. The releases are of different duration to mimic
staccato (pressing a note which a sharp tap, immediately releasing it),
a portato (what you get if you hold a note just a bit longer) and the
sustained release (which is what one would hear on keeping a note held
for a longer duration). The tails are progressively longer (measured in
hundreds of milliseconds, of course) and produce the echo heard best in
a hall or church. This is a fine detail in reproducing notes digitally
but detectable by musicians. Without the releases, the notes sound dull
or "dry" as you would get in a small carpeted room.... no echo (no
reverb) at all.

Thanks. For all intents and purposes..... Mission Accomplished!

There was no way I was going to achieve this on my own. Had I followed
some advice given hear, I'd still be desperately tearing my hair out and
banging my forehead on the table.

I must thank in particular Kevin Conder and Jeremy Nicoll who spared me
a lot of tears, bruises and a fractured skull.... not to mention a
broken computer screen!

Well done!
Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I ran the script. It seems to have merged the files in the subfolders
but not those in the main folder!
I don't think you described files being in a main folder. Your example
showed
that they were in eg
\Basson16L\relnnnnn\
& \Basson16R\relnnnnn\
The existing script, given the path and a sample name like "Basson16"
finds and
merges files in subfolders of Basson16L and Basson16R.
That's what I expected it to need to do, and what Kevin expected it to
need to do.
If you wanted it to do something else as well, you'd have needed to
explain that
more clearly.
But more to the point, if you do have sample files in a main folder as
well as sub-
folders, it's hard to understand why. Do they not also correspond to a
particular
stop? Even if they don't, and they had to be a separate collection, I'd
have put
them in a dummy subfolder of their own, eg
\~mainfilesL\relnnnnn\
& \~mainfilesR\relnnnnn\
simply because that would have kept the file structure the same for all
of them,
& thus kept the scripts simple. That "~mainfilesL" has a "~" at the
start so it
would appear at the start of an alphabetically-sorted list of folders.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jan Stary
2016-12-11 19:08:05 UTC
Permalink
Well not all. Many files are "releases" and these would play at the end of
the corresponding main file (the moment a MIDI keyboard key is released).
That amounts to 75% of the files. So loops will need to be created and
checked for only 25% of those approx 500 files and they can be processed
literally over a few minutes with LoopAuditioneer including pitch
information insertion. Checking the loops will take a few days.
OK if you are OK with that ...
Merging is the big job. I'd be happy if I can automate this process. If you
cannot solve it because you are not versed with Windows, how am I expected
to sort that out when I don't even come close to understanding the "logic"
behind your string of characters
Here's how: learn the Windows *.bat scripting language,
or at least enough of it to write the few lines that do
what you want to do. It will be a fraction of the time
you are willing to spend on manually checking the results.
and why it should be different in Windows?
Different languages are different.
Dr. Mark Bugeja MD
2016-12-12 20:07:11 UTC
Permalink
This is one recent instance where I described the structure of the
folders. Perhaps I should have stated:

Each folder has a list of files + 3 /*sub*/folders, each with its own
list of files.
Post by Dr. Mark Bugeja MD
NB: each folder has a list of files + 3 folders, each with its own
list of files. Structure and names of L folders correspond to R folders.
------------------------------------------------------------------------
Avast logo
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>


This email has been checked for viruses by Avast antivirus software.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-13 01:40:05 UTC
Permalink
Post by Dr. Mark Bugeja MD
This is one recent instance where I described the structure of the
Each folder has a list of files + 3 /*sub*/folders, each with its own
list of files.
Yes.

I assumed (from your original post) that there could be any number of
sub-
folders, with arbitrary names, albeit (probably) all of form "rel" plus
a
five digit number.

If those sub-folders are always present or at least are always meant to
be
then (if I'd been writing a script for myself) I'd have checked that
each
sample's folder contained the expected three sub-folders - no more and
no
fewer. But on the assumption that there could be any number of them, of
any name, I would have done what Kevin did, & made the script just
process
whatever subfolders it found.

Also, your original example of file/folder layouts had quite a lot of
"etc"s
in them, which implies that we weren't necessarily seeing the whole set
of
possibilities. And, your text said "Each subfolder has similarly names
files
as shown.", which is too vague for anyone (writing a script) to be
certain of
what you meant.

On the other hand, I do see - now - that your description, eg:

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


did include separate files (the lines at the end of that list) as well
as sub-
folders. My only excuse for not realising their significance is that I
thought
(wrongly!) that you'd forgotten to put lots of dots in front of one set
of names!
On the other hand, there's no good reason to put the "main files" at the
bottom
of a list. They'd have been far more obvious if they'd been described
first.


If I'd been describing this structure to someone else I'd have said
something
like:

For each set of samples, eg "Basson16" there's two folders named with
"L"
and "R" suffixes. Each contains some audio files, one for each note
of
the scale, named accordingly, eg "037-C#.wav" - representing the C
sharp
that's the 37th note counted from the lowest pitched one in the sample
set (or whatever the significance of that number is).

As well as the main data for each note there's three additional files,
each
holding data describing short, medium and long 'releases'. These are
always
stored in subfolders named "rel00150", "rel00600" and "rel99999".
Whatever
the set of main data files is, the subfolders should have the same
named set
of subsidiary files, so for example, as there's a 037-C#.wav file in
the main
folder there should be three more files with that name in the three
relnnnnn
folders.

I would also have explained whether there could ever be any other
files in the
main or relnnnnn folders, which contain other things - eg any .txt
files that
contain descriptions of the data.

Perhaps I'd also have said that all the individual files should have
names that
are a three digit number, a dash, and one of A A# B C C# D D# E F F# G
G#. I
might have said what the range of the three-digit numbers is: do they
always
start at 001, and always end at the (same) high value? Do they always
go up in
ones? What should the script do if there's a gap in the sequence?


I'd then have listed the full names (paths) of all the files describing
one note
for one sample eg:

C:\my\organsamples\basson16l\037-C#.wav
C:\my\organsamples\basson16l\rel00150\037-C#.wav
C:\my\organsamples\basson16l\rel00600\037-C#.wav
C:\my\organsamples\basson16l\rel99999\037-C#.wav

C:\my\organsamples\basson16r\037-C#.wav
C:\my\organsamples\basson16r\rel00150\037-C#.wav
C:\my\organsamples\basson16r\rel00600\037-C#.wav
C:\my\organsamples\basson16r\rel99999\037-C#.wav

which hopefully would have removed some of the vagueness. Notice, no
unnecessary
dots, and the full names (with the ".wav" extensions) of the files.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-13 18:39:17 UTC
Permalink
I have tested the wav samples. They won't load in the software
GrandOrgue and give a PCM format error. Could this have something to do
with the merging process we have just done?

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
This is one recent instance where I described the structure of the
Each folder has a list of files + 3 /*sub*/folders, each with its own
list of files.
Yes.
I assumed (from your original post) that there could be any number of
sub-
folders, with arbitrary names, albeit (probably) all of form "rel" plus
a
five digit number.
If those sub-folders are always present or at least are always meant to
be
then (if I'd been writing a script for myself) I'd have checked that
each
sample's folder contained the expected three sub-folders - no more and
no
fewer. But on the assumption that there could be any number of them, of
any name, I would have done what Kevin did, & made the script just
process
whatever subfolders it found.
Also, your original example of file/folder layouts had quite a lot of
"etc"s
in them, which implies that we weren't necessarily seeing the whole set
of
possibilities. And, your text said "Each subfolder has similarly names
files
as shown.", which is too vague for anyone (writing a script) to be
certain of
what you meant.
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
did include separate files (the lines at the end of that list) as well
as sub-
folders. My only excuse for not realising their significance is that I
thought
(wrongly!) that you'd forgotten to put lots of dots in front of one set
of names!
On the other hand, there's no good reason to put the "main files" at the
bottom
of a list. They'd have been far more obvious if they'd been described
first.
If I'd been describing this structure to someone else I'd have said
something
For each set of samples, eg "Basson16" there's two folders named with
"L"
and "R" suffixes. Each contains some audio files, one for each note
of
the scale, named accordingly, eg "037-C#.wav" - representing the C
sharp
that's the 37th note counted from the lowest pitched one in the sample
set (or whatever the significance of that number is).
As well as the main data for each note there's three additional files,
each
holding data describing short, medium and long 'releases'. These are
always
stored in subfolders named "rel00150", "rel00600" and "rel99999".
Whatever
the set of main data files is, the subfolders should have the same
named set
of subsidiary files, so for example, as there's a 037-C#.wav file in
the main
folder there should be three more files with that name in the three
relnnnnn
folders.
I would also have explained whether there could ever be any other
files in the
main or relnnnnn folders, which contain other things - eg any .txt
files that
contain descriptions of the data.
Perhaps I'd also have said that all the individual files should have
names that
are a three digit number, a dash, and one of A A# B C C# D D# E F F# G
G#. I
might have said what the range of the three-digit numbers is: do they
always
start at 001, and always end at the (same) high value? Do they always
go up in
ones? What should the script do if there's a gap in the sequence?
I'd then have listed the full names (paths) of all the files describing
one note
C:\my\organsamples\basson16l\037-C#.wav
C:\my\organsamples\basson16l\rel00150\037-C#.wav
C:\my\organsamples\basson16l\rel00600\037-C#.wav
C:\my\organsamples\basson16l\rel99999\037-C#.wav
C:\my\organsamples\basson16r\037-C#.wav
C:\my\organsamples\basson16r\rel00150\037-C#.wav
C:\my\organsamples\basson16r\rel00600\037-C#.wav
C:\my\organsamples\basson16r\rel99999\037-C#.wav
which hopefully would have removed some of the vagueness. Notice, no
unnecessary
dots, and the full names (with the ".wav" extensions) of the files.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-13 23:48:04 UTC
Permalink
Post by Dr. Mark Bugeja MD
I have tested the wav samples. They won't load in the software
GrandOrgue and give a PCM format error. Could this have something to
do with the merging process we have just done?
Who knows?

I had the impression you earlier tested a merge and decided the
resulting file
was ok (either it sounded ok, or it looked ok in some other program)?
Was that
so?

If so, do the files merged by the script also sound ok to you, or look
ok, doing
whatever it was that you did before to check a file?



Take one example (ie a left file, a right file and file that was merged
from them),
and for each of those files issue in a command window this command
(though use the
paths that make sense on your computer):

"C:\path\to\sox\soxi.exe" "C:\path\to\audio-files\some.wav"

Note that this runs "soxi.exe" not "sox.exe". Make sure that you have a
soxi.exe
(in the same place as you have sox.exe).

Paste the command you issued and whatever the result was, for each file,
in your
next reply.

Also issue, for each file, this command:

"C:\path\to\sox\sox.exe" "C:\path\to\audio-files\some.wav" -n stat
stats

and paste those commands and results into your reply too. Note that
this command
called 'sox' not 'soxi', and the 'stat stats' part runs two separate
effects which
will list details about the audio data in the file concerned.


So, that's three separate commands to be issued, against three separate
files.
Hopefully something in the details the three commands list will give
someone here a
clue as to what might be wrong.


Do you remember earlier in the discussion someone pointed out that,
really, scripts
should check things? The script you've been running checks nothing.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-14 07:22:39 UTC
Permalink
Hi,

I can only test the files in GrandOrgue when I build the organ in
question. I cannot test individual files on the software. I did check
files with iZotope and they look good visually, sound well when played,
they are in 24 bit and 48kHz sample rate, they load up on
LoopAuditioneer so I could add pitch information and loops.

The only other software that issued a warning was Sony's Soundforge...
though I can't get this warning again for some reason. What I am
noticing just now is that Soundforge gives a detail (property) when
opening up a file, something that I did not observe before, not that it
means anything to me:

* Rgns/Play/Cmd: No/No/No

A file that is known to work with GrandOrgue gives _*
*_

* Rgns/Play/Cmd:_*Yes*_/No/No.

Could my answer lie with this difference?

I'll try running the script as you recommended and generate the "logs".

Mark
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I have tested the wav samples. They won't load in the software
GrandOrgue and give a PCM format error. Could this have something to
do with the merging process we have just done?
Who knows?
I had the impression you earlier tested a merge and decided the
resulting file
was ok (either it sounded ok, or it looked ok in some other program)?
Was that
so?
If so, do the files merged by the script also sound ok to you, or look
ok, doing
whatever it was that you did before to check a file?
Take one example (ie a left file, a right file and file that was merged
from them),
and for each of those files issue in a command window this command
(though use the
"C:\path\to\sox\soxi.exe" "C:\path\to\audio-files\some.wav"
Note that this runs "soxi.exe" not "sox.exe". Make sure that you have a
soxi.exe
(in the same place as you have sox.exe).
Paste the command you issued and whatever the result was, for each file,
in your
next reply.
"C:\path\to\sox\sox.exe" "C:\path\to\audio-files\some.wav" -n stat
stats
and paste those commands and results into your reply too. Note that
this command
called 'sox' not 'soxi', and the 'stat stats' part runs two separate
effects which
will list details about the audio data in the file concerned.
So, that's three separate commands to be issued, against three separate
files.
Hopefully something in the details the three commands list will give
someone here a
clue as to what might be wrong.
Do you remember earlier in the discussion someone pointed out that,
really, scripts
should check things? The script you've been running checks nothing.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-14 12:40:40 UTC
Permalink
Post by Dr. Mark Bugeja MD
Hi,
I can only test the files in GrandOrgue when I build the organ in
question. I cannot test individual files on the software. I did check
files with iZotope and they look good visually, sound well when
played, they are in 24 bit and 48kHz sample rate, they load up on
LoopAuditioneer so I could add pitch information and loops.
The only other software that issued a warning was Sony's Soundforge...
though I can't get this warning again for some reason. What I am
noticing just now is that Soundforge gives a detail (property) when
opening up a file, something that I did not observe before, not that
* Rgns/Play/Cmd: No/No/No
A file that is known to work with GrandOrgue gives _*
*_
* Rgns/Play/Cmd:_*Yes*_/No/No.
Could my answer lie with this difference?
I've no idea what that means. However: http://www.magix-audio.com who
took over the
Sony products do have technical support (I know this because I emailed
them several
times fairly recently about one of their other products), so you could
email them and
ask what that means.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-14 09:50:54 UTC
Permalink
Would it help to provide 2 samples, one from an instrument known to work
and another, a file merged with the script? I have no idea how to
compare them other than opening them up in a software like soundforge
and seeing what the properties of each show? It seems there is some kind
of information within these files (?header) that is relied upon by
GrandOrgue and needs to be somehow corrected. Otherwise the merged files
are what they ought to be - stereo, 24bit and 48kHz.

If this can help before I go through with anything else then here is the
link:

https://mega.nz/#!IZQwFByQ!oZCDk6Qh_xSq_DvC3mKBJCVRO726cvAFCULMHWFNhNY

The files are clearly labelled as to which is which.

If there is something in them, can it be corrected manually or (less
preferably) by re-doing the merger using a modified script to preserve
as much of the properties of the original (source) files?

Mark

______________________________________________
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I have tested the wav samples. They won't load in the software
GrandOrgue and give a PCM format error. Could this have something to
do with the merging process we have just done?
Who knows?
I had the impression you earlier tested a merge and decided the
resulting file
was ok (either it sounded ok, or it looked ok in some other program)?
Was that
so?
If so, do the files merged by the script also sound ok to you, or look
ok, doing
whatever it was that you did before to check a file?
Take one example (ie a left file, a right file and file that was merged
from them),
and for each of those files issue in a command window this command
(though use the
"C:\path\to\sox\soxi.exe" "C:\path\to\audio-files\some.wav"
Note that this runs "soxi.exe" not "sox.exe". Make sure that you have a
soxi.exe
(in the same place as you have sox.exe).
Paste the command you issued and whatever the result was, for each file,
in your
next reply.
"C:\path\to\sox\sox.exe" "C:\path\to\audio-files\some.wav" -n stat
stats
and paste those commands and results into your reply too. Note that
this command
called 'sox' not 'soxi', and the 'stat stats' part runs two separate
effects which
will list details about the audio data in the file concerned.
So, that's three separate commands to be issued, against three separate
files.
Hopefully something in the details the three commands list will give
someone here a
clue as to what might be wrong.
Do you remember earlier in the discussion someone pointed out that,
really, scripts
should check things? The script you've been running checks nothing.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-14 12:44:58 UTC
Permalink
Post by Dr. Mark Bugeja MD
Would it help to provide 2 samples, one from an instrument known to
work and another, a file merged with the script?
It might.
Post by Dr. Mark Bugeja MD
I have no idea how to compare them other than opening them up in a
software like soundforge and seeing what the properties of each show?
The soxi, and sox stat stats commands are going to tell us a whole load
of things about each file. They might or might not be helpful... but
let's see what they say.
Post by Dr. Mark Bugeja MD
If there is something in them, can it be corrected manually or (less
preferably) by re-doing the merger using a modified script to preserve
as much of the properties of the original (source) files?
Maybe; sox has lots of options but we need to know what the problem is
first.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-14 13:02:13 UTC
Permalink
There is no such soxi.exe in the sox folder!
Post by Jeremy Nicoll - ml sox users
Post by Dr. Mark Bugeja MD
I have tested the wav samples. They won't load in the software
GrandOrgue and give a PCM format error. Could this have something to
do with the merging process we have just done?
Who knows?
I had the impression you earlier tested a merge and decided the
resulting file
was ok (either it sounded ok, or it looked ok in some other program)?
Was that
so?
If so, do the files merged by the script also sound ok to you, or look
ok, doing
whatever it was that you did before to check a file?
Take one example (ie a left file, a right file and file that was merged
from them),
and for each of those files issue in a command window this command
(though use the
"C:\path\to\sox\soxi.exe" "C:\path\to\audio-files\some.wav"
Note that this runs "soxi.exe" not "sox.exe". Make sure that you have a
soxi.exe
(in the same place as you have sox.exe).
Paste the command you issued and whatever the result was, for each file,
in your
next reply.
"C:\path\to\sox\sox.exe" "C:\path\to\audio-files\some.wav" -n stat
stats
and paste those commands and results into your reply too. Note that
this command
called 'sox' not 'soxi', and the 'stat stats' part runs two separate
effects which
will list details about the audio data in the file concerned.
So, that's three separate commands to be issued, against three separate
files.
Hopefully something in the details the three commands list will give
someone here a
clue as to what might be wrong.
Do you remember earlier in the discussion someone pointed out that,
really, scripts
should check things? The script you've been running checks nothing.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Jeremy Nicoll - ml sox users
2016-12-14 13:29:45 UTC
Permalink
Post by Dr. Mark Bugeja MD
There is no such soxi.exe in the sox folder!
Oops, you clearly didn't read the install notes, did you?

Just make a copy of sox.exe and name that soxi.exe; this works because
when you then use the soxi.exe copy, the program examines the name under
which it was called and does different things.

This is not something that all utility programs always do; it's a
special
trick in the way that sox/soxi (and also play.exe and rec.exe if you
make
copies with those names) work.
--
Jeremy Nicoll - my opinions are my own
Dr. Mark Bugeja MD
2016-12-14 13:58:08 UTC
Permalink
There is no instruction to make a copy of sox,exe and to rename it as
soxi.exe

:-P

Having said that do I run it using the combine.vbs or directly in cmd
prompt?

Mark
Post by Jeremy Nicoll - ml sox users
Take one example (ie a left file, a right file and file that was merged
from them),
and for each of those files issue in a command window this command
(though use the
"C:\path\to\sox\soxi.exe" "C:\path\to\audio-files\some.wav"
Note that this runs "soxi.exe" not "sox.exe". Make sure that you have a
soxi.exe
(in the same place as you have sox.exe).
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Loading...