Vizard 7 » Reference » Multimedia » Multimedia basics
7.7

Multimedia basics

Any sound or video file that's supported by your system's codecs is supported by Vizard (so, if Windows Media Player can play the file, Vizard can play the file). Sound files can be played globally or can be spatialized using various 3D sound features. Video files can be used as textures and mapped onto meshes or texture quads.  You can also use Vizard to capturing and recording sound and video content while you're running a world.

Adding and playing sound files

To add global (non-spatialized) sound to your world, use viz.addAudio(<filename>). Once you've added a sound, you can play it, pause it, loop it, stop it, and start it from any point. You can also change the rate at which it plays and its volume. For more on playing sound files, check out the sound chapter.

sound = viz.addAudio('fountain.wav') 
sound.loop(viz.ON) 
sound.volume(.5) 
sound.setTime(1) 
sound.setRate(0.7) 
sound.play() 

Adding and playing video files

To add video to your world, use viz.addVideo(<filename>). In Vizard, the video functionality inherits from both the texture and sound functionality. So, you can add a video, wrap it around an object, and play it in a few lines. For more on the specifics of using video in your worlds, check out the video chapter.

See also

In this section:

Video basics-- The specifics of using video files.

Sound basics-- The specifics of using sound files.

Recording sound-- Details about a Vizard module that allows you to record sound from a microphone.

Advanced 3D sound -- Details about a Vizard module that handles 3D sound.

Ambisonic 3D sound -- Details about the WorldViz Ambisonic sound system.

Multimedia command table-- A table of commands relevant to videos.

Other sections:

Tutorial: Multimedia-- A tutorial on using sound and video files.

Tutorial: 3D sound -- A tutorial on using Vizard's 3D sound capabilities.

Example scripts:

Video texture

Adding sounds

3D sound