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.

The remaining controls on the dialog are common to all objects.
They are explained here.



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



  • CUSTOMIZING THE SOUND

    For each different sound effect you want played in the virtual environment, you must install a clone of the SoundSource object:
  • press [Ctrl]+[I]
  • double click the SoundSource icon
  • specify a name for the new object and click SAVE


  • This creates a new folder with a name of your choice in the

    C:\Program Files\3D Rad\3DRad_res\objects\

    folder, allowing you to modify the data without affecting the original object and any project using it.

    The new folder contains the elements of a default SoundSource object.

    To modify the default sound effect, you must replace, in the

    .\3DRad_res\objects\SoundSource\data\

    folder(*), the file called

    sound.ogg

    with your own sound file in either .ogg or .wav format.

    The file name must be either sound.ogg or sound.wav.

    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.

    (*) Note that the actual path will have the unique name you used for the installation, in place of the SoundSource part.