DLL: adding a sound to an object |
Here is another Dll which can help developers to liven their sceneries up.
In fact, it allows to add a sound in .WAV format to any 3D object described
in a file "\D...\Sceneryx. Sxx". Laurent said: "Why not, birds' chirping in
a tree ?" Of course !
The ultimate is that the volume of the sound is function of the object distance
(this distance is configurable). The sound is iterative (thus endless !),
but all you have to do is to move away enough from it in order it stops.
This time, it is difficult for me to show you a picture. So, I am going to make you
listen a sound:
son.wav
I think that you easily recognized it, as you are familiar with Morse.
As he usually does, Laurent prepared for us one "package" with all necessary
indications in order to add a sound to a scenery. So, I am going to try to summarize:
- there is Dll to be installed in the directory \Modules\pc, as usual,
- you have to create your .WAV sounds, and to place them into the directory \Sound,
- then, you have to put at the end of the scenery (just after the last ===End Object ===)
a small sequence for calling the Dll and definition of the sounds which will be proposed
to it: example with 3 sounds used in the scenery.
<wobj> ---- world object type ----
@snd
<bgno> ========== BEGIN OBJECT ==========
<dist>
0.5
<num_>
3
<arry>
001=son1.wav
002=son2.wav
003=son3.wav
<endo> ========== END OBJECT ==========
Please note that:
_ the value "0.5" for the parameter <dist> is the distance from which the sound is perceptible,
_ the value "3" for the parameter <num> is the number of .WAW files used in the scenery,
_ the sounds are listed in the parameter <arry> after a number beginning with "001", on the basis
of one sound for one object. If several objects have the same sound, it is necessary to have as many
lines as objects.
Now, you have just to to add a small bit of sequence to every sound object:
<bgno> ========== BEGIN OBJECT ==========
.../...
<name> ---- object name (descriptive) ----
002=son1.wav
.../...
<endo> ========== END OBJECT ==========
Attention: the parameter <name> is mandatory
So you can add a sound to your sceneries by downloading the following file (including an example).
| Téléchargement - Downloading |
|
Rotw-object-sound_v10.zip (226 Kb) |
![]()
Adding a sound: distress beacon |
Naturally the first case of use we thought about is the distress beacon of a crashed airplane. Fred had already done an adventure for the research of an Air Dolomiti's ATR crashed in the French Alps, so I only had to add a sound to the scenery.
The beacon sending out Morse signal, it was necessary for me to find a text/Morse converter making .WAV files: the "MorseGen" software makes that very well. I still had to install everything and launch the research.
If you want to try, you will find the scenerey in the zip file below. Attention, even with a beacon, it is not easy.
| Téléchargement - Downloading |
|
sauvetage-sos.zip (937 Kb) |