• 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.

FSX Add sound to default switches

Messages
71
Country
switzerland
Hi,

I've developped a lot of sceneries (Switzerland 2004 above all), but I'm newby in gauge. I searched, made some test without success I finally I suscribed to this forum (where I often found a lot of help). So I hoppe someone can help me.

I would like to add sound to default switches (Battery, magnetos, gen, avionics, lights) when those are not include into a specific LVar. Is this possible with dsd_xml_sound gauge ?

Well, I can imagine it's not possible, otherwise someone else would have done it for a while.

I added this in the excellent FDSD_t-6 texan :

[Config]
MaxSounds=17

[Sounds]
Sound00=.\Sound\click.wav
Sound01=.\Sound\click.wav
Sound02=.\Sound\click.wav

[LVars]
Lvar00=MagKnob
Lvar01=TOGGLE_NAV_LIGHTS
Lvar02=TOGGLE_BATTERY

I could ear a click sound when clicking on magnero button (but the button did not move ???), but eared nothing for the other 2.
What did I wrong ?

Thanks for your help.

Greetings

Daniel
 
Messages
495
Country
austria
Code:
Lvar01=TOGGLE_NAV_LIGHTS
Lvar02=TOGGLE_BATTERY

You are using events!

I didn't find TOGGLE_BATTERY!

For the code below you must make a XLM-File and add to the panel.cfg
or to add this code into the files with the switch code.

Code:
<Keys>
  <On Event="TOGGLE_MASTER_BATTERY">
      1 (&gt;L:DSD_Master-Battery_SD,number)
  </On>

  <On Event="TOGGLE_NAV_LIGHTS">
      1 (&gt;L:DSD_Nav_Lights_SD,number)
  </On>
</Keys>

Code:
[LVars]
Lvar01=DSD_Master-Battery_SD
Lvar02=DSD_Nav_Lights_SD

For the Mangneto switch, this is a problem with your plane, not with DSD_Sound!

btw, one sound would it do also!
Lvar00==DSD_Switch_SD

Of course,another possibility would be to open the XML-files and to add the sound variabels direct to the switch code.

Edi
 
Last edited:
Messages
71
Country
switzerland
Thanks for the answer. If I understand correctly (as I cannot modify directly the gauge code), I must create a xml gauge, i.e sound.xml that contain such code :

<Keys>
<On Event="TOGGLE_MASTER_BATTERY">
1 (&gt; L:DSD_Master-Battery_SD,number)
</On>

<On Event="TOGGLE_NAV_LIGHTS">
1 (&gt; L:DSD_Nav_Lights_SD,number)
</On>
</Keys>

Put it in a folder (ie SwitchSnd) and put all this into the panel folder of the plane I want to code (ie the default C172)

then I add in panel.cfg / VCockpit lines :
gaugexxx=SwitchSnd!Sound 0,0,0,0
gaugexxx=dsd_fsx_xml_sound!Sound, 2,2,2,2, \C172_sound.ini

And then in C172_sound.ini :
Put this

[LVars]
Lvar01=DSD_Master-Battery_SD
Lvar02=DSD_Nav_Lights_SD
[/CODE]

sorry, do not understand this :
btw, one sound would it do also!
Lvar00==DSD_Switch_SD

Arf, it seams to be simple, but not so simple in fact. That's may be the reason why nobody has done it till yet. It would be nice to have a little "click" sound for each switch (default airplane o free ones that do not have one single sound).

Good day

Daniel
 
Messages
495
Country
austria
Yes, you are right. This should work.

But there is very good description delivered with the sound-gau.

Here you can find the actuel version of the sound.gau! If you don't use it...

http://www.douglassdawson.ca/


Here you have different sound for different switches.

Code:
<Keys>
  <On Event="TOGGLE_MASTER_BATTERY">
      1 (&gt;L:DSD_Master-Battery_SD,number)
  </On>

  <On Event="TOGGLE_NAV_LIGHTS">
      1 (&gt;L:DSD_Nav_Lights_SD,number)
  </On>
</Keys>


[LVars]
Lvar01=DSD_Master-Battery_SD
Lvar02=DSD_Nav_Lights_SD


Here you have the same sound - only one- for different switches.
Code:
<Keys>
  <On Event="TOGGLE_MASTER_BATTERY">
      1 (&gt;L:DSD_Switch_SD,number)
  </On>

  <On Event="TOGGLE_NAV_LIGHTS">
      1 (&gt;L:DSD_Switch_SD,number)
  </On>
</Keys>


[LVars]
Lvar01=DSD_Switch_SD

Edi
 
Last edited:
Messages
71
Country
switzerland
Arf, doesn't work. I put of course dsd_fsx_xml_sound.gau into my gauge folder. And made the other files (see attachment), but without success. Snif... Very sad.

No click sound at all. I read carefully the readmes, but may be I missed something cause I'm not an English-spoken... Maybe
 

Attachments

  • DSD_C172_sound.zip
    6.6 KB · Views: 429
Last edited:
Messages
495
Country
austria
I'm using FS9, so you have to adapt the pathes to FSX!
So i used the default B737-400 for the config.

Copy DSD_FSX_XML_Sound.gau to the gauge directory.
btw. Doug updated his "DSD_FSX_XML_Sound.gau" yesterday.

Create below the "GAUGE"-directory the directory "CockpitSounds"

Copy the attached files into the "CockpitSounds" -directory.

Rename "CockpitSounds.ini.inf" into "CockpitSounds.ini"
Rename "GPWS_RA_1000.wav.inf" into "GPWS_RA_1000.wav"

Add the following lines to the panel.cfg
Adapt to gaugenumbers 50 .. 52 to your panel.cfg

Code:
gauge50=DSD_FSX_XML_Sound!Sound,                         0,  0,   0,  0,    .\Gauges\CockpitSounds\CockpitSounds.ini
gauge51=DSD_FSX_XML_Sound!Debugger,                      0,  0, 550,  50,
gauge52=CockpitSounds!Cockpit_Test_SND,                  0,  0,   1,  0

That's the first part.

If eyerything is alright, you will listen to onethousand.. onethousand .. onethousand .....

Edi
 

Attachments

  • Cockpit_Test_SND.xml
    245 bytes · Views: 652
  • CockpitSounds.ini.inf
    252 bytes · Views: 553
  • GPWS_RA_1000.wav.inf
    9.8 KB · Views: 549
Messages
495
Country
austria
Sorry, wrong ini!

Now the proper one!!

Rename "CockpitSounds.ini.inf" into "CockpitSounds.ini"
 

Attachments

  • CockpitSounds.ini.inf
    168 bytes · Views: 653
Messages
495
Country
austria
BE AWARE!!

"DSD_FSX_XML_Sound.gau" may be defined only one times in the panel.cfg.

Use [window00] or [VCockpit01].
 
Messages
71
Country
switzerland
Hi,

Sorry for late answer. Was in Paris (holidays)...

Test your config in FSX... works perfectly. "One thousand..." No problem.

NExt ?

btw : thanks for you patience and help

Daniel
 
Messages
495
Country
austria
So replace the above lines with this lines in the panel.cfg
Adapt to gaugenumbers 25 .. 26 to your panel.cfg

Code:
gauge25=DSD_FSX_XML_Sound!Sound,                         0,  0,   0,  0,    .\Gauges\CockpitSounds\CockpitSounds.ini
gauge26=CockpitSounds!KeyEvent_SND,                     0,  0,   1,  0

Delete the files in the "CockpitSounds" -directory.
Copy the attached files into the "CockpitSounds" -directory.

Rename "CockpitSounds.ini.inf" into "CockpitSounds.ini"
Rename "Metal_Switch.wav.inf" into "Metal_Switch.wav"
Rename "TECH_Paddle.wav.inf" into "TECH_Paddle.wav"

This renaming is because i can't upload wav and ini-files.

Open the "KeyEvent_SND.xml" with a texteditor.
So you can see how it works and which key events are defined.

With the next post i will attach a file with all key events.

Edi
 

Attachments

  • KeyEvent_SND.xml
    789 bytes · Views: 645
  • Metal_Switch.wav.inf
    5.9 KB · Views: 617
  • TECH_Paddle.wav.inf
    1.4 KB · Views: 560
  • CockpitSounds.ini.inf
    249 bytes · Views: 567
Messages
71
Country
switzerland
YESSSSSS!

It works perfectly with the FS Event... If I dare one more question :

How can I use a specific airplane variable ?

My purpose is to add click sound on the great free T-6 Texan. With your great help, I could add sound for all switches that use FS Event thank your list.
But some switches are specific, like magneto. I know how to extract the variable info with FSUIPC, so I know that T-6 uses a variable called "MagKnob" for the magneto switch.
I try this in KeyEvents_SND.xml : "On Event="MagKnob"... no success
But if I add "LVar...=Magknob" directly into Cockpitsound.ini I can hear the sound, but of course the switch doesn't work properly.
It would be the same with L:Knob_prim for primer...

Any how, thanks for you kind and great help.

Daniel

PS : Wir sind fast Nachbarn... Ich aus der Schweiz (französisch), Du aus Österreich...
 
Messages
495
Country
austria
That's fine!!

On Event= works only with events listed in the uploaded textfile !!

Here are some Key events from this textfile

Code:
MAGNETO
MAGNETO_BOTH
MAGNETO_DECR
MAGNETO_INCR
MAGNETO_LEFT
MAGNETO_OFF
MAGNETO_RIGHT
MAGNETO_SET
MAGNETO_START

Code:
f I add "LVar...=Magknob" directly into Cockpitsound.ini I can hear the sound,

So "Magknob" is an XML - variable because the DSD_sound.gau works only with XML- variable.
Maybe the switch is using his own variable.
If the T6 - gauge are written is XML it shouldn't be a probleme to adapt the gauge.

Is this T6 freeware?

Code:
How can I use a specific airplane variable ?
In XML: you have to know the name of the variable;) Or open the xml-file and analyse it.

in .GAUs: you must have the source code. And know something about C++


Edi


Ja, wir sind fast Nachbarn. Nur mindestens 500 km entfernt. Ich wohne in der Steiermark
 
Messages
71
Country
switzerland
Is this T6 freeware?

Yes, it is (http://www.flightsim.com/vbfs/fslib.php?searchid=14094570)
A very great airplane. Well done. The original texture are bad (like draw), but there are now a lot of better texture for this plane (I made 3 of them). I love this plane, but I regret that there's no switch "click" sound. That's why I tried it.



Well, I understand better what to do. Almost all switches are ok now. Very happy. I will upload this afterwards.

If the T6 - gauge are written is XML it shouldn't be a probleme to adapt the gauge.
It seems that the code is in the model (don't know if possible), because the only xml gauge I see is for the system (without mouse area).

Noch einmal vielen Dank für die Zeit. Ich wohne neben Fribourg. LSGE ist mein Flugplatz wo ich sehr oft fliege... Bin einmal bis Innsbruck geflogen. Toll.

Daniel
 
Messages
495
Country
austria
I downloaded the plane.
The gauges are in the Model.

But if you get the name of the switch variable - maybe from the designer-
it should be possible to write a small XML - gauge
which adds a sound to this switch.

Edi
 
Messages
71
Country
switzerland
The switch name is easy to get with FSUIPC. L:Magknob for the magneto.

The problem is how to put it in a xml to get the sound...

I imagined a xml gauge that would like a
If value of Magknob change then DSD_Click_SD... So etwas...
 
Messages
495
Country
austria
Yes, exactly!

So copy the code into your XLM - gauge at the end before "</Gauge>"

Code:
  <Element>
    <Select>
      <Value>
      (L:Magknob,number) (L:Magknob_TMP,number) !=
      if{
        1 (&gt;L:DSD_Click_SD,number)
        (L:Magknob,number) (&gt;L:Magknob_TMP,number)
        }
      </Value>
    </Select>
  </Element>

Not tested!

How can i look for variables with FSUIPC??
I'm registered a user.

Edi
 
Messages
71
Country
switzerland
YOU'RE A GREAT GENIUS!!!! IT WORK'S LIKE A CHARM!!!!!

I could add to all other switches very easily as I have all L:Var name. Hihi.

Well to extract all L:variable, it very easy with FSUIPC (Registered only) :

Open FSUIPC and add a new "Key presses" (I choose CTRL+SHIFT+M because not used)
In the list of "Control sent when key pressed", choose "List Local Panel Var"
Click "Confirm"

Then select the tab "Logging" and check
Button and key operations
+
Send to consol window (a dos windows will open)

Close FSUIPC and press your shortcut (CTRL+SHIFT+M by me).

Then you just have to open the Module folder of FS and find FSUIPC4.log. The L:Var are listed at the end.

Do not forget to uncheck Sent to consol window after this, you can keep the other options.

If you check "Events (non axis control)", you can get the variable by going back to the plane, click or switch what ever you want and then open the log file : you'll find exactly what you did and the variables used!

Thank you and this FSUIPC I will be able to add what ever sound I want to what ever airplane! So great.

Did you see I upload something on avsim ?

Ich habe nicht vergessen deine Name zu erwähnen. Leider kenne ich nur "Edi"... wenn es für dich genugend ist...

Nochmals vielen Dank

Daniel
 
Last edited:
Messages
3
Country
brazil
It's only 3 years later that I come across this thread.
Wonder if it is still ongoing.
Would love to have clicking sounds for buttons in any aircraft but being an authentic non-expert on the subject I must ask if there is now a simple, sort of ready to install gauge which dumb users like me could use it.
Appreciate any information.

In case you would consider e-mailing an answer: clarindogueiros@terra.com.br

Thanks a lot.
 
Top