sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <hans@stare.cz>
To: sox-users@lists.sourceforge.net
Subject: Re: multitasking
Date: Wed, 25 Oct 2017 20:07:36 +0200	[thread overview]
Message-ID: <20171025180735.GA49885@www.stare.cz> (raw)
In-Reply-To: <CAKS_MTtNEPhcTtbum5gN-oHrM+b3aTb1MqNLHmh_5V-rbu0vWA@mail.gmail.com> <82af7d1a9ad07b0bd46d7d9c99ddcf75@wingsandbeaks.org.uk> <CAKS_MTtNd3hryf5h920F_0DiZ3wEan3ZGTNqtcn+BpsZNSZcDw@mail.gmail.com>

On Oct 24 19:00:55, ghe2001@gmail.com wrote:
> I'm writing a wrapper around SoX, and I've come to the point where a
> number of it's capabilities are required at the same time (eq,
> bandpassing, speech rate change, etc.) and I'm confused about the best
> way to get these all done.

$ sox input output effect1 effect2 effect3 ...

> I'm running on a multi-core CPU, so I turned on mult-threaded but it
> doesn't seem to use more than one -- it seems to hop around from one
> to another, but always running on just a single core at a time.

A single SoX process will run on a single CPU.

> There's talk of a 'chain' in the dox consisting of a number of args
> with ':' between them, but I'm not sure what this means. Does just
> asking for a number of actions enable some kind of threading, using
> several cores in parallel?

I don't think so.

> And if so, does it sort them so
> normalization happens after eq after concatenation, etc.?

The effects are applied in the order you specify them.

On Oct 25 00:29:34, ghe2001@gmail.com wrote:
> > I can't answer the question, but I think whoever does will need to know
> > more.  Are these multiple capabilities needed on different pieces of
> > audio, but all being processed at the same time?
> 
> No, just one hugish (1G++) flac file, processed in several different ways.
> 
> >  - which seems to me to be one sox command with various effects
> >    coded one afetr another
> 
> That's another possibility, but it takes a very long time to cat a
> billion little flacs into a single or mp3 it,

But you don't have a billion little flacs, you have one huge flac.
(BTW, why? Is this the complete Nibelungs?)

> so I assumed it'd take a
> long time to eq or compress the huge flac,

It sure will.

> so I wanted to do several things in parallel.

A single instance of SoX will perform the effects in sequence.
You can try running a pipeline of many SoX instances instead:
$ sox input - effect1 | sox - - effect2 | ... | sox - output effectN
Then your operating system could assign each SoX process to a separate CPU.

> That's not a deal killer because this program is
> being designed to do the SoX part(s) of the job with no human
> intervention. But I'd like to get its job done overnight.

It would be simpler if you isolated your SoX problem to just that.
The rest of your program has nothing to do with this.

> > There two sorts of chain mentioned; one is the "chain of effects" which
> > is (I think) analogous to having a whole series of effects boxes wired
> > up so that sound after it is processed by the first box is cabled to
> > the next box which does something else, then that output is cabled to
> > the next one...   Anywhere you see a series of effects each with their
> > parameters specified, is that sort of chain.
> >
> > Effects like normalisation, eq etc happen in the order you specify them,
> > except for the automatic processing implicit in various ways (say) of
> > combining input files.  (I think.)
> 
> That's what I was assuming (hoping) for. Self sorting of the order of
> effects works for me.

I'm not sure you udnerstand: there is no "self sorting".
The sequence of effects (or the orrder of the pipeline)
is determined by your SoX command.

> Maybe I'll play around with different ways of dealing with things in
> hopes of finding out what works. Unless someone more knowledgeable
> than you and me comes along and saves me a week of futzing.

You still haven't told us what exactly
you want to do with the single input file.

	Jan


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

  parent reply	other threads:[~2017-10-25 18:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 19:00 multitasking Glenn English
2017-10-24 19:44 ` multitasking Jeremy Nicoll - ml sox users
2017-10-25  0:29   ` multitasking Glenn English
2017-10-25 18:39     ` multitasking Jeremy Nicoll - ml sox users
2017-10-25 18:07 ` Jan Stary [this message]
2017-10-25 19:49   ` multitasking Jan Stary
2017-10-25 20:25   ` multitasking Glenn English
2017-10-25 21:11     ` multitasking Jeremy Nicoll - ml sox users
2017-10-26  2:35       ` multitasking Glenn English
2017-10-26  7:39         ` multitasking Jeremy Nicoll - ml sox users
2017-10-26  9:51         ` multitasking Jan Stary
2017-10-26 14:41           ` multitasking Glenn English
2017-10-26 18:57             ` multitasking Jan Stary
2017-10-26 19:17               ` multitasking Glenn English
2017-10-26 20:27                 ` multitasking Jeremy Nicoll - ml sox users
2017-10-26 22:05                   ` multitasking Glenn English
2017-10-26  9:43     ` multitasking Jan Stary
2017-10-26 14:26       ` multitasking Glenn English
2017-10-26  9:48     ` multitasking Jan Stary
2017-10-26 14:34       ` multitasking Glenn English

Reply instructions:

You may reply publicly 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=20171025180735.GA49885@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).