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=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, 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 57714203F2 for ; Wed, 25 Oct 2017 19:49:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1e7RgR-0000i8-FF; Wed, 25 Oct 2017 19:49:47 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1e7RgQ-0000hz-Ch for sox-users@lists.sourceforge.net; Wed, 25 Oct 2017 19:49:46 +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:References:Message-ID:Subject:To:From:Date; bh=eZCxvFvlcuqth1RODcVag9SJgcIjXOUaBbqzDymLbQQ=; b=Bs8WfvejkpGfkdZ8J1lqGdCMxcO2SfLCapSfvrRtLMiJavmXXBxzgTfx2aH6Uj5zpMzumI5JoHtkwcAHToG0GftA4iVhIuQwufYc1ubEv2Mzv+Km3sNoa6TW6fZ9jyuqPFQtkDG4q242rwyrVS5JgWLTuhGuHaP4jlZdHpmWHOA=; 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:References:Message-ID:Subject:To:From:Date; bh=eZCxvFvlcuqth1RODcVag9SJgcIjXOUaBbqzDymLbQQ=; b=N7PtsLx+orvXtGgveIPHg/48dDVhb46WDlHd5Tbqt+HojW9sM3TCB9xZ9wPWouD1SX7PYfdTbQxTRemCUBrOe2eB0IS86LraR1ZV0kw6ux0i6VrsmvaHdQymeQ6NBCQBmTvshrLk4rLVg/kVVWySewWucAeLvf3kvvZC2mgTcOI=; X-ACL-Warn: Received: from mx.stare.cz ([79.98.77.229]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1e7RgM-0000y3-OI for sox-users@lists.sourceforge.net; Wed, 25 Oct 2017 19:49:46 +0000 Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 66e1d9ba for ; Wed, 25 Oct 2017 21:49:32 +0200 (CEST) Date: Wed, 25 Oct 2017 21:49:32 +0200 From: Jan Stary To: sox-users@lists.sourceforge.net Message-ID: <20171025194931.GA38405@www.stare.cz> Mail-Followup-To: sox-users@lists.sourceforge.net References: <82af7d1a9ad07b0bd46d7d9c99ddcf75@wingsandbeaks.org.uk> <20171025180735.GA49885@www.stare.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171025180735.GA49885@www.stare.cz> User-Agent: Mutt/1.7.1 (2016-10-04) X-Headers-End: 1e7RgM-0000y3-OI 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 25 20:07:36, hans@stare.cz wrote: > $ sox input output effect1 effect2 effect3 ... > A single SoX process will run on a single CPU. > The effects are applied in the order you specify them. > > > 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. To get an idea of how much there is to gain, here is a naive experiment. $ f='-t raw -c 1 -r 48000 -b 16 -e signed' $ sox $f -n input.raw synth noise gain -6 trim 0 02:00:00 That's two hours of white noise. Now run three effects on it, first as an effect-chain of a single sox process, then as a pipeline of three sox processes. $ time sox $f input.raw $f output.raw lowpass 8k equalizer 4k 1o +3 gain -n $ time sox $f input.raw $f - lowpass 8k \ | sox $f - $f - equalizer 4k 1o +3 \ | sox $f - $f output.raw gain -n (Run it several times to be sure the second one does not have the benefit of filesystem caching). On my machine, both take about 52 seconds. With two hours of a sine wave, the result is almost the same. Naively, this makes me think you will not gain much by making sox run on different CPUs. Just run the sequence of effects you need to do. 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