MathGroup Archive 2002

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

Search the Archive

Re: timing with Play


I get the same result in 4.2 (under Windows).  Not sure why.  But you 
could try this modification:

   PlaySeq[L_, dur_] := Do[PlayTone[L[[i]], dur];
                          Pause[dur], {i, Length[L]}]

Then

   PlaySeq[{224, 256, 384}, 3]

seems to work as expected, prolonging the notes before the last one to 
their full expected duration.

Erich Neuwirth wrote:
> PlayTone[F_, dur_] := Play[Sin[2*Pi*F*t], {t, 0, dur}]
> allows me to play a sine wave of frequency F and duration dur
> 
> PlaySeq[L_, dur_] := Do[PlayTone[L[[i]], dur], {i, Length[L]}]
> 
> should allow me to play a sequence of tones
> with a given list of frequencies L
> and all the same duration dur.
> 
> It does not work at least in 4.1
> 
> all tones but the last one are much shorter than dur.
> 
> any help?
> 
> 
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street
Amherst, MA 01375



  • Prev by Date: Re: C code for dual processor machine
  • Next by Date: Re: Could someone verify a long Pi calculation in Version 4 for me?
  • Previous by thread: timing with Play
  • Next by thread: C code for dual processor machine