November 20, 201411 yr Hi all, I use the Doug Dawson's "dsd_fsx_xml_sound" gauge regularly but I never succeeded to have a progressive sound while using the variable "dsd_xml_sound_volume_in". To avoid the problem (I don't have a big experience in xml programming), I use 4 wav files whose volume varies with some db. This gauge work perfectly but requires 4 wav files. <Element> <Select> <Value> (A:SIM ON GROUND,bool) not 9 11 (A:INCIDENCE ALPHA,degrees) rng and if{ 2 (>L:buff1,number) } els{ 0 (>L:buff1,number) } </Value> </Select> </Element> <Element> <Select> <Value> (A:SIM ON GROUND,bool) not 11 13 (A:INCIDENCE ALPHA,degrees) rng and if{ 2 (>L:buff2,number) } els{ 0 (>L:buff2,number) } </Value> </Select> </Element> <Element> <Select> <Value> (A:SIM ON GROUND,bool) not 13 15 (A:INCIDENCE ALPHA,degrees) rng and if{ 2 (>L:buff3,number) } els{ 0 (>L:buff3,number) } </Value> </Select> </Element> <Element> <Select> <Value> (A:SIM ON GROUND,bool) not (A:INCIDENCE ALPHA,degrees) 15 > and if{ 2 (>L:buff4,number) } els{ 0 (>L:buff4,number) } </Value> </Select> </Element> Is it possible to replace these four wav files by only one and to use the variable "dsd_xml_sound_volume_in" to get the same result ? if INCIDENCE ALPHA < 9 = volume min if INCIDENCE ALPHA > 15 = volume max with a progressive sound between these two values I hope that my English is not too bad ! Thank you for your help.Jean MichelRestauravia Team http://www.restauravia.fr
November 27, 201411 yr Hi Jean, Yes, perfectly possible what you want, but you need the latest version of Doug's soundgauge (V5.2.0, dated Aug. 26th 2014) from his website. With this version you can change the volume of each soundfile individually, in a much simpler way then with the ***_volume_in Lvar. See the documentation in the zip file. In the gauge: <Element> <Select> <Value> (A:SIM ON GROUND,bool) ! if{ 2 (>L:buff1,number) } els{ 0 (>L:buff1,number) } (A:INCIDENCE ALPHA,degrees) 9 - 15 9 - / 0 max 1 min 3000 * 3000 - (>L:buff1_volume,number) </Value> </Select> </Element> and in the .ini file: [Sounds] Sound00= "YourSoundfile" [LVars] Lvar00=buff1 [Volume_Variables] Lvar00=buff1_volume So the sound is only On when aircraft is in the air, - with min. vol (-3000, almost inaudible) when INCIDENCE ALPHA < 9 - with max. vol (0) when INCIDENCE ALPHA > 15 - and volume lineairly between min and max when INCIDENCE ALPHA between 9 and 15. Another substantial improvement of Doug's great gauge, since you don't need to hassle with the common volume_in Lvar (controlled by the soundcontrol-Lvar) anymore. Which makes volume/pan control a lot easier to code. You can even add a test to have the sound audible only in a certain View mode, using Lvar (L:ViewSystemStatus,number). Rob
December 1, 201411 yr Author Hi Rob, thank you for your answer. I am going to download the last version and go to test this code immediately. Thank you again ! Jean MichelRestauravia Team http://www.restauravia.fr
December 1, 201411 yr Author hello Rob, I tested the code. It work perfectly ! :Applause: :Applause: :Applause: thank you for your help ! regards from Normandy, Jean Michel Restauravia Team http://www.restauravia.fr
December 1, 201411 yr Hi Jean, You're welcome :smile: Glad to hear it worked for you. As you can see, Doug made life so much easier with this new version .... Cheers, Rob
December 4, 201411 yr Author Hello Rob, yes, it is much simpler with this new version. Can I use the code freely for the future projects of the team ? I would mention your name in the "readme" file. Jean Michel Restauravia Team http://www.restauravia.fr
December 5, 201411 yr No problem at all. You can use/modify it as you like; it's just an example ...... Rob
December 12, 201411 yr Author Hello, In the latest version of Doug's soundgauge (5.2.0), I did not understand the use of the variable " Frequency ". [Frequency_Variables] Lvar00=First_Frq_Var Lvar01=Second_Frq_Var In what case can we use it ? Jean Michel Restauravia Team http://www.restauravia.fr
December 12, 201411 yr I assume it has to do with the schedule frequency of the gauge (i.e. times per sec. to check start/stop etc. sounds). Default: 18 times per sec. So unless you're using 500-1000 sounds, I wouldn't worry about perfomance .... Rob
December 14, 201411 yr Actually, it has nothing to do with scheduling, but the Frequency_Variables Lvar for that sound is passed to DirectX. Just checked that with Doug. What is does:it changes both pitch and playing speed of the sound. With the Lvar=0, pitch and speed are unaffected. With Lvar positive, the Lvar influences speed and pitch around the sound’s sample frequency. Example: If the sound’s sample frequency is 11025 Hz: (== bitrate 88 kbps for a mono sound) - Lvar=11025 plays the sound at normal speed and pitch. - Lvar=5512.5 halves the play speed and pitch. - Lvar=22050 doubles the play speed and pitch. Very nifty feature; I allready have an application for it ..... Rob
December 14, 201411 yr Actually, it has nothing to do with scheduling, but the Frequency_Variables Lvar for that sound is passed to DirectX. Just checked that with Doug. What is does:it changes both pitch and playing speed of the sound. With the Lvar=0, pitch and speed are unaffected. With Lvar positive, the Lvar influences speed and pitch around the sound’s sample frequency. Example: If the sound’s sample frequency is 11025 Hz: (== bitrate 88 kbps for a mono sound) - Lvar=11025 plays the sound at normal speed and pitch. - Lvar=5512.5 halves the play speed and pitch. - Lvar=22050 doubles the play speed and pitch. Very nifty feature; I allready have an application for it ..... Rob Thankyou for the explanation Rob. I will have to look into this. My FS Videos
December 14, 201411 yr Author hello Rob this fonction is very interesting ! Does it mean that we can modulate the pitch of à sound progressively in proportion to, for example, the speed of the plane ? Jean Michel Restauration team http://www.restauravia.fr
December 15, 201411 yr hello Rob this fonction is very interesting ! Does it mean that we can modulate the pitch of à sound progressively in proportion to, for example, the speed of the plane ? Jean Michel Restauration team http://www.restauravia.fr Hi Jean, Yes, for whatever criterium you want. So airspeed is one of them. Note though, that the Frequency_Variables Lvar changes both pitch of the sound AND the speed at which it is played. See my post above. So for a simple .wav sound (like a pure Sinwave) that is played repetitively, "speed" doesn't matter. However, the sound is also compressed/extented in time which can lead to very funny (and maybe: undesirable) results for more complex sounds. By the way: my explanation on sound pitch/speed change is just based on what I observe when I "play" with this Lvar ..... Rob
December 16, 201411 yr Author Hi Rob, I'm gonna go see if i can find a code which corresponds to the action that I look for: a second variable which would increase the pitch of the wind sound proportionally with the speed of the plane with a progressive sound when the cockpit is opened. It would be necessary to use [sounds] Sound00=wind.wav [LVars] Lvar00=wind [Volume_Variables] Lvar00=wind_volume [Frequency_Variables] Lvar00=wind_pitch for the same sound file. But i don't now if is it possible. with your help Rob, I write this code for the progressive wind volume. <Element> <Select> <Value> (A:General eng rpm:1,RPM) 10 > (L:ViewSystemStatus,number) 2 == and (A:EXIT OPEN:0,percent) 2 > and if{ 2 (>L:wind,number) } els{ 0 (>L:wind,number) } (A:EXIT OPEN:0,percent) 2 - 100 2 - / 0 max 1 min 2000 * 2000 - (>L:wind_volume,number) </Value> </Select> </Element> This gauge offers so much possibility as I would like to exploit it at the most. Doug's sound gauge increases the realism of fsx and I could not make any more without. Thank Mr Dawson ! ... and thank you for your help ! Jean MichelRestauravia team http://www.restauravia.fr
Create an account or sign in to comment