WHAT IS
3D RAD?
CLICK HERE
TO FIND OUT!


SoundSource


A customizable 3d-sound object for your projects.

This is basically a sound emitter you can attach to moving objects (for example, a speeding rocket) or place somewhere in your 3d environment to implement localized ambient audio effects (for example a waterfall, cheering crowd at the finish line etc).

The sound source location can be edited in the Virtual Editor.

If you link, in the Object List (left of main 3D Rad screen), the SoundSource object to a dynamic object, then the relative location of the sound source you set in the Virtual Editor is preserved when the dynamic object moves or rotates run-time.

This allows you, for example, to attach the engine sound to the rear of a spaceship and the laser sound to the front.

Optionally, run-time, the frequency can be adjusted dynamically from sound source object's speed, to implement effects like car engine sound variations on gear shifting and similar effects.

Please see this tutorial for an example of usage.




Parameters

Sound Frequency. The frequency of a sound (Hz) is basically the speed at which it is played.

You will have to adjust this value to play each of your own sound files at a proper frequency. Note that the maximum frequency playable depends on the installed sound card specifications. Frequencies above 100000 (100 kHz), may not be supported on some systems.

Sound Volume. This value is the distance, in meters, beyond which the sound volume starts decreasing.

For example, if the value is 5, when the listener (the main camera object) is at 5 meters or closer to the sound source, the sound effect volume will be maximum. The volume gets progressively lower while the camera moves away from the source, beyond 5 meters.

Looping. If this option is checked, the sound effect is played again and again, indefinitely.

Playing at start. Whether to start playing the sound when the project is run. If this option is unchecked, you will need to start this object in order to hear the sound, for example by using the EventOnInput object.

Effect

Bind frequency to speed. If this option is checked, the sound frequency is adjusted dynamically depending on the current sound source object's speed.

Speed ranges & Frequency ranges. If the current speed is within one of the ranges specified, then the frequency is adjusted proportionally, within the specified frequency range. For example, if the second speed range is 10-20 and its frequency range is 17000-25000 when the sound object speed is 15 (halfway the speed range), the actual sound frequency will be 29500 (halfway the frequency range).

Frequency ranges are in Hz. Speed ranges are in meters per second. One meter per second is 3.6 kilometers-per-hour and 2.2374 miles-per-hour.

For information about the remaining controls, please click here.


USING YOUR OWN SOUND EFFECTS

Save your sound files to the

C:\3D Rad\3DRad_res\objects\SoundSource\Data\

folder.

To assign a sound file to the SoundSource object, open the property dialog for the object, click the Change Sound File button and double click the desired file.

Supported sound file formats are: .wav, .ogg.

IMPORTANT! The sample format must be mono (non-stereo). Any 3d effect for the sound is automatically created and managed run-time by 3D Rad.


INTERNAL PARAMETERS


The following internal parameters can be accessed by using event objects like EventOnValue or Script:

  • Sound frequency
  • Sound volume
  • Current frequency range, read-only. This value is only valid if Bind frequency to speed is used