MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Removing Audio "Clicking"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28319] Re: Removing Audio "Clicking"
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Wed, 11 Apr 2001 02:00:58 -0400 (EDT)
  • References: <9armr9$qmq@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Alan" <kd7cyb at mac.com> wrote in message news:9armr9$qmq at smc.vnet.net...
> I have a sequence of audio files, each 0.1 second long and of various
> frequencies, that, when combined, produce a "clicking" sound because the
> speaker is jumping from one amplitude to another in between the
> different frequencies of the combined audio. I need help using a moving
> average or anything else that will remove the clicking produced.

The solution is to mix an "envelope" function (that ramps the sound up and
down) with the sound specification, like this:

envelope[a_,b_,t_,tc_] := ((b-t) (-a+t))/((b-t+tc) (-a+t+tc))

snd[f_,d_,tc_] :=
  Play[Sin[2 Pi f t]envelope[0,d,t,tc],{t,0,d},SampleDepth->16,
    SampleRate->44100]

SetAttributes[snd,Listable]

snd[{440,660,880},.1,.01]

Where "tc" is the ramp time contstant.
--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: Manipulating Strings
  • Next by Date: Re: implicit function
  • Previous by thread: Removing Audio "Clicking"
  • Next by thread: newbie question about the symbol E