sox-users@lists.sourceforge.net unofficial mirror
 help / color / Atom feed
From: "Dr. Thomas Tensi" <t.tensi@gmx.de>
To: sox-users <sox-users@lists.sourceforge.net>
Subject: Re: Reason for sox mix restriction to two or more input files?
Date: Sat, 10 Aug 2019 14:06:33 +0200
Message-ID: <878d1509-1207-2ad4-e084-7a6f9a91b5fd@gmx.de> (raw)
In-Reply-To: <f8fcdf1156c2691934c68a3b8287d3b5@wingsandbeaks.org.uk>

Hello Jeremy,


thanks for the explanation!

You wrote:
 > > [sox requires at least two input files for mixing]
 > > I understand that at least one input file is necessary
 > > (for finding the target length, sample rate etc.), but
 > > why does sox fail when mixing a single input file?
 > Probably because it's simpler to write programmes that
 > assume the user means what they say.  So if you ask sox to
 > mix several files, it is written assuming that you will
 > provide more than one.

Hmm, I am not convinced yet.  When I use my analog mixing
desk, I can easily "mix" even one input to the master.  So
mixing should even be possible for one file.

When using sox manually I am fine with changing my command
line accordingly; for an automatic use of a command line
tool boundary cases should just work if there is a
reasonable interpretation.

So
     sox -m -v 0.3 inputfile outputfile
is just equivalent to
     sox -v 0.3 inputfile outputfile

 > You say you're using a script to drive this.  That means
 > you are in control.  Your script can - surely - determine
 > that there's only one input file and adjust the sox
 > command(s) you're using accordingly.

It is a bit more complicated than that, because the script
does not know at all about sox, but is configurable for
arbitrary command-line audio processors.  Unfortunately
the configuration now has to take care of a special case for
single file mixing in sox, where other audio processors
(like e.g. ecasound) have no problem at all.

Nevertheless I found a workaround: I always add a null file
as an input partner for all mixing steps.  This is ugly, but
it works.


         Best regards,

                 Thomas


_______________________________________________
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
2019-08-09 19:42 Dr. Thomas Tensi
2019-08-10  9:52 ` Jeremy Nicoll - ml sox users
2019-08-10 12:06   ` Dr. Thomas Tensi [this message]
2019-08-10 17:28   ` Måns Rullgård
2019-08-11 19:22 Dr. Thomas Tensi
2019-08-12  9:29 ` Måns Rullgård

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=878d1509-1207-2ad4-e084-7a6f9a91b5fd@gmx.de \
    --to=sox-users@lists.sourceforge.net \
    --cc=thomas@tensi.eu \
    /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