Reputation: 63
With sox, I need to silence (ie. mute) the first 100msec (or 4800 samples) of a multichannel audio file, then commence a rapid fade-in over 40 msecs. I've not been able to work out how to do it. Do fade-ins have to be linear with sox or are there other options?
Suggestions please?
Upvotes: 3
Views: 1722
Reputation: 3301
Muting and fading within the audio stream are not directly supported, but in your case, you can do it in these steps:
trim 0.1
. (You could write trim 4800s
as well, if your sample rate is 48000 Hz.)fade 0.04
.pad 0.1
.So, the complete command is:
sox infile outfile trim 0.1 fade 0.04 pad 0.1
By default, fade
uses a logarithmic fade curve starting at –100 dB. However, you can choose a different curve by specifying a letter directly after fade
, as in fade t 0.04
. There are t
for linear, q
for quarter-sine, h
for half-sine, p
for parabolic, as well as l
for logarithmic (the default, but in case you want to make it explicit).
Upvotes: 7