Prev: Possible bug in Opacity[] with plotting function that uses
Next: Having problems finding skeleton of a binary image using Lantuejoul's
From: BenT on 12 Dec 2009 06:56 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! --- Benjamin Tubb
From: Helen Read on 13 Dec 2009 04:48 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
From: BenT on 15 Dec 2009 07:27 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
From: Helen Read on 16 Dec 2009 06:19 On 12/15/2009 7:27 AM, BenT wrote: > 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>. No, I didn't think my example would be what you have in mind :-). It's taken from some code I wrote for what is probably the most frivolous use of Mathematica ever, a little something I call the Pie Machine. http://www.vermonthorns.org/daveorama/pies/report2009/ Check out the "Video of the Pie Machine Festivities" to see it in action. 90% of the code (which I stuck in a package) is I/O, and the rest makes heavy use of RandomChoice. The really sad thing is, when Mathematica 7 was released, the very first thing of thought of was using the new speech output for the Pie Machine! -- Helen Read University of Vermont
From: Michael Greene on 16 Dec 2009 06:20
You might want to look at the source for http://demonstrations.wolfram.com/EquationOfALineGame/ <http://demonstrations.wolfram.com/EquationOfALineGame/>Sergio Mejia demonstrates a very clever trick of using a cellular automation as a note source. It's not synchronized precisely with the other code which is what I thought you were asking for but it may give you some additional ideas. Michael On Tue, Dec 15, 2009 at 4:28 AM, BenT <brtubb(a)pdmusic.org> wrote: > > 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 > > > -- Michael Greene - Programmer Analyst Information Systems, mgreene(a)csumb.edu California State University, Monterey Bay Corporation Bldg - RM 201 - 100 Campus Center, Seaside, CA 93955-8001 831.582.3567 Fax 831.582.4796 |