[mg105687] Re: Animation with Sound in Mathematica?

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown [mg105687] Re: Animation with Sound in Mathematica?

by BenT-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you very much! That is an excellent educational "code" example
of how to integrate sound and video, although neither the music nor
video of your example are what I have in mind <G>.

--- Benjamin Tubb


> 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