MATLAB SIMULINK 3D ANIMATION - S Guia do Utilizador Página 171

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 490
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 170
Add Sound to a Virtual World
5-29
Add Sound to a Virtual World
To add sound to a virtual world, use a VRML Sound node. You can include an
AudioClip node in a Sound node. For an AudioClip node, use a mono or stereo WAV
file in uncompressed PCM format.
To listen to the sound, use a computer that supports sound. For details, see “Listen to
Sound in a Virtual World”.
Note: 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 stereo channels are not affected by the relative position of the viewer to the
sound location and the viewer direction in the virtual world, even if the Sound node has
the spatialize field set to true.
The following code adds to a virtual world a sound that switches on and off based on a
logical signal.
DEF SoundSwitch Switch {
choice [
DEF MySound Sound {
source DEF CraneNoise AudioClip {
url "sound/crane_run.wav"
loop TRUE
}
}
]
}
Vista de página 170
1 2 ... 166 167 168 169 170 171 172 173 174 175 176 ... 489 490

Comentários a estes Manuais

Sem comentários