Sound Research & Information (FAQ)
Posted: Sat May 12, 2012 9:04 pm
Hi guys, I just thought I'd stick a bit of thrown-about, not-very-well-known, and also undocumented (at least Gametoast-undocumented) information and research about sounds in this thread. I will continue to update this thread as I learn more about the SWBF2 sound engine. I will use lots of information and configurations from Unification in this thread.
Addressed in this thread:_________________________________________________________________________________
Sound file hierarchy:
--Level file - sound level file
------str - streams, contains list of audio streams - loads *.stm and *.st4 files - must be loaded through the LUA via an OpenAudioStream() line
------lvl - separate sub-levels, allows for separate loading of effects, music, foley, etc. - loads *.req files
----------bnk - sound banks, lists shorter, mono sounds - loads *.sfx and *.asfx files
----------config - sound configuration files - loads *.snd, *.mus and *.ffx files
_________________________________________________________________________________
Recommended sound specifications:
Ambient/music streams: Stereo, 44,100 to 48,000 Hz
Voice over streams: Mono, 22,050 Hz to 32,000 Hz
Effects: Mono, 22,050 to 44,100 Hz
Low-frequency effects: Mono, 10 Hz to 8,000 Hz
_________________________________________________________________________________
Audio buses:
Audio buses are a hierarchy of gain and attenuation controllers for audio. When a bus is attenuated, it is faded to a pre-specified gain whenever audio is sent through the attenuating bus. An example of bus attenuation is whenever in the stock game voice over announcements are played, the rest of the game's audio is faded until the voice over is finished.
_________________________________________________________________________________
Requirements File Examples:
ME5.req
ME5n.req
_________________________________________________________________________________
Sound Bank File Example:
ME5sfx.asfx
_________________________________________________________________________________
Sound Stream File Example:
ME5n_music.stm
_________________________________________________________________________________
Configuration Files Examples:
ME5sounds.snd
ME5n_music_config.snd
ME5n_music.mus
Later to be addressed:
Addressed in this thread:
- file hierarchy
- audio specifications
- buses
- requirements files
- sound banks
- sound streams
- configuration files
Sound file hierarchy:
--Level file - sound level file
------str - streams, contains list of audio streams - loads *.stm and *.st4 files - must be loaded through the LUA via an OpenAudioStream() line
------lvl - separate sub-levels, allows for separate loading of effects, music, foley, etc. - loads *.req files
----------bnk - sound banks, lists shorter, mono sounds - loads *.sfx and *.asfx files
----------config - sound configuration files - loads *.snd, *.mus and *.ffx files
Recommended sound specifications:
Ambient/music streams: Stereo, 44,100 to 48,000 Hz
Voice over streams: Mono, 22,050 Hz to 32,000 Hz
Effects: Mono, 22,050 to 44,100 Hz
Low-frequency effects: Mono, 10 Hz to 8,000 Hz
Audio buses:
Audio buses are a hierarchy of gain and attenuation controllers for audio. When a bus is attenuated, it is faded to a pre-specified gain whenever audio is sent through the attenuating bus. An example of bus attenuation is whenever in the stock game voice over announcements are played, the rest of the game's audio is faded until the voice over is finished.
Code: Select all
Bus()
{
Name("voiceover"); // the name of the bus
Gain(0.8); // the overall gain of the bus
AttenuateBus("main"); // bus "main" is attenuated whenever audio is sent through this bus
AttenuationLeadIn(0.5); // the amount of time in seconds for the attenuated bus to fade in
AttenuationLeadOut(0.5); // the amount of time in seconds for the attenuated bus to fade out
Attenuation(0.65); // the gain the bus is attenuated by
Parent("ingame"); // the parent bus
//Mute(); // mutes the bus
}Requirements File Examples:
ME5.req
Hidden/Spoiler:
Hidden/Spoiler:
Sound Bank File Example:
ME5sfx.asfx
Hidden/Spoiler:
Sound Stream File Example:
ME5n_music.stm
Hidden/Spoiler:
Configuration Files Examples:
ME5sounds.snd
Hidden/Spoiler:
Hidden/Spoiler:
Hidden/Spoiler:
- Buses [addressed]
- Foley
- Sound design techniques
- Creating your own sound effects
- Resources