• 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 Afterburner gauge and sound

Messages
19
Country
australia
I’m wanting a gauge that has an afterburner sound, but the sound is only activated when the afterburner is. Is there a gauge out there that does this?

If not can someone please teach me :)

Kind regards
Alex
 
Messages
113
Country
unitedstates
The amazing Mr. Rob Barendregt wrote one for the F-14 from Dino for FS9 that works beautifully. The trick isn't just to make a plane have the sound of an AB. You need to make the right changes to the aircraft.cfg and .air files to make the AB actually function. Give the added thrust, making sure the throttle engages the AB's correctly, the right number of stages, and the Thrust Specific Fuel Consumption for the AB's. They really suck down the fuel, too.
The sound is nice, don't get me wrong, but the rest is as important, if not more so.
Do a search for Rob's gauges for FS9. I am sure you'll find the right gauges you want to make the AB's do what you want.
Pat☺
 

rcbarend

Resource contributor
Messages
435
Country
netherlands
@pat, Thanks for the qualification "amazing" ...LoL

@Alex:
Such a gauge is quite easy to make, and a lot of variants exists allready.
But it all depends on the addon aircraft you want to use it for; more specifically: if this aircraft model allready uses the built-in FS2004 "Afterburner" feature.
Because if so, making a gauge that activates an AB sound (using Doug Dawson's XMLsound module) is very easy and only a few lines of code.

If the addon aircraft uses an external (visual) effect file (.fx) to visualise the AB , you don;t even need a gauge, because you can trigger the sound via the .fx file.

But I agree with Pat: the sound is only a small part of the Afterburner "experiance".
Activating the AB should also result in additional thrust/speed (defined in a table in the .air file).
In FS2004 (as far as I know), it's just ON of OFF, while in FSX and up you have multiple AB stages.
And there is the question how (in that addon model) the AB is triggered: e.g. using the FS Afterburner event, either manually given by the user or automatically generated by a gauge depending on a criterium like N1/N2 or Throttle position.

In short:
How to best add an Afterburner sound to an existing aircraft model, depends on how the AB is allready modelled (visually and/or FDE-wise) in that (addon) model.
Because "Afterburner Active" is quite ambiguous, and depends how it's implemented.

Rob
 
Messages
113
Country
unitedstates
What can I say? You're xml coding amazes me every time I read through a gauge you wrote :wizard::rotfl:

The gauge I was thinking of originally, though was This one, over on Avsim. It has all that you need to know about AB's, how to activate them, trigger sound and light effects (the AB flames out the back), how to modify the aircraft.cfg and .air files to get the correct fuel usage and power addition, all that fun stuff.
Maybe you can read through his sound effect trigger and see what Rob did to get the right sounds at the right times.

I'm not saying to copy his coding word-for-word, but you may get some ideas on how to make your own gauge. :idea:

Just a thought. I get so few...
Pat☺
 
Messages
19
Country
australia
Im having issues with the sound workingwith your guage rob. Ive installed everything as said in the readme but no luck. Im notsure if it's the xml sound guage thats causing the issue.

How can you make an effect file use sound, and how does it work?

Kind regards
 

rcbarend

Resource contributor
Messages
435
Country
netherlands
Im having issues with the sound workingwith your guage rob. Ive installed everything as said in the readme but no luck. Im notsure if it's the xml sound guage thats causing the issue.

How can you make an effect file use sound, and how does it work?

Kind regards
Sorry, I don;t have FS2004 and all of my old addons for it anymore; so I'm afraid I can't help debugging why you cannot get it working.

As to playing a sound from an .fx effect file:
The trick was (as far as I can remember) to add a line
Sound= "a number"
to the .fx file.
That "number" corresponded (via a fixed number-filename relation) to a soundfile in the /Sound folder; so this soundfile was played once, while the .fx file was active.
But I forgot the exact details.
Maybe someone with a better memory then me can answer that in detail.
Regards, Rob
 

tgibson

Resource contributor
Messages
10,801
Country
us-california
I've done it in a few cases; this example is from a parking announcement outside my classic LAX ("the white zone is for loading and unloading, no parking". Here is the general idea from a previous thread:

First you have a effects controller file. This controls where you must be located to hear the effect. This effect controller file must be placed into the scenery, at the locations you want to hear the sound. I placed one at each terminal at LAX. Second you have the effect file that actually plays the sound. This file is called by the controller file when specified.

ADE can place effects into the scenery, if you have used that program to create your Cape Canaveral airport (or you can load your AFCAD bgl file into ADE and use ADE from this point forward). If not, you can use XML and bglcomp to place them manually. This is not too hard.

The controller file (Cntl_parking_announce.fx), looks like this:

[Library Effect]
Lifetime=5
Version=1.00
Radius=61
Priority=0

[controller.0]

Lifetime=0.00, 0.00
Type=3
Delay=10.0, 10.0
distance=61,61
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
effect.0=fx_parking_announce, 0,0,0,0,0,0,0,0

So make a copy of my controller (in your FS2004/Effects folder) and paste it back in. Then rename it to something like Cntl_Canaveral_announce.fx.

The only line you must change is the last one, to point to your sound effect file, not mine. Just change the file name. You may also want to change the Radius=, distance=, and Delay= lines, if you want the trigger area to be larger/smaller, or the sound to start sooner/later (and the length of silence between announcement repeats).

So now we come to the sound effect file itself (fx_parking_announce.fx). The only important part of this file is at the top:

[Library Effect]
Lifetime=5
Version=2.00
Radius=0
Priority=0
Sound=5
Sound Param=31

[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1

The Emitter section below does nothing - it just makes it a valid effect file.

So make a copy of this file and rename the copy something like fx_Canaveral_announce.fx.

The important lines here are the Sound= and the Sound Param= lines. The Sound= line determines how the sound will be played (5 = play once; the controller repeats it). and the Sound Param= line determines which WAV file will be played. These WAV file names are all *hard coded* in FS and cannot be changed. There are a limited number of WAV file names and they cannot be used more than once in FS - you can use only one each in your entire FS9 installation.

The sound parameters and associate file names are:

----------------------------------------------------
Sound filenames associated with effects file entries
----------------------------------------------------

Sound type "5"

Where three filenames are listed, one will play at
random at each initiation of the effect...

----------------------------------------------------
FX file entry sound file(s)
----------------------------------------------------
Sound=5
Sound Param=0
firework.wav
----------------------------------------------------
Sound=5
Sound Param=3
xvlg_exp.wav
----------------------------------------------------
Sound=5
Sound Param=4
amb_aexp1a.wav
amb_aexp1b.wav
amb_aexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=7
amb_aexp2a.wav
amb_aexp2b.wav
amb_aexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=10
amb_aexp3a.wav
amb_aexp3b.wav
amb_aexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=13
amb_aexp4a.wav
amb_aexp4b.wav
amb_aexp4c.wav
----------------------------------------------------
Sound=5
Sound Param=16
amb_wexp1a.wav
amb_wexp1b.wav
amb_wexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=19
amb_wexp2a.wav
amb_wexp2b.wav
amb_wexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=22
amb_wexp3a.wav
amb_wexp3b.wav
amb_wexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=25
amb_wexp4a.wav
amb_wexp4b.wav
amb_wexp4c.wav
----------------------------------------------------
Sound=5
Sound Param=28
amb_gexp1a.wav
amb_gexp1b.wav
amb_gexp1c.wav
----------------------------------------------------
Sound=5
Sound Param=31
amb_gexp2a.wav
amb_gexp2b.wav
amb_gexp2c.wav
----------------------------------------------------
Sound=5
Sound Param=34
amb_gexp3a.wav
amb_gexp3b.wav
amb_gexp3c.wav
----------------------------------------------------
Sound=5
Sound Param=37
amb_gexp4a.wav
amb_gexp4b.wav
amb_gexp4c.wav
----------------------------------------------------

Sound type "6"

These sounds play at one of four different "speeds"
or "tones", chosen randomly each time by the Sim...

The filename listed will play at each initiation
of the effect, with four possible variations...

----------------------------------------------------
FX file entry sound file(s)
----------------------------------------------------
Sound=6
Sound Param=1
imp_large_a.wav
----------------------------------------------------
Sound=6
Sound Param=2
imp_large_b.wav
----------------------------------------------------
Sound=6
Sound Param=3
imp_large_c.wav
----------------------------------------------------
Sound=6
Sound Param=4
imp_large_d.wav
----------------------------------------------------
Sound=6
Sound Param=5
imp_large_e.wav
----------------------------------------------------
Sound=6
Sound Param=6
imp_med_a.wav
----------------------------------------------------
Sound=6
Sound Param=7
imp_med_b.wav
----------------------------------------------------
Sound=6
Sound Param=8
imp_med_c.wav
----------------------------------------------------
Sound=6
Sound Param=9
imp_med_d.wav
----------------------------------------------------
Sound=6
Sound Param=10
imp_med_e.wav
----------------------------------------------------
Sound=6
Sound Param=11
imp_small_a.wav
----------------------------------------------------
Sound=6
Sound Param=12
imp_small_b.wav
----------------------------------------------------
Sound=6
Sound Param=13
imp_small_c.wav
----------------------------------------------------
Sound=6
Sound Param=14
imp_small_d.wav
----------------------------------------------------
Sound=6
Sound Param=15
imp_small_e.wav
----------------------------------------------------
Sound=6
Sound Param=16
imp_small_f.wav
----------------------------------------------------
Sound=6
Sound Param=17
imp_small_g.wav
----------------------------------------------------


The Sound=5 sounds are for scenery, while I use the Sound=6 sounds for my AI sounds . So you'll need to use Sound=5. I've already used Sound Param=31, so you will need to use another one. BTW, you can have up to 3 different announcements - they will play randomly. I instead have 3 identical WAV files so the same announcement plays all the time. Look in your main FS2004 Sound folder and you will see amb_gexp2a.wav, amb_gexp2b.wav, and amb_gexp2c.wav. These are my parking announcements. Your wav files will go here too.

Other scenery creators have also used some sounds in their sceneries but I don't use non-CalClassic scenery, so that's not a problem for me. You can look in your Sound folder for any other WAV files starting with amb_ - avoid using those. They often used the lower Sound Param numbers, so that's why I used a large one (31). I would do the same and use a number like 34, if available on your machine.
 
Messages
19
Country
australia
Okay so i want to add an afterburner sound to the freeware virtavia f-22. Would i use the above to do this or different because its an aircraft not scenery? Sorry new to trying to edit more technical things on fs9
 
Messages
19
Country
australia
Something else i want to achieve is to create an xml gauge so that during high AoA maneuvers the slats deply automatically
 
Messages
113
Country
unitedstates
Something else i want to achieve is to create an xml gauge so that during high AoA maneuvers the slats deply automatically
That's a whole different subject, but: I seem to recall someone doing such a gauge on something like a BF109, or something. I'm sorry this isn't more help. I'll look around and see what I can find, though.

For the AB sound, I strongly suggest reading through the Readme fie included with the RCBAC-10.zip I linked before. It has all you need to add the sound without any sound file editing at all. I even read through the .xml file that turns the sound and light effects on and off, and even I can understand it. To me, this says that any .xml tyro, which I am sure one of, can figure it out. Easy as cake....errr...pie! Easy as pie! :rotfl:
Sorry, Space 2010 reference. Always cracks me up...
I'll leave the rest to Rob's Readme and .xml files to explain.

Good luck! Hope this is a little help...
Pat☺
 
Messages
19
Country
australia
Okay so I’ve added a sound file to the afterburner effect but I can’t hear it.

I’ve placed the sound I want in the default fs9 sound folder

I’ve got this above the first line of properties in the afterburner effect

[Sound]
FileName=virtavia_ab.wav
MinAttenuationDistance=1000.00
Looping=TRUE
 
Messages
113
Country
unitedstates
Do you have some way to turn the sound on? That was one of the functions of the .xml file. To make the .wav files play.
It uses the COP_Sound.ini file to set the .wav files to active or inactive. It uses L:VAR's to do this.
It also uses specific folders, but those can be altered to suit you. It just takes a little xml magic :D That's up to you to write into the xml file that you write to activate or deactivate the AB's. You can use a switch, like Rob did, or you can make it entirely dependant on the engine N2, the throttle (did you know that's an old English word for "choke"? as in I choked him to death) position, or a combination of the two.
I'll leave the xml writing to you, though. Consider it a learning experience :D

I may not be explaining this all very well, but I'm trying. Honest I am. I'm just trying to not give away any secrets of Rob's. That's why I suggested you write your own xml file. If it does nothing else, you use it to turn the sound on and off, but I suggest you actually make the entire AB "thing" happen. The extra thrust, the sounds, the light effects (out the tail-pipes), the fuel usage, etc, etc.
The whole nine yards :D
That takes some modifications of the aircraft.cfg, and the .air file, too. These changes are all explained in the Readme in the RCBAC-10.zip file. They aren't very complex or complicated, either. Easy as cake :D :D
I don't know how many planes I've done it to. A lot, though. Well worth the effort, too, to add the realistic effect of the actual Ab's to a plane. At least to planes that should have AB's :p Little silly to add AB's to a Cessna 172, you know?

Anyway, does this all help?
Pat☺
 
Messages
19
Country
australia
A little.. i havd no idea how to undsrstand xml file writing. Ive heard its verycomplicated. And last time I tried to install robs stuff i couldnt get it to work
 
Messages
113
Country
unitedstates
Aww, shucks, XML isn't all that bad. At least for something like this. Yeah, for the GPS system, complicated. This, not so bad at all.
Heck, if *I* can understand it, any 6th grader can. o_O
Seriously, the trick is to know at the beginning what the xml file you're looking at actually does. In this case, uses a switch action to turn the AB's on, including the light effects and sound effects. It checks to make sure the engines are configured correctly for the AB's to work in the first place, then give the user an indication (a small light by the switch) of whether the AB's can be turned on or not.
You can get all that information by looking through the Readme. Once you have a good idea of WHAT the gauge does, then you can open the .xml file with NotePad, NotePad++, something like that. Do not ever use a word processor, or it will add symbols and characters to the file you can't see, but makes the file useless to the sim. Anywho, open up the .xml file, and read through it. You will easily see the different conditions it looks for to ensure the various situations are correct for AB's to operate. Like this, the first conditional check line in it: (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 95 &lt .
Obviously, that looks at the throttle position (in percent of it's total throw) for engine #1, and if it's 95% (percent) & (and) less than (lt) it will return a certain value.
Something about XML programming that can be tough to figure out it that it uses what's called RPN, or Reverse Polish Notation. That means that it sort of does things backwards from what you're used to. For example: You usually write a math problem like this: 1 + 2 = 3, right? Well, in RPN it is written 1 2 + . You get the two numbers, then what to do with them. Kinda sorta backwards. Great for computers, hard on humans used to the "normal" system. I suggest you read up on it.

Anyway, once you get all this figured out, xml, RPN, and so on, it suddenly becomes clear and easy to read. You just figure out what YOU want YOUR xml to do, then just write it down. See? Easy as cake :rotfl:

Does this help at all?
Pat☺
 
Messages
19
Country
australia
Thanks pat, that helps a lot more. Over the next few days will try and do something with this info :)
 
Top