Re: Fwd: Re: merging mono files

Jeremy Nicoll - ml sox users <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
On 2016-12-12 12:12, Dr. Mark Bugeja MD wrote:
> 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.

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.


> 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

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.



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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.