Static Sound

Vanda Engine 1.3.3

TODO: To change the header's content go to Dr.Explain menu Options : Project Settings : HTML (CHM) Export : Setup HTML Template and Layout
TODO: To change the footer's content go to Dr.Explain menu Options : Project Settings : HTML (CHM) Export : Setup HTML Template and Layout
Static Sound
  

Introduction to 3D sound in Vanda Engine 1
First of all, I should explain how 3D sound system works in Vanda Engine 1. There are 3 main things you need to be aware of: the listener and the sources, and attenuation by distance.
 
The Sources
Each sound source has a 3D coordinate which describes where it should be coming from. You should also assign an audio data to each sound.
 
The Listener
The use of a listener in 3D sound is important so that you have a reference point from which to hear sounds. The listener is the ears of the world, and as such, there's only one listener. Listener has a position and orientation. The position indicates where the listener currently is. The closer a listener is to a sound source's position, the louder the sound will get. The orientation is where the listener is facing. For example, if a listener is facing west and a sound is coming from the north, the sound will appear to come from the right. However if the user orientation changes and turns to face the north, the sound will now appear to come from straight ahead. Listener in Vanda Engine 1 is automatically attached to the current active camera and inherits its position and direction.
 
Attenuation by Distance
Attenuation is essentially the ability of a sound to lower in volume as the listener moves away from it. The effective attenuation of a source depends on many factors, among which distance attenuation and source and listener gain are only some of the contributing factors.
Vanda Engine 1 uses Inverse Distance Rolloff Model to attenuation the source gain by its distance from the listener position. The following formula describes the distance attenuation defined by the Inverse Distance Attenuation Model:
 
source gain = Reference Distance / (Reference Distance + Rolloff Factor * (distance – Reference Distance));
 
Attenuation Inverse Distance Rolloff Model
 
Static Sound Editor
To access static sound editor, choose Create | Static Sound... from the main menu. Alternatively, you can click the button.
 
Name
Lets you choose a unique name for static sound.
 
Select Button
Lets you select the Vorbis file. Vorbis files (.ogg extension) compress to a smaller size than MP3 files, which reduces bandwidth and storage requirements.
 
stereo sounds aren't localized in Vanda Engine 1. If you use stereo data for your static sound, Vanda Engine 1 does not know about which channel to use in how much when panning the listener. Since Vanda Engine 1 is not sure what you want, it does nothing and doesn't even fade with distance. With mono, however, it does the calculations based on the attenuation formula, since it only has one channel to deal with.
Vanda Engine 1 works fine with 44100Hz Vorbis files.
 
Volume
Volume of static sound is specified by Attenuation by Distance and is irrelevant for static sound.
 
Pitch
Lets you change the pitch of static sound. Accepted values are (0.0f, any]. Default value is 1.0.
 
RollOff
Lets you specify the Roll Off factor.
 
Play
Lets you specify if Vanda Engine 1 should play the static sound data after loading it.
 
Loop
Lets you specify if Vanda Engine 1 should continually repeat the static sound data.
 
Reference Distance
Lets you specify the Reference Distance factor.
 
Maximum Distance
It's not used by current attenuation model and is reserved for future versions of Vanda Engine 1.
Made with help of Dr.Explain