sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Schumacher Marlon <marlon.schumacher@music.mcgill.ca>
To: sox-users@lists.sourceforge.net
Cc: sox-devel@lists.sourceforge.net
Subject: Re: [SoX-users] time dependent gain
Date: Sat, 31 May 2014 17:52:40 -0400	[thread overview]
Message-ID: <D2DB77E8-E42C-4469-BBDD-4BBB9E839DCE@music.mcgill.ca> (raw)
In-Reply-To: <5388D1B0.5020801@eckner.net>

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

           reply	other threads:[~2014-05-31 21:52 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <5388D1B0.5020801@eckner.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2DB77E8-E42C-4469-BBDD-4BBB9E839DCE@music.mcgill.ca \
    --to=sox-devel@lists.sourceforge.net \
    --cc=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).