sox-users@lists.sourceforge.net unofficial mirror
 help / color / Atom feed
From: Jan Stary <hans@stare.cz>
To: sox-users@lists.sourceforge.net
Subject: Re: What´s wrong with my batch script?
Date: Sat, 23 Sep 2017 16:27:05 +0200
Message-ID: <20170923142703.GA39919@www.stare.cz> (raw)
In-Reply-To: <05b65cb2ca6f227c796247829198a0c9@wingsandbeaks.org.uk>

On Sep 23 15:10:34, jn.ml.sxu.88@wingsandbeaks.org.uk wrote:
> On 2017-09-23 00:26, AE Photos02 wrote:
> > Hello everyone.
> > 
> > I am making a script that is supposed to mix together 2 separate
> > versions
> > of the same files. So far so good. Now it has to be able to do this in a
> > batch of all files in one folder, to an output file, a mixed file.
> > 
> > The idea is to have samples called *sweep1.wav be combined with the
> > files
> > called *sweep2.wav. So far my script is combining *only* one specific
> > *"sweep1"
> > file*, the last in my list *(which is number 3)*, with one the correct
> > "sweep2" file.
> > 
> > 
> > *Here´s the script so far:*
> > 
> > -------------------------
> > 
> > for file in ./*sweep1*
> > 
> > do
> > 
> > for file2 in ./*sweep2*
> > 
> >     do
> > 
> >         out=COMBINED
> > 
> >         sox -V4 -m -v 1 $file -v 1 $file2 $file-$out.wav
> > 
> >     done
> > 
> > done
> > 
> > --------------------------

This is most probably a shell scripting problem
which has nothing to do with SoX.

> > for file in ./*sweep1*
> > do
> > for file2 in ./*sweep2*

You are combining every *sweep1* file with every *sweep2* file,
overwriting the output over and over again. Of course the last wins.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 23:26 AE Photos02
2017-09-23 14:10 ` Jeremy Nicoll - ml sox users
2017-09-23 14:27   ` Jan Stary [this message]
2017-09-24 17:21 AE Photos02
2017-09-24 19:04 ` Jeremy Nicoll - ml sox users
2017-09-25 21:14   ` AE Photos02

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170923142703.GA39919@www.stare.cz \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

sox-users@lists.sourceforge.net unofficial mirror

Archives are clonable: git clone --mirror https://public-inbox.org/sox-users

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.sox
	nntp://news.gmane.org/gmane.comp.audio.sox

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox