Main Content

Listen to Sound in a Virtual World

If a virtual world contains a Sound node and your computer supports sound, then you can listen to the sound using these Simulink® 3D Animation™ components:

  • Simulink 3D Animation Viewer

  • 3D Animation Player

  • vr.canvas on a figure window

System Requirements for Sound

To listen to virtual world sound, use a computer setup that supports sound, including having:

  • A sound card

  • Speakers

  • Operating system support, such as ALSA (Advanced Linux Sound Architecture) on Linux® platforms

For an AudioClip node, use a mono or stereo WAV file in uncompressed PCM format.


A stereo sound source retains its channel separation during playback. Simulink 3D Animation attenuates the sound based on the distance of the viewer from the sound location. The relative position of the viewer to the sound location and the viewer direction in the virtual world do not affect the stereo channels. There is no impact even if the Sound node has the spatialize field set to true.

Listen to Sound

Simulink 3D Animation enables sound by default.

To change the default behavior so that sound is disabled, set the Simulink 3D Animation Figure > Rendering > Sound preference to off.

In the Simulink 3D Animation Viewer or 3D Animation Player, to disable sound, right-click in the virtual world and clear the Rendering > Sound option.

For a vr.canvas object, to disable sound, set the Sound property to 'off'.

To control volume, use your computer volume controls.

Related Examples

More About