MathGroup Archive 2001

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

Search the Archive

Re: Sound file -> CD burner??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27528] Re: Sound file -> CD burner??
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Sat, 3 Mar 2001 03:40:08 -0500 (EST)
  • References: <97l47a$ji6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"keith" <shulsky at email.arizona.edu> wrote in message
news:97l47a$ji6 at smc.vnet.net...

> Furthermore, these need to be non-clipping samples, as
> that'll cause serious damage to my equipment.

Let me add this to what I posted before. I think from this that you are
concerned about clicks and transients. Here is a sound function that ramps
the sound at the beginning and end of each sound:

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

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

"tc" stands for time constant. Here is a 440 Hz sound, one second duration,
with a ramp time constant of .01 second at the beginning and end:

snd[440,1,.01]

Just double the sound function for stereo, as shown in my last post, like
this:

{Sin[2 Pi f t]envelope[0,d,t,tc],Sin[2 Pi f t]envelope[0,d,t,tc]}

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: Integrate a matrix-function
  • Next by Date: Font Problem: Mathematica 4.01 + Xfree86 4.02
  • Previous by thread: Sound file -> CD burner??
  • Next by thread: Re: Sound file -> CD burner??