Andy Ross wrote:
Erik Hofman wrote:
I'v uploaded a new wind.wav file
at:http://www.a1.nl/~ehofman/fgfs/download/
Before you can use it you have to aplly a small patch.
+ _crank-set_pitch(1.9);
[...]
+ float airspeed_kt = cur_fdm_state-get_V_equiv_kts();
if (rel_wind 60.0) {// a little off 30kt
-float volume = rel_wind/1200.0;// FIXME!!!
+float volume = rel_wind/300.0;// FIXME!!!
+double pitch = 1.9*(airspeed_kt/67.0);
_wind-set_volume(volume);
+_wind-set_pitch(pitch);
These patches simply look like you're changing unit conventions. The
default pitch of the sample is different, and the volume is scaled
differently. Why not just fix that in the sample instead? Even
Can't be done. The audio energy of the default sound is much higher than
the one i have suplied (and remember this is a logarthmic scale ...)
better would be coming up with a standard for sound samples, so that
they can all work identically with pitch shifting. Or better still
would be a soft-coded XML description that tells the engine when and
how to play each sound. But replacing one set of magic numbers (1 and
300) with another (1.9 and 1200) is probably not the right way to go.
I know. There is even another problem. The wind sound is caused by the
aircrafts haul. Imagine the differences between the X-15 and the Cessna
172. This requires formula translation from XML code ...
Also, I suspect that you want the rel_wind parameter, and not V_equiv.
As far as I knw the pitch is relative to the aircrafts air-speed (and
maybe the wind speed, but since it would normally be far less than the
aircrafts speeds this can be neglegtet IMHO).
The rel_wind is direction-independant, while V is the forward airspeed
only (it's for display on the airspeed gauge, etc...). Think of a
gusting crosswind while sitting on the runway during a storm.
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel