Sign in to follow this  
jackieman271

Add APU Sound to aircraft?

Recommended Posts

Hi,

How can you add APU sounds to an aircraft? For example, I want to add 3rd party APU sounds to the IRIS Global Express, which uses the default CRJ 700 panel. How and where do I put these sound files and where do I edit the panel?

 

Matt John

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I thought the same, it would be neat. GSX does seem to provide an APU whine, but only after you shut down your engines, but not before the flight, at the gate. I'm sure I've seen the sound file in the coatl/GSX folder. 


There is no sound associated with the APU in FSX so you couldn't just assign it to the plane's sound folder. You could swap it into something else, though, like the fuel pump, which does have a sound associated with it. So you switch on the APU and Fuel Pump. Then when engines are started, switch off APU and fuel pump. That would do the trick. Not elegant, though!

Share this post


Link to post
Share on other sites

I thought the same, it would be neat. GSX does seem to provide an APU whine, but only after you shut down your engines, but not before the flight, at the gate. I'm sure I've seen the sound file in the coatl/GSX folder. 

There is no sound associated with the APU in FSX so you couldn't just assign it to the plane's sound folder. You could swap it into something else, though, like the fuel pump, which does have a sound associated with it. So you switch on the APU and Fuel Pump. Then when engines are started, switch off APU and fuel pump. That would do the trick. Not elegant, though!

 

Interesting, but I am talking about how to add a sound to the panel, so a sound starts when the APU is activated. Just like any addon aircraft like the PMDG 737 or Carenado Hawker, where you turn on the apu and sounds for it are played. How do you implement that into another aircraft?

Share this post


Link to post
Share on other sites

The way I would experiment with adding the apu switch would be to "borrow" a known working

Apu switch from another aircraft and add it to your 2D panel. Don't know if you can borrow from

a payware aircraft? Be sure the .cab and gauge files are shared.

 

Does the crj panel have a working apu start switch? Does apu light come on indicating the apu is

running, just no sound in the cockpit? Can it be heard in an outside view?

 

I am not on my home computer so I can't download and try that aircraft.

Share this post


Link to post
Share on other sites

 How do you implement that into another aircraft?

 

Things to look into:

- Editing XML gauges for FSX

- Writing XML code for FSX

- Doug Dawson's XML sound gauge

- Finding default simulator variables

- Finding a .wav file of an APU

 

Sounds trivial, but it's actually a ton of work, even more so if you're totally inexperienced.

Share this post


Link to post
Share on other sites

There is a freeware addon called Cockpit Sounds which I've used, it adds clicks to most GA switches. Perhaps it could be extended... I tried to import a sound for the anti-ice switch but couldn't get a result, but then I know little about this kind of thing!

Share this post


Link to post
Share on other sites

Doug Dawson's XML sound module is the core part of the Cockpit Sounds package. The original downloads usually contain a readme that explains how the gauge operates.

(The latest version can be downloaded from http://douglassdawson.ca/)

In short: The .ini file links a sound .wav file to a custom variable. To trigger the sound variable, you need to write some XML code.

 

 

Building on Daniel's CockpitSounds package, add this to whichever of its XML files you're using:

 

<Element>
    <Select>
      <Value>
(A:APU PCT RPM, percent) 25 >
(L:APU Sound Variable, number) 0 == and
if{ 2 (>L:APU Sound Variable, number) }
 
(A:APU PCT RPM, percent) 25 <
(L:APU Sound Variable, number) 0 != and
if{ 0 (>L:APU Sound Variable, number) }
      </Value>
    </Select>
  </Element>

 

Make sure you put the entire code block above the closing </Gauge> tag.

 

In the .ini file for CockpitSounds, the last line should be:

 

LVarNN=APU Sound Variable

 

(Note: NN should be changed to a consecutive number. Also check that the value for "MaxSounds=" at the top of the file is greater than the number of the last line.)

 

Same .ini file, line linking to the .wav file:

 

SoundNN=.\Gauges\CockpitSounds\apu.wav, -100

("NN" should be the same number as used for the "LVar" line further down)

 

Now all you need to do is find a .wav sound file of an APU, rename it to "APU.wav" (or change the file name in the "Sound..=" line accordingly) and drop it into the "CockpitSounds" folder.

 

 

To build a basic understanding about the operation of the cockpit sound gauge and how to adapt it to your needs:

 

The .xml files in the CockpitSounds package do have predefined assignments for the APU switches. This one, for example:

 

<On Event="APU_STARTER">
1 (>L:DSD_Metal_Switch3_SD,number)
</On>

 

The event is bog standard in FSX* and the line below simply says that the "L:DSD_..." variable will be set to "1" whenever the event is detected by the gauge. The value of the variable is read by the XML sound gauge and interpreted as "play once, then stop" (a value of "2" means "loop"; ref. Doug's documentation). When receiving a "play" signal, the gauge will then look for the .wav file in the line in the .ini file with the same number as the line containing the sound's L: var. When the .wav file is successfully retrieved, it will be played. If not, you will receive a mildly annoying error box.

 

On the off chance that a cockpit switch itself uses a custom L: var instead of a default event, comparing the value of the switch variable to a control variable always works. Example from the CockpitSounds XML file for Dino Cattaneo's F-14:

 

(L:Cage Switch,number) (L:Cage Switch_TMP,number) !=
if{ 1 (>L:DSD_Button3_SD,number) (L:Cage Switch,number) (>L:Cage Switch_TMP,number) }

 

The code compares the value of the L: var used for the cockpit switch "L:Cage Switch" with a temporary variable "L:Cage Switch_TMP" and once it detects a mismatch in values (switch being "1", temporary variable being "0"), will execute the code in the "if{ }" construct, setting the sound variable to "1" (play once) and then assign the value of "L:Cage switch..." to "L:Cage switch_TMP" to reset the conditions (since "L:Cage switch..." will switch back from value "1" to value "0" the next time the switch is operated in the cockpit).

This type of code has to be executed in a "<Element> <Select> <Value>" block (see the APU example above) in the XML file.

 

With the ability to intercept FSX events (key presses), monitor custom switch variables and assign looped sounds to other variables (see APU above), you'll be able to cover 90 to 95%% of your requirements when equipping third party aircraft with cockpit sounds. The most difficult thing is finding appropriate FSX-internal variables to trigger sounds (there's a list though**), understanding FSX XML code (there's a reference document***) and finding custom L: type variables in 2D panels (by analyzing their XML files) or 3D models (with ModelConverterX and its ability to generate a Modeldef.xml file from the .mdl).

 

 

I've spent much more time than intended on this post, so I'd really appreciate it if both of you put in some extra effort in the "information processing" department as well.

 

 

 

* https://msdn.microsoft.com/en-us/library/cc526980.aspx

** https://msdn.microsoft.com/en-us/library/cc526981.aspx

*** https://msdn.microsoft.com/en-us/library/cc526953.aspx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this