• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Speedbrakes gauge and sound ?

Messages
97
Country
italy
Good morning friends !
Can I ask you experts an opinion on the following thing? I own the Overland A330 and when the speedbrakes are extended the gauge creates a beautiful sound effect that becomes louder as the speedbrakes is more extended and decreases when it is retracted. In your opinion is possible to replicate this effect on other aircraft or it is strongly coded inside the gauge ? I looked at the sound folder of the aircraft, at the suond.cfg and at the aircraft.cfg but I can not find any reference to the speedbrakes ... Any suggestions? It’s maybe possible to create a simple sound gauge which react to the speedbrakes positions and do that sound effect ? Thanks in advance and have a nice day.
 

rcbarend

Resource contributor
Messages
435
Country
netherlands
I don't have this A330, so you have to explain what this sound effect is supposed to simulate: is it the sound of the speedbrakes (FS Spoiler function, I assume ? ) extending (the motor sound, like with Flaps) or additional wind sound caused by the extended speedbrakes ?

But whatever sound this is:
I don't think this is done via the sound.cfg, since (as far as I know) this has no handles for Spoiler (like for landinggear, flaps, etc).
Using Doug Dawson's XMLsound gauge, it would be very easy to make a small XML gauge that plays such a sound and controls it's volume based on actual spoiler extention.

Rob
 
Messages
10,088
Country
us-arizona
You would need to throttle the sound cresendo up and down via speed or amount of up/down on the spoiler or both. That part is easy, but how to throttle the sound is the interesting part. I want to do this with landing gear wind noise. Faster the plane, louder the noise. And also a throttle up /down part when the gear is raised or lowered at speed, so its not instant-on.
 
Messages
10,088
Country
us-arizona
I did this with a basic set of three speed zones and three sounds. It runs on 3 elements, where if you are going such and such speed zone (like 90 knots to 120 knots), then sound A starts. Then 2 more after that with higher speed zones and louder sound. Its hideous though because it doesnt move the sound up and down, it goes from one to the other instantly. HIDEOUS....
 
Messages
97
Country
italy
Thank you Rob and Lionheart. Yes, it's the FS Spoiler function but only the wind sound caused by the extended speedbrakes (basically more spoiler drag ->higher wind/drag effect volume ...). I haven't any idea of how i can link the sound volume to the exstension angle of the spoiler...
 

rcbarend

Resource contributor
Messages
435
Country
netherlands
Here you go ....

- In your main /Gauges/ folder, create a subfolder /SpoilerSound/

