Garry's Mod Wiki

SoundData

Description

Table used in sound.Add and sound.GetProperties.

Members

string sound
Path to the sound file to be used in this sound effect, relative to sound/ directory (so exclude the sound/ part).

Can be a table of sound files, in which case the sound will be chosen randomly every time from the provided list.

Each sound path can be prepended with a special character for special effects. You can learn more about this here.

string name
The name of the soundscript, to be referenced by in functions such as Entity:EmitSound.
number channel
The sound channel to play in. See CHAN enum
number level
The soundlevel of the sound in dB. See SNDLVL enum. This will affect how far the sound can be heard.
number volume
The volume of the sound as a decimal between 0 and 1. Can be a table of two numbers, a minimum and a maximum value.

Warning: Volume of 0 will act as volume of 1

Default: 1.0

number pitch
The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.

Default: 100

number pitchstart
The initial pitch.
Deprecated, use pitch.
number pitchend
The pitch end.
Deprecated, use pitch.