Hello:
If this is for FSX,
you must have FSX SDK installed from FSX Deluxe or FSX Gold; see: "
Creating Special Effects" in SDK docs.
As Fr. Bill says, those that learn 3D modeling via GMAX can indeed use the Attach Point tool to "attach" a sound Effect file to an FSX MDL; this has the advantage of making sound "associate" with a scenery object model "placed" with a utility from a scenery library, and could make certain aspects of scenery development easier.
As an alternate example, take a look at Joe Watson's excellent freeware sound add-on for Bill Womack's Plum Island scenery package (
both are a "must-have, IMHO):
2B2 - Plum Island Sounds
http://library.avsim.net/esearch.php?CatID=fsxsnds&DLID=127783
FSADDON - PLUM ISLAND FOR FSX
http://secure.simmarket.com/fsaddon-plum-island-for-fsx.phtml
Examine the *.fx files Joe used (ex: in Windows NotePad); you'll need to create your
own version of
both types of FSX "Effect" files:
- The "Effect Controller" (Cntrl_*.fx) file, and the "Basic" effect definition (Fx_*.fx) file.
- You'll need a standard Windows *.Wav file which has had its sound volume set at a desired level inside the *Wav file itself with a Windows *.WAV file compatible audio editing utility.
- You'll need to create/edit an *.XML file (ex: in Windows NotePad) to place sound Effect(s) "directly" (via a Cntrl_*.fx file) using XML scenery methods.
- The *.XML file must then be compiled by FSX SDK BGLComp to create the "placement" *.BGL file.
- The *.BGL file must be put in a [top level folder name]\Scenery sub-folder which is "active" in the FSX > Settings > Scenery Library user interface to load.
IIUC, aside from changing very few SDK variable parameters,
all the remaining code in both *.fx files always stays the same for "sound Effects" (see FSX SDK).
CAVEAT: All Cntrl_*.fx and Fx_*.fx files are to be kept in the
default [FSX install path]\Effects sub-folder
or they won't work !
[
EDITED]
Also: Effect Cntrl_*.fx and Fx_*.fx files are
only loaded by FSX at initial start-up (not during run-times);
FSX must re-start to load new Effect(s) added at run-time, and can
not be implemented via re-indexing the FSX Scenery Library (which "usually" works for certain 'other' FS files).
[
END_EDIT]
In the Controller effect file "
Cntrl_[filename].fx": only 'Radius' and 'basic' effect filename (ex: "Fx_[filename].fx") "called" by Cntrl_*.fx 'controller' are changed.
...under
[Library Effect]:
Radius= <--- Specifies "distance" in Meters away that Effect will trigger
...under:
[controller.0]
effect.0= <--- Specify "basic" Fx_*.fx filename (without ".fx" file extension)
NOTE: If desired, sub-sections controlling other sounds may be "nested' in the Effect Controller file by adding additional [controller."x"] statements
FYI: My initial results using
nested [controller."x"] statements were questionable on a l
ower performance system using a top quality PCI slot sound card; the sound had a slightly odd "flanged" character (as though heard through a "pipe"), so I now use a separate controller Cntrl_*.fx file for
each basic *.fx file to get consistent results.
< It may have been at the time I had the sound card PCI latency set too low; Joe Watson's nested Effect Controller file works great on that older system, BTW. >
[
EDITED: 22-08-2011]
Joe Watson's Effect Controller is not "nested"; Joe used a single XML placement BGL file to "call" a independent controller for each *.WAV player Effect file... as discussed here:
http://www.fsdeveloper.com/forum/showpost.php?p=237101&postcount=3
More testing is needed to determine whether "nested" Controller FX files can be used for Sound Effects on all types of FS installations.
[
END_EDIT: 22-08-2011]
In the Basic effect file "
Fx_[filename].fx": only Radius, *.WAV filename ("called" by controller), MinAttenuationDistance, and Looping are changed
...under
[Library Effect]:
Radius= <--- "Distance" in Meters away that Effect will trigger
...under
[Sound]:
FileName=*.wav
<--- Specify filename (with ".wav" file extension) if *.Wav kept inside default [FSX install path]\Sound sub-folder
NOTE: If a *.Wav file is kept
outside [FSX install path]\Sound sub-folder, specify its
full path !
ex: [FSX install path]\Addon Scenery\[Scenery folder name]\Sound\[*.Wav filename]
...OR:
ex: [FSX install path]\SimObjects\Airplanes\[Airplane folder name]\Sound\[*.Wav filename]
MinAttenuationDistance=xx
<--- x="Distance" in Meters away that sound Effect will no longer be heard
Looping=TRUE
<--- Specifies sound Effect plays repeatedly; plays once if "FALSE"
BTW:
If one forgets to put the specified sound Effect *.Wav file in the default [FSX install path]\Sound sub-folder
...
OR:
If one forgets to specify in the 'basic' Fx_*.fx file, the
full path for an "alternate" folder location of that *.Wav file
...
One may only hear an odd "thumping" sound in the background of the FSX "Environmental" sounds !
NOTE: Sound volume for "all" custom "scenery" sound Effects (as a group...
not individually) is controlled in FSX via "Environmental" sound slider.
[
EDITED]
Individual Windows *.WAV sound file volume may only be adjusted
one at a time via a Windows *.WAV file format compatible audio editor which saves amplitude information inside the WAV file itself; if adjusting other *.WAV file attributes aside from volume (aka "amplitude"), be sure to consider the caveats of
"up-sampling" first... before writing any file attributes into a final output format as discussed here:
http://forum.aerosoft.com/index.php...d-surround-51/page__view__findpost__p__167517
...and here:
http://www.fsdeveloper.com/forum/showthread.php?t=15956
Joe Watson: Feel free to use any/all of the above for the "
Placing Sound Effects in FSX" wiki you were working on for FSDeveloper !
PS: See this thread for related info on sound effects placement:
http://www.fsdeveloper.com/forum/showthread.php?t=8781
Also: Dick Ludowise (aka "Rhumbaflappy") posted an interesting example demonstrating how sound effects may be implemented
without a controller-type file, instead just using a XML placement BGL with a "basic" sound *.FX file here:
http://www.fsdeveloper.com/forum/showthread.php?t=19185&highlight=effect
[
END_EDIT]
Hope this helps !
GaryGB