sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Re: [SoX-users] time dependent gain
       [not found] ` <5388D1B0.5020801@eckner.net>
@ 2014-05-31 21:52   ` Schumacher Marlon
  0 siblings, 0 replies; only message in thread
From: Schumacher Marlon @ 2014-05-31 21:52 UTC (permalink / raw)
  To: sox-users; +Cc: sox-devel

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 <erich@eckner.net> 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-31 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5388CA40.9080504@eckner.net>
     [not found] ` <5388D1B0.5020801@eckner.net>
2014-05-31 21:52   ` [SoX-users] time dependent gain Schumacher Marlon

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