From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3561 216.34.176.0/20 X-Spam-Status: No, score=-2.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, FAKE_REPLY_C,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3C1EB202DD for ; Wed, 25 Oct 2017 18:07:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1e7Q5m-0005RK-OP; Wed, 25 Oct 2017 18:07:50 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1e7Q5l-0005RC-Ui for sox-users@lists.sourceforge.net; Wed, 25 Oct 2017 18:07:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=50E1xZw9bHflGi9CPIBuf9zg+DybZXsyXe9RskDwjGM=; b=ihhVPp2HzEDm60EsbmDguOxGbyl+k166QEkPIKoOXR3Dh4mcnRqNpejcNM/mup3isbJqhzpVpMqiDzJ62IoflGt85WTxzc5HUPzDUtEJhG7UrdVPXyhzdlnigx6C6hS0Zoz6QFt80WlwdvhoA2SxqYhULfKhCfzKfbytJ7wqs5s=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=50E1xZw9bHflGi9CPIBuf9zg+DybZXsyXe9RskDwjGM=; b=SiwX+IoycfoDH2b13HTsj3xodwz6tdlJiNNA+lz76FyYe4NsqdV9mHYogCxLWmZhQIkLLJBlyCe3Z7fJj40r1HNkpOy3ubs3gOhSnDZVtn+zKZiIL8ORzksClgdol8e9lb6ru8/F8p8Jw7xud9DUmUPyN65ZUpV9JaTP6vRQ7cI=; X-ACL-Warn: Received: from ns.stare.cz ([79.98.77.229] helo=mx.stare.cz) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1e7Q5i-0000kU-Eu for sox-users@lists.sourceforge.net; Wed, 25 Oct 2017 18:07:49 +0000 Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id fd73592c for ; Wed, 25 Oct 2017 20:07:36 +0200 (CEST) Date: Wed, 25 Oct 2017 20:07:36 +0200 From: Jan Stary To: sox-users@lists.sourceforge.net Message-ID: <20171025180735.GA49885@www.stare.cz> Mail-Followup-To: sox-users@lists.sourceforge.net MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <82af7d1a9ad07b0bd46d7d9c99ddcf75@wingsandbeaks.org.uk> User-Agent: Mutt/1.7.1 (2016-10-04) X-Headers-End: 1e7Q5i-0000kU-Eu Subject: Re: multitasking X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-users-bounces@lists.sourceforge.net 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