|
Use the controls on the left to set the pan and volume of four different sounds. The JScript code used to generate the animation appears below.
Show more
information.
The sounds in this demo default to zero volume and zero pan. To hear them, increase the volume by pulling the volume slider up.
You can import sound from many audio formats, including WAV, MIDI, and MP2 files, or synthesize sound using built-in synthesizer sound sources. You can mix different sounds even if they originated from files of different audio formats. You can also spatialize sound by embedding sounds in 3-D objects and rendering them with a microphone (DAMicrophone).
|
<HTML>
<HEAD>
</HEAD>
<BODY>
<OBJECT ID="DAControl" STYLE="width:300;height:250"
CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>
<SCRIPT LANGUAGE="JScript">
<!--
m = DAControl.MeterLibrary;
mediaBase = "../../../samples/multimedia/media/";
soundBase = mediaBase + "sound/";
rawSnd1 = m.ImportSound(soundBase + "16b_mn_11_01.wav").Sound.Loop();
rawSnd2 = m.ImportSound(soundBase + "16b_mn_11_02.wav").Sound.Loop();
rawSnd3 = m.ImportSound(soundBase + "16b_mn_11_03.wav").Sound.Loop();
rawSnd4 = m.ImportSound(soundBase + "16b_mn_11_04.wav").Sound.Loop();
finalSnd = m.MixArray(new Array(rawSnd1.Pan().Gain(),
rawSnd2.Pan().Gain(),
rawSnd3.Pan().Gain(),
rawSnd4.Pan().Gain()));
oscillatingNumber = m.Sin(m.LocalTime);
txtCol = m.ColorHslAnim(m.Abs(oscillatingNumber), m.DANumber(0.5), m.DANumber(0.5));
fontStyle = m.Font("Arial",-18, txtCol );
sndImg = m.StringImage("DirectAnimation Sound", fontStyle);
DAControl.Image = m.Overlay(sndImg, m.SolidColorImage(m.Black));
DAControl.Sound = finalSnd;
DAControl.Start();
-->
</SCRIPT>
</BODY>
</HTML>
|
|
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.