MathGroup Archive 2005

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

Search the Archive

Re: Play restarting to early

  • To: mathgroup at
  • Subject: [mg53259] Re: Play restarting to early
  • From: David Bailey <dave at>
  • Date: Mon, 3 Jan 2005 04:29:35 -0500 (EST)
  • References: <cr8e56$r6k$>
  • Sender: owner-wri-mathgroup at

Erich Neuwirth wrote:
> I have a problem with Play:
> Map[Play[Sin[#*2*Pi*t], {t, 0, 1}] &, {440, 550}]
> does not wait with playing the second sound
> until the first oen has finished playing.
> Is there a canonical way of havin Mathematica waiting
> to redner the second sound until the first one has finished playing?

You need to get the two sounds fused together into one larger sound 
before it goes to the frontend. For example:



BTW, if you want to get decent quality sound out of Mathematica, you 
should use the SampleDepth option and possibly SampleRate option to more 
realistic values, and if you have sounds of varying intensity (which you 
don't in your example), you really need to set a PlayRange, otherwise 
Mathematica sets the gain so that the loud parts overload! It is amazing 
what a difference that makes - the defaults were appropriate about 15 
years ago!

David Bailey

  • Prev by Date: Re: Thread
  • Next by Date: Re: How to draw a trajectory in DensityPlot&#65311;
  • Previous by thread: Re: Play restarting to early
  • Next by thread: For to Map to Increase Speed