Sound layering

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Droid Pilot Assassin
User avatar
Posts: 1952
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Legacy

Sound layering

Postby ggctuk » Wed Mar 23, 2016 6:15 am

How exactly does sound layering work? I'm looking at the AT footstep sounds. I'm assuming it's something like having layered dynamic sounds (IE Sound layer A1, B2, C4 may play but then on the step step it might be A3, B6, C1). Have I got this right?

Also, what is the purpose of the "low" sounds? Are they sounds meant to be heard from a distance when you are not near enough to hear the main sounds?

Resistance Leader
User avatar
Posts: 4821
Joined: Tue Feb 09, 2010 8:43 pm
Location: Greater Seattle Area
Projects :: EVERYWHERE
Games I'm Playing :: Dark Souls + TBOI
xbox live or psn: Marth8880

Re: Sound layering

Postby Marth8880 » Wed Mar 23, 2016 4:06 pm

It's just playing multiple sounds at the same time. You can even set a playback delay for each layer.

From soundreadme.txt:

Hidden/Spoiler:
Code: Select all
ObjectID : SoundLayered
-----------------------

Property        | Description
-------------------------------------------------------------------------------
Name            | Name of the layered sound
Layer           | Layer("layerName", "soundName", playbackDelay, playbackDelayDev,
                |       playbackTime, playbackTimeDev).
                | The layer name is a label which allows the layer to be
                | referenced by the application code.  The sound name
                | references the name of a previously defined Sound()
                | which will be used as a layer of the layered sound.
                | The playback delay, is the time to delay the sound
                | (in seconds) from the time the sound is initially triggered.
                | The playback delay deviation (playbackDelayDev) allows
                | the playback delay to be randomly varied over a range.
                | playbackTime is the time to play the layer, if this is not
                | specified the layer will not stop.  Finally, playbackTimeDev
                | is the deviation of the playback time, if this is not specified
                | a deviation of 0.0 is used.
                | Any number of SoundLayers can be specified for a layered sound.

A layered sound (SoundLayered) allows multiple Sounds to be played back at the
same time or with some delay between each sound.

For example...

SoundLayered
{
    Name("grenade_explode");
    Layer("explosion", "grenade_explode", 0.0);
    Layer("gasleak",   "grenade_gas",     0.5, 0.1);
}

The sound "grenade_explode" will be played when the layered sound
"grenade_explode" is triggered (played).  Then 0.4 to 0.6 seconds after the
layered sound "grenade_explode" was triggered, "grenade_gas" will play.


It's also especially useful for layering together weapon sounds with distant variants. Example from MEU:

Hidden/Spoiler:
Code: Select all
SoundProperties()
{
    Name("sniper_rifle_fire_distant");
    Group("weapons_sniper");
    Inherit("me5_weapon_distant_template");
   Gain(0.85);
   RollInDistance(90.0);
   MinDistance(100.0);
   MuteDistance(550.0);
   MaxDistance(550.0);
    SampleList()
    {
        Sample("m_sniper_fire_distant-1", 0.5);
        Sample("m_sniper_fire_distant-2", 0.5);
    }
}

SoundProperties()
{
    Name("sniper_rifle_fire_verydistant");
    Group("weapons_sniper");
    Inherit("me5_weapon_verydistant_template");
   Gain(0.75);
   RollInDistance(150.0);
   MinDistance(175.0);
   MuteDistance(900.0);
   MaxDistance(900.0);
    SampleList()
    {
        Sample("m_sniper_fire_verydistant-1", 0.5);
        Sample("m_sniper_fire_verydistant-2", 0.5);
    }
}

SoundProperties()
{
    Name("m92_sniper_fire-1");
    Group("weapons");
    Inherit("me5_weapon_template");
   Gain(1.0);
   MinDistance(35.0);
   MaxDistance(150.0);
   MuteDistance(150.0);
   Priority(6.0);
    SampleList()
    {
        Sample("m92_fire1", 1.0);
        Sample("m92_fire2", 1.0);
    }
}

SoundProperties()
{
    Name("m92_sniper_fire-2");
    Group("weapons");
    Inherit("me5_weapon_distant_template");
    SampleList()
    {
        Sample("m92_fire-2", 1.0);
    }
}

SoundProperties()
{
    Name("m92_sniper_fire-3");
    Group("weapons");
    Inherit("me5_weapon_verydistant_template");
    SampleList()
    {
        Sample("m92_fire-4", 1.0);
    }
}

SoundLayered()
{
   Name("m92_sniper_fire");
   Layer("m92_fire-1", "m92_sniper_fire-1", 0.0);
   Layer("m92_fire-2", "m92_sniper_fire-2", 0.0);
   Layer("m92_fire-3", "m92_sniper_fire-3", 0.0);
   Layer("m92_fire-4", "sniper_rifle_fire_distant", 0.0);
   Layer("m92_fire-5", "sniper_rifle_fire_verydistant", 0.0);
}


You're essentially correct re: "low" sounds.

Return to All things SWBF1

Who is online

Users browsing this forum: No registered users and 5 guests