Re: multitasking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 24 19:00:55, ghe2001@xxxxxxxxx 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@xxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux