Re: Animation with Sound in Mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg105644] Re: Animation with Sound in Mathematica?
- From: Helen Read <hpr at together.net>
- Date: Sun, 13 Dec 2009 05:38:46 -0500 (EST)
- References: <hg00cj$j8l$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
On 12/12/2009 6:56 AM, BenT wrote: > Can anyone give an example of a true multimedia-like "music video" > created exclusively in Mathematica 7? > > I have not worked with animation very often, and although I understand > how to use the related functions, I haven't found a way to "sync" them > to a/an audio (Play or SoundNote generated) track(s). An example of > how to do so would be very welcomed! I'd like to know how to do that too. In previous versions of Mathematica, you could combine graphics and sounds with Show, but in Mathematica 7, Show seems only to like graphics objects. You can simply play the sounds at the same time the animation runs, however, like this. ding = SoundNote["F", 1, "Tinklebell"]; soundeffects := EmitSound[ Sound[{Table[ SoundNote[m, 1, "Goblins"], {m, RealDigits[N[\[Pi], 10], 10][[1]]}], SoundNote[RealDigits[N[\[Pi], 15], 15][[1]], 10, "Sweep"], ding}]]; animation = Animate[Plot[{a Sin[b x], -a Sin[1/b x]}, {x, 0, 2 \[Pi]}, PlotRange -> {-5, 5}, PlotStyle -> Thick, ColorFunction -> Function[{x, y}, ColorData["Rainbow"][y]], Axes -> False, PerformanceGoal -> "Quality"], {a, -5, 5}, {b, .1, 10}, AnimationDirection -> ForwardBackward, AnimationRepetitions -> 2]; Evaluate[soundeffects]; animation -- Helen Read University of Vermont