- From Dougs website ( https://www.douglassdawson.ca/ ), download file dsd_fsx_xml_sound.zip
Extract the file dsd_fsx_xml_sound.gau and copy it in the /Gauges/SpoilerSound/ folder (this gauge work for FS2004 too)

- With Notepad, copy/past the code below into a file and save this as file SpoilerSoundControl.xml in the /Gauges/SpoilerSound/ folder.
Code:
<Gauge Name="SpoilerSoundControl" Version="V1.0">

<Comment>
Controls the volume of a windsound based on spoiler extention.
</Comment>

<Update Frequency="6"/>

<Element>
  <Select>
    <Value>
      (A:SPOILERS LEFT POSITION,percent) 0.1 &lt;
      if{ 0 (&gt;L:SpoilerSound,enum) }
      els{
        2 (&gt;L:SpoilerSound,enum)
        (A:SPOILERS LEFT POSITION,percent) 40 * 4000 - (&gt;L:SpoilerSoundVolume,number)
      }
    </Value>
  </Select>
</Element>

</Gauge>

- With Notepad, copy/paste the lines below into a file and save this as file dsd_fsx_xml_sound.ini in the /Gauges/SpoilerSound/ folder.
Code:
[Config]
MaxSounds=5

[Sounds]
Sound00=WindSound.wav

[LVars]
Lvar00=SpoilerSound

[Volume_Variables]
Lvar00=SpoilerSoundVolume

- Copy your windsound file to the the /Gauges/SpoilerSound/ folder, and rename it to WindSound.wav

- In the panel.cfg of an aircraft, add the following lines to the VCockpit01 section:
Code:
gauge**=SpoilerSound/dsd_fsx_xml_sound!Sound, 0,0
gauge**=SpoilerSound!SpoilerSoundControl, 0,0
with "**" being the next free gauge numbers.

How it works:
dsd_fsx_xml_sound.gau will read the (default) file dsd_fsx_xml_sound.ini in the same folder.
When the spoiler is being extended, the xml gauge starts playing the windsound repetitively; the volume is set to 0 (max volume, fully extended spoiler) to -4000 (almost inaudible, retracted spoiler); and lineairly in between.

Not tested, but should work.
If it doesn't, please first re-read the above and check for typo's.

Cheers, Rob
 
Messages
97
Country
italy
Thank you Rob for your wonderful and detailed tutorial. This week i'm away from home due to work reasons but on the next week-end i'll try for shure your tutorial. Thank you again....

Eric: yes, i'm still a proud user (and scenery developer) of FS2004 :)
 

rcbarend

Resource contributor
Messages
435
Country
netherlands
Thank you Rob for your wonderful and detailed tutorial. This week i'm away from home due to work reasons but on the next week-end i'll try for shure your tutorial. Thank you again....
You're welcome ...
Let me know if it works as advertised ...
 

gfxpilot

Resource contributor
Messages
370
Country
unitedkingdom
Idea for for the gear retraction , extract. 2 sound files, waves.

Sound one, gear down will commence loud to fade to quiet. Normally a clunk and mechanical winding This gives the effect of the gear going down. The second sound starts with the winding gear then clunk as the wheels hit home retracted. Use the sound package to start the sound quiet and fade up to require full volume. The sounds can be mixed with a vast array of sounds to make the sound effect as complex as you like.
 
Messages
10,088
Country
us-arizona
Idea for for the gear retraction , extract. 2 sound files, waves.

Sound one, gear down will commence loud to fade to quiet. Normally a clunk and mechanical winding This gives the effect of the gear going down. The second sound starts with the winding gear then clunk as the wheels hit home retracted. Use the sound package to start the sound quiet and fade up to require full volume. The sounds can be mixed with a vast array of sounds to make the sound effect as complex as you like.


Love that.

What I sought to do though was variable wind noise related to the gear down. If you watch YouTube airliner cockpit videos and also general aviation, when they drop the gear, you hear the loud wind noise start. As you are decelerating, the roar from the wind on the landing gear reduces. So I opted for 3 sound files of loudness' of wind noise for the gear. I linked that to logic; airspeed zones; 3 different ones, and when you pass through a speed zone to another, the file changed.

If.... you could create a set of variables and have one file do 10 different levels of volume, then I think you would have something smooth sounding and I dont think your ears could hear the many transitions.

would sound a heck of a lot better too, lol...
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Oh Bill! Why on earth don't you just use the bloody VOLUME control provided in your custom sound module? :scratchch

The sample xml file below is using a virtual "knob" to adjust the volume for the XMLSND5.wav file. The same technique could easily be used in an <Update> routine to automatically increase/decrease volume based on something such as airspeed. This means you only need ONE sound file instead of multiple copies with different volume levels! :teacher:

Every XMLSNDnn.wav file may be individually controlled either before or during playback. -10000 is full mute, 0 is full volume..
Every XMLSNDnn.wav file may be individually sent to either the left or right channel either before or during playback. -10000 is left channel, 10000 is right channel.

VOLUME
Code:
    <Area Left="362" Top="70" Height="70" Width="70">
      <Cursor Type="Hand"/>
      <Tooltip>Volume</Tooltip>
      <Click Kind="LeftSingle+RightSingle+WheelUp+WheelDown+DownRepeat">
      <!-- DECREASE VOLUME -->
        (M:Event) 'LeftSingle' scmp 0 ==
        (M:Event) 'WheelDown' scmp 0 == or
        if{ (L:VolKnob, enum) -- 0 max (>L:VolKnob, enum) (L:XMLSND5_VOL, enum) -4000 &gt; if{  (L:XMLSND5_VOL,enum) 40 - (>L:XMLSND5_VOL,enum) } }

       <!-- INCREASE VOLUME -->
        (M:Event) 'RightSingle' scmp 0 ==
        (M:Event) 'WheelUp' scmp 0 == or
        if{ (L:VolKnob, enum) ++  100 min (>L:VolKnob, enum) (L:XMLSND5_VOL, enum) 0 &lt; if{ (L:XMLSND5_VOL,enum) 40 + (>L:XMLSND5_VOL,enum) } }
      </Click>
    </Area>

PANNING
Code:
        <Area Left="474" Top="70" Height="70" Width="70">
      <Cursor Type="Hand"/>
      <Tooltip>Pan</Tooltip>
      <Click Kind="LeftSingle+RightSingle+WheelUp+WheelDown+DownRepeat">

       <!-- PAN LEFT -->
        (M:Event) 'LeftSingle' scmp 0 ==
        (M:Event) 'WheelDown' scmp 0 == or
        if{ (L:PanKnob, enum) -- 0 max (>L:PanKnob, enum) (L:XMLSND5_PAN, enum) -10000 &gt; if{  (L:XMLSND5_PAN,enum) 200 - (>L:XMLSND5_PAN,enum) } }

       <!-- PAN RIGHT -->
        (M:Event) 'RightSingle' scmp 0 ==
        (M:Event) 'WheelUp' scmp 0 == or
        if{ (L:PanKnob, enum) ++  100 min (>L:PanKnob, enum) (L:XMLSND5_PAN, enum) 10000 &lt; if{ (L:XMLSND5_PAN,enum) 200 + (>L:XMLSND5_PAN,enum) } }
      </Click>
    </Area>
 
Last edited:
Messages
10,088
Country
us-arizona
I note that you have _Pan and _VOL on the SNDXMLxx's. I am going to assume that your system automatically knows what these mean, I do not need to add anything into the INI file?

Can I simply add this to a 'On Event' to get this functioning? (Only volume, not pan). (gear drops, if... play this sound and actuate its volume in the process... )

Would this be basically how to rig it into landing gear to bring the volume up and down?
Code:
    <On Event="GEAR_UP">
if{ (L:PanKnob, enum) -- 0 max (>L:PanKnob, enum) (L:XMLSND5_PAN, enum) -10000 &gt; if{  (L:XMLSND5_PAN,enum) 200 - (>L:XMLSND5_PAN,enum) } }
    </On>

    <On Event="GEAR_DOWN">
if{ (L:PanKnob, enum) -- 10000 max (>L:PanKnob, enum) (L:XMLSND5_PAN, enum) -0 &lt; if{  (L:XMLSND5_PAN,enum) 0 + (>L:XMLSND5_PAN,enum) } }
    </On>

Or would I need another set and one set turns the sound on and off, then another set works the volume? (My apologies. I still have issues understanding timers and counters).
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I note that you have _Pan and _VOL on the SNDXMLxx's. I am going to assume that your system automatically knows what these mean, I do not need to add anything into the INI file?
<snipped for brevity>

Or would I need another set and one set turns the sound on and off, then another set works the volume? (My apologies. I still have issues understanding timers and counters).
There is no real need for any INI file with my sound module.

The _PAN and _VOL functions are embedded in the sound module. They are there to use if and how you want them. I didn't quote your script example in this reply but I would point out that you specified _PAN and not _VOL. Why would you want to slew the sound from the left to the right speakers?

Also, (L:XMLSND5_PAN,enum) 0 + (>L:XMLSND5_PAN,enum) isn't going to do anything! I think you meant to type (L:XMLSND5_PAN,enum) 200 + (>L:XMLSND5_PAN,enum)

Even though _VOL has a range of -10000 to 0, I believe you will discover that -4000 is about as low as you need to go to fully mute the sound.

If you are wanting to control the volume of a sound file, you should first set the starting volume, start the sound, write the script to control the volume, and end with the stop playing command (if required for a looped sound file).

For controlling gear up/down, you would probably want to use the gear,degrees token variable instead of a manual knob such as (L:panKnob, enum)... :wave:
 
Messages
19
Country
spain
Hi all I have a problem with this dsd xml:

Code:
<Gauge Name="Flaps Announcements" Version="1.0">
    <Element>
        <Select>
            <Value>
          
            (A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
            if{ (L:A320_Callout_spoiler,number) 0 ==
              if{ 1 (>L:A320_Callout_spoiler,number)
              }
            }
            els{ 0 (>L:A320_Callout_spoiler,number) }
          
            </Value>
        </Select>
    </Element>
</Gauge>


The sound plays continuosly when the spoiler deploys. I want thant only play once time not continuos when the handle position deploys spoiler. Would you help me?

Thanks.
 
Top