From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Schumacher Marlon Newsgroups: gmane.comp.audio.sox.devel,gmane.comp.audio.sox Subject: Re: [SoX-users] time dependent gain Date: Sat, 31 May 2014 17:52:40 -0400 Message-ID: References: <5388CA40.9080504@eckner.net> <5388D1B0.5020801@eckner.net> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1401573184 16230 80.91.229.3 (31 May 2014 21:53:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 21:53:04 +0000 (UTC) Cc: sox-devel@lists.sourceforge.net To: sox-users@lists.sourceforge.net Original-X-From: sox-devel-bounces@lists.sourceforge.net Sat May 31 23:52:58 2014 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org X-ACL-Warn: X-Virus-Scanned: amavisd-new at ircam.fr In-Reply-To: <5388D1B0.5020801@eckner.net> X-Mailer: Apple Mail (2.1874) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1WqrCt-0003XD-2h X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:367 gmane.comp.audio.sox:5575 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WqrCz-0008BI-VU for gcasd-sox-devel@m.gmane.org; Sat, 31 May 2014 23:52:58 +0200 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.76) (envelope-from ) id 1WqrCw-0005R9-1A; Sat, 31 May 2014 21:52:54 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WqrCu-0005Qu-KK; Sat, 31 May 2014 21:52:52 +0000 Received: from smarthost1.ircam.fr ([129.102.3.71]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1WqrCt-0003XD-2h; Sat, 31 May 2014 21:52:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smarthost1.ircam.fr (Postfix) with ESMTP id AD18994809; Sat, 31 May 2014 23:52:44 +0200 (CEST) Received: from smarthost1.ircam.fr ([127.0.0.1]) by localhost (smarthost1.ircam.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C1fw8-YTzV4d; Sat, 31 May 2014 23:52:44 +0200 (CEST) Received: from increvable.ircam.fr (increvable.ircam.fr [IPv6:2001:660:3004:2:230:48ff:fe29:4f48]) by smarthost1.ircam.fr (Postfix) with ESMTP id 846F994807; Sat, 31 May 2014 23:52:44 +0200 (CEST) Received: from [192.168.2.25] (bas9-montrealak-1177755127.dsl.bell.ca [70.51.29.247]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: Schumacher) by increvable.ircam.fr (Postfix) with ESMTP id 98DB34E391; Sat, 31 May 2014 23:52:43 +0200 (CEST) Hi there, I was also wishing for this kind of functionality (envelopes or breakpoint functions), but afaik this is currently not possible with sox. It seems currently you can only get there by trimming->processing->splicing together again - which I also found rather cumbersome and less accurate -> but maybe someone on this list could give a simple example/workaround how to do this. Ecasound can do dynamic parameter changes during processing. Don't know if this would be very hard to do (I think there has been a suggestion to use a 'control signal' for dynamic control)... maybe one possibility might be to point to a textfile (instead of the value) which describes a breakpoint function as time-value tuplets (X being time, Y being the value). This breakpoint function could be sampled (with linear interpolation) according to a rate set as a preference option (which could have a default, perhaps one signal buffer). For example: sox infile.wav outfile.wav vol --bpf-file.txt The "bpf-file" could look like this: X Y 0 0 2.5 0.5 3.5 0.25 4 0 Cheers, Marlon PS Also forwarding this to the devel-list (for reference, who knows, perhaps it might be useful/considered ;) On May 30, 2014, at 14:45 , Erich Eckner wrote: > Hi, > > is there a way to apply a time-dependent gain? > I got some recordings with rather quiet parts in between, which I want > to enhance. I do _not_ want to compress the whole recording, only apply > some gain like: > > 0db until time t1, then smoothly up to x db at time t2, then constant > gain x until time t3, then smoothly down to 0db at time t4 and then > constant 0db until the end. > > If possible, it would be nice to determine "x" by the volume level in > that range, but I could live without. > > The only thing, I see, how this is possible, would be: > - cut into multiple files (I'm doing this anyways) > - take "1 sec. silence" + "t2 - t3" + "1 sec silence", amplify this by x > dB, fade in & out with somewhat complex calculated durations, trim away > the first and last second > > But this seems rather complicated for a task, which I assume is quite > common. > > Applying "compand" only for the relevant track from t2 to t3 is not > useful for me, because then I get a "gain-step" at t3 from x db to 0 db > which is annoying. > > Greetings, > Erich > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet_______________________________________________ > Sox-users mailing list > Sox-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sox-users ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet