FSXA Doug Dawson Sound Gauge Help

I recently downloaded Doug Dawson's 'dsd_fsx_xml_sound_v435' package to try to use it for some custom sounds in my current project. I have some knowledge of programming XML gauges for 3D VC instruments but I don't have a great deal of knowledge in programming 2D gauges. I have read the included document (several times) but I'm still not seeing the wood for the trees when it comes to implementing the code. I was wondering if someone could maybe point me in the right direction to get me started.

Here's my scenario:

As I understand the FSX SDK you can only have one sound in the sound.cfg file for 'Exit' and that sound plays for whichever exit is opened. My current aircraft project is one that has a sliding canopy and a baggage door. I can set the sound.cfg to play a custom canopy open/close sound but that same canopy sound then plays whenever I open the baggage door which is not what I want.

I want to use Doug's gauge to play the custom canopy sound when 'Exit0' is operated and the standard small door sound when 'Exit1' is operated.

I can see how to set Doug's .ini file to link an L_var to a sound but I am having difficulty getting my head around how you actually trigger those L_vars from the two exit options (i.e. 'Shift+E' and 'Shift+E 2').

Do I have to make a 2D gauge to call those L_vars based on Exit status or am I missing something else?

In addition how would I go about calling the two different sound files I have for the canopy opening and closing? Using the sound.cfg file you have the option of specifying the separate open/close sounds but I can't see how to do that with Doug's gauge.

Any help would be greatly appreciated as I am totally lost at the moment and just need pointing in the right direction.
 

n4gix

Resource contributor
Larry, you could write a small logic gauge and monitor the (A:EXIT OPEN:0,bool) and (A:EXIT OPEN:1,bool) variables.

You would also need to maintain two flag L:vars to keep track of whether the open or close sound should be played.

Here is how I handle the B737-200 cockpit vent windows. I have substituted the EXIT OPEN variables for my VentLeft variables.

Code:
    <!--- COCKPIT WINDOW SOUNDS -->
<!-- Open -->
    (A:EXIT OPEN:0,bool)
    (L:PlayOnceLeft,bool) ! and
    if{ 1 (>L:XMLSND11,bool) 1 (>L:PlayOnceLeft,bool) } (* play open sound *)
<!-- Close -->
    (A:EXIT OPEN:0,bool) !
    (L:PlayOnceLeft,bool) and
    if{ 1 (>L:XMLSND12,bool) 0 (>L:PlayOnceLeft,bool) } (* play close sound *)
I had to insert some few seconds of delay before the close sound, to allow for the windows's movement in the sim.
 
Thanks for replying Bill. So I take it this would be a 2D gauge that calls Doug's sound gauge or are you implying I could do it without using Doug's gauge? Confused. :confused:

I think you mean the former and in the .....

Code:
 if{ 1 (>L:XMLSND11,bool) 1 (>L:PlayOnceLeft,bool) } (* play open sound *)
..line then 'L:XMLSND11' refers to the Lvar name you used in Doug's .ini file.

Am I correct in my thinking here?

How and where did you insert the delay as I can see I might need that for the baggage door? The canopy has a continuous sound for the length of the animation but I would just need a 'clunk' at the start of the baggage door opening animation and another 'clunk' (possibly the same sound) at the end of the baggage door closing animation.
 

n4gix

Resource contributor
No, the (L:XMLSNDnn,bool) variables are for my own custom sound module, but the technique would be the same, simply substituting the L:vars you develop for Doug's sound system.

I actually timed the movement in the sim, then edited the .wav file to insert the exact amount of time delay I needed.

For your baggage door, you could use the freeware Audacity to create your own custom sound, with an initial "clunk", several seconds of silence, and the ending "clunk." :cool:
 
No, the (L:XMLSNDnn,bool) variables are for my own custom sound module, but the technique would be the same, simply substituting the L:vars you develop for Doug's sound system.
OK that's what I thought. I just tried it again but it doesn't work but there could be several reasons for that. :eek:

Can you run your eye over the following to see if you can spot where I am going wrong.

These are my panel.cfg entries in the [vcockpit01] section:

Code:
gauge01=dsd_fsx_xml_sound!Sound,  2,2,2,2, /panel/dsd_xml_sound.ini
gauge02=dsd_fsx_xml_sound!Debugger,  420,550,600,80
gauge03=Navion_gauges!Navion_Exit_Sounds 0,0,0,0
This is the code I have in my 2D XML gauge called as 'gauge03' above:

Code:
<Gauge Name="Navion_Exit_Sounds" Version="1.0">

<!--- EXIT SOUNDS -->
<!-- Open Canopy -->
    (A:EXIT OPEN:0,bool)
    (L:PlayOnceCanopy,bool) ! and
    if{ 1 (>L:canopy_open,bool) 1 (>L:PlayOnceCanopy,bool) } (* play open sound *)
<!-- Close Canopy-->
    (A:EXIT OPEN:0,bool) !
    (L:PlayOnceCanopy,bool) and
    if{ 1 (>L:canopy_close,bool) 0 (>L:PlayOnceCanopy,bool) } (* play close sound *)

</Gauge>
and this is my .ini file contents for Doug's gauge:

Code:
[Config]
MaxSounds=10
GlobalCommands=DSDGlobals
VolumeVarIn=dsd_xml_sound_volume_in
PanVarIn=dsd_xml_sound_pan_in
VolumeVarOut=dsd_xml_sound_volume_out
PanVarOut=dsd_xml_sound_pan_out
LoopOut=dsd_xml_sound_loop_out
VolumePlayed=dsd_volume_played
PanPlayed=dsd_pan_played
LoopPlayed=dsd_loop_played

[Sounds]
Sound00=\Ryan_Navion_B\sound\260_canopy_open
Sound01=\Ryan_Navion_B\sound\260_canopy_close
Sound02=.\Sound\dsd\dsd_xml_02.wav
Sound03=.\Sound\dsd\dsd_xml_03.wav
Sound04=.\Sound\dsd\dsd_xml_04.wav
Sound05=.\Sound\dsd\dsd_xml_05.wav
Sound06=.\Sound\dsd\dsd_xml_06.wav
Sound07=.\Sound\dsd\dsd_xml_07.wav
Sound08=.\Sound\dsd\dsd_xml_08.wav
Sound09=.\Sound\dsd\dsd_xml_09.wav

[LVars]
Lvar00=canopy_open
Lvar01=Canopy_closed
Lvar02=dsd_xml_sound_02
Lvar03=dsd_xml_sound_03
Lvar04=dsd_xml_sound_04
Lvar05=dsd_xml_sound_05
Lvar06=dsd_xml_sound_06
Lvar07=dsd_xml_sound_07
Lvar08=dsd_xml_sound_08
Lvar09=dsd_xml_sound_09
In addition whenever I load the plane I get the following pop up message in FSX:



I have both Doug's .ini file and the .gau file in my aircraft's panel folder and there is also a version of the .gau file in the 'FSX\gauges' folder

I'm obviously doing something (very possibly many things) wrong but I'm not sure where. :confused:

I actually timed the movement in the sim, then edited the .wav file to insert the exact amount of time delay I needed.

For your baggage door, you could use the freeware Audacity to create your own custom sound, with an initial "clunk", several seconds of silence, and the ending "clunk." :cool:
OK, as a former recording studio engineer I can do that bit easily enough! ;)
 

ddawson

Resource contributor
Two questions:
What is the name of the config file you are using and what is the entry for the sound gauge in your panel.cfg file?

Doug
 

n4gix

Resource contributor
Um, Larry you are missing some required verbiage for a 2d XML "gauge"...

...such script must be contained either in an <Update> section, or an <Element><Select><Value> construct.
Code:
<Gauge Name="Navion_Exit_Sounds" Version="1.0">
  <Update Hidden="Yes">
   <!--- EXIT SOUNDS -->
   <!-- Open Canopy -->
    (A:EXIT OPEN:0,bool)
    (L:PlayOnceCanopy,bool) ! and
    if{ 1 (>L:canopy_open,bool) 1 (>L:PlayOnceCanopy,bool) } (* play open sound *)
   <!-- Close Canopy-->
    (A:EXIT OPEN:0,bool) !
    (L:PlayOnceCanopy,bool) and
    if{ 1 (>L:canopy_close,bool) 0 (>L:PlayOnceCanopy,bool) } (* play close sound *)
  </Update>
</Gauge>
 
Last edited:
Two questions:
What is the name of the config file you are using and what is the entry for the sound gauge in your panel.cfg file?
Hi Doug, thanks for the reply.

The config file is named 'dsd_fsx_xml_sound.ini' and the panel.cfg entry is:

'gauge01=dsd_fsx_xml_sound!Sound, 2,2,2,2, /panel/dsd_xml_sound.ini'.

I did notice that your instructions provided with the download made no mention of the location for the 'dsd_fsx_xml_sound.gau' file so I have it sitting in my panel folder and I have no entry for it in my panel.cfg file. Should the .gau file be listed in the panel.cfg too as that might be one of my problems.
 
Um, Larry you are missing some required verbiage for a 2d XML "gauge"...

...such script must be contained either in an <Update> section, or an <Element><Select><Value> construct.
Thanks Bill, as I've told you before, one of these days I will get it! :rolleyes:
 

ddawson

Resource contributor
Hi Doug, thanks for the reply.

The config file is named 'dsd_fsx_xml_sound.ini' and the panel.cfg entry is:

'gauge01=dsd_fsx_xml_sound!Sound, 2,2,2,2, /panel/dsd_xml_sound.ini'.

I did notice that your instructions provided with the download made no mention of the location for the 'dsd_fsx_xml_sound.gau' file so I have it sitting in my panel folder and I have no entry for it in my panel.cfg file. Should the .gau file be listed in the panel.cfg too as that might be one of my problems.
If you look closely, you will notice that the name of the actual config file does not match the name you are specifying in panel.cfg. That is why the gauge is complaining.

Doug
 
If you look closely, you will notice that the name of the actual config file does not match the name you are specifying in panel.cfg. That is why the gauge is complaining.
Ahhh, I see that now, thanks Doug. BTW you may want to edit your .txt and .rtf documents provided with the download as I copied and pasted the two lines to make sure I had them correct and it's those that refer to the wrong file name (both are missing the '_FSX_' part).

I take it the .gau file just sits in the panel folder but do I need to call it in the panel.cfg file at all?
 

ddawson

Resource contributor
I take it the .gau file just sits in the panel folder but do I need to call it in the panel.cfg file at all?
Um... Yes. It won't load if you don't. Or are you referring to the config file? If so, if it has the same base name as the gauge, and is in the same folder as the gauge, then no, you don't need a reference to it in the panel.cfg file.
That is, if you put dsd_fsx_xml_sound.ini in the same folder as dsd_fsx_xml_sound.gau then the gauge will load it without being told where to find it.

Doug
 
OK, I have stopped the gauge complaining on aircraft load by changing the line in the panel.cfg file to this:

gauge01=dsd_fsx_xml_sound!Sound, 2,2,2,2,

based on a similar line I found in a friend's model that works. I am assuming that is directly loading the .gau file rather than the .ini file. I also spotted an error in the .ini file as I had omitted the .wav suffix on the sound file names. These now read:

Code:
[Sounds]
Sound00=\sound\260_canopy_open.wav
Sound01=\sound\260_canopy_close.wav
The sound files are located in the 'sound' folder inside the aircraft folder and I am assuming I have the syntax correct for that location.

However, I still have no sounds in the sim and I am wondering it's an issue with Bill's 2D gauge code.

My .ini file L_vars are below:

Code:
[LVars]
Lvar00=canopy_open
Lvar01=canopy_closed
I am assuming (lots of that going on today I know!) that Bill's statement:

(>L:canopy_open,bool)

Is what actually calls 'Lvar00' in the .ini file and which should then play the '260_canopy_open.wav' file in the sim but nothing happens.

I'm still confused. :confused:
 

taguilo

Resource contributor
I think you should make these corrections:

Code:
[Sounds]
Sound00=[COLOR="Red"].[/COLOR]\sound\260_canopy_open.wav
Sound01=[COLOR="red"].[/COLOR]\sound\260_canopy_close.wav
It seems the dots (in red) are necessary to follow the correct path to you aircraft's sound folder, as you are loading the .gau file from your aircraft's panel folder.

and you should remove the letter in red:

Code:
[LVars]
Lvar00=canopy_open
Lvar01=canopy_close[COLOR="red"]d[/COLOR]
because the name of the LVar is (L:canopy_close,bool)

... or you could do the inverse and add the "d" to the LVar's name :D


Tom
 

ddawson

Resource contributor
Code:
[Sounds]
Sound00=\sound\260_canopy_open.wav
Sound01=\sound\260_canopy_close.wav
The sound files are located in the 'sound' folder inside the aircraft folder and I am assuming I have the syntax correct for that location.
When you specify a sound path without a leading 'dot' the gauge takes the path to the configuration file and appends what you have provided. As you have placed the .ini file in the panel folder, it is within the panel folder that the gauge is looking for a folder called sound.
As the gauge stands right now, there is not a practical way to place the sounds you want to use within the aircraft's sound folder.
Contrary to what Tom suggested, if you begin your sound file specification with a 'dot':
Code:
Sound00=.\sound\260_canopy_open.wav
the gauge will take the path to your main FSX folder and append the file specification provided. This is a function of the way the operating system works, not the gauge.
The above would place the sound within FSX's main sound folder.

I'm going to suggest that for now, you place the sounds directly in the panel folder. Then you can use these config entries:
Code:
[Sounds]
Sound00=260_canopy_open.wav
Sound01=260_canopy_close.wav
Doug
 

taguilo

Resource contributor
Doug,

You're right, a leading dot won't scale the path up one level.
However, a double dot ".." should do that, providing your gauge would follow Windows' convention for relative paths, which seems it's not doing.

For example, using Win relative paths, if .gau and ini file are placed in

Myaircraft\panel folder

then making this reference in ini:

Sound00=..\Sound\Mysound.wav

Should play that sound located in

Myaircraft\sound folder

Also a single leading dot shouldn't scale up to FSX root, but instead start from the current folder and down, ie

Sound00=.\Sound\Mysound.wav

Should play that sound located in

Myaircraft\panel\sound folder

Is there any special reason for not using this method? Or maybe I'm missing something?

Tom
 

ddawson

Resource contributor
Tom,

The operating system functionality of the single dot is to refer to the folder in which the current process is running, which in this case is the main FSX folder. I coded the gauge to test for this.
Until last night it never crossed my mind to test for the two dots. I suppose I will do some testing...

Doug


Doug,
You're right, a leading dot won't scale the path up one level.
However, a double dot ".." should do that, providing your gauge would follow Windows' convention for relative paths, which seems it's not doing.
For example, using Win relative paths, if .gau and ini file are placed in
Myaircraft\panel folder
then making this reference in ini:
Sound00=..\Sound\Mysound.wav
Should play that sound located in
Myaircraft\sound folder
Also a single leading dot shouldn't scale up to FSX root, but instead start from the current folder and down, ie
Sound00=.\Sound\Mysound.wav
Should play that sound located in
Myaircraft\panel\sound folder
Is there any special reason for not using this method? Or maybe I'm missing something?
Tom
 
Problem sorted thanks to Doug's help via email.

It was a combination of typos and coding syntax/methodology but we "got 'er done" in the end! :)
 
Top