Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.4

Bring Colours to Your Life.

X3D Reference

Adding sound

Motivation

  • Sounds can be triggered by viewer actions
    • Clicks, horn honks, door latch noises
  • Sounds can be continuous in the background
    • Wind, crowd noises, elevator music
  • Sounds emit from a location, in a direction, within an area

Creating sounds

Sounds have two components:

  • A sound source providing a sound signal
    • Like a stereo component
  • A sound emitter converts a signal to virtual sound
    • Like a stereo speaker

Syntax: AudioClip

An AudioClip node creates a digital sound source:

  • url - a sound file URL
  • pitch - playback speed
  • playback controls, like a TimeSensor node

XML Encoding

Classic Encoding

Syntax: MovieTexture

A MovieTexture node creates a movie sound source:

  • url - a texture movie file URL
  • speed - playback speed
  • playback controls, like a TimeSensor node

XML Encoding

Classic Encoding

Selecting sound source types

Supported by the AudioClip node:

  • MP3 or WAV - digital sound files
    Good for sound effects

Supported by the MovieTexture node:

  • MP4 - movie file with sound
    Good for virtual TVs

Syntax: Sound

A Sound node describes a sound emitter:

XML Encoding

Classic Encoding

A Sound node describes a sound emitter:

  • intensity - volume
  • spatialize - use spatialize processing
  • priority - prioritize the sound

XML Encoding

Classic Encoding

A Sound node describes a sound emitter:

  • minFront, minBack - inner ellipsoid
  • maxFront, maxBack - outer ellipsoid

Setting the sound range

  • The sound range fields specify two ellipsoids
    • minFront and minBack control an inner ellipsoid
    • maxFront and maxBack control an outer ellipsoid
  • Sound has a constant volume inside the inner ellipsoid
  • Sound drops to zero volume from the inner to the outer ellipsoid

Creating triggered sounds

AudioClip node:

  • loop FALSE
  • Set startTime from a sensor node

Sound node:

  • spatialize TRUE
  • minFront etc. with small values
  • priority 1.0

A sample using triggered sound

XML Encoding

Classic Encoding

Creating continuous localized sounds

AudioClip node:

  • loop TRUE
  • startTime 0.0 (default)
  • stopTime 0.0 (default)

Sound node:

  • spatialize TRUE (default)
  • minFront etc. with medium values
  • priority 0.0 (default)

A sample using continuous localized sound

XML Encoding

Classic Encoding

Creating continuous background sounds

AudioClip node:

  • loop TRUE
  • startTime 0.0 (default)
  • stopTime 0.0 (default)

Sound node:

  • spatialize FALSE (default)
  • minFront etc. with large values
  • priority 0.0 (default)

Summary

An AudioClip node or a MovieTexture node describe a sound source:

  • A URL gives the sound file
  • Looping, start time, and stop time control playback

A Sound node describes a sound emitter:

  • A source node provides the sound
  • Range fields describe the sound volume

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.