Re: timing with Play
- To: mathgroup at smc.vnet.net
- Subject: [mg36937] Re: timing with Play
- From: Erich Neuwirth <erich.neuwirth at univie.ac.at>
- Date: Wed, 2 Oct 2002 03:33:27 -0400 (EDT)
- References: <200209250551.BAA05399@smc.vnet.net> <amuimv$cd0$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
this is almost the solution. but it creates some artificial rests. when the sounds are created, there is some silence between the different notes. when after creation one clicks the "play sound" icon of the group with all the sounds, these rests disappear. is there a way of Play creating ghte waves, but NOT playing them, and then, doubleclicking the sound icon, hearing the sound without rests immediately? Murray Eisenberg wrote: > 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? >> >> >> >> >> > > -- -- Erich Neuwirth, Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-38624 Fax: +43-1-4277-9386