Garry's Mod Wiki

Revision Difference

Structures/SoundData#548628

<cat>struct</cat> <structure> <realm>Shared</realm> <description>Table used in <page>sound.Add</page> and <page>sound.GetProperties</page>.</description> <fields> <item name="channel" type="number">The sound channel to play in. See <page>Enums/CHAN</page></item> <item name="name" type="string">The name of the sound.</item> <item name="pitchend" type="number">The pitch end. Deprecated, use pitch.</item>⤶ <item name="pitchstart" type="number">The initial pitch. Deprecated, use pitch.</item>⤶ <item name="level" type="number">The soundlevel of the sound in dB. See <page>Enums/SNDLVL</page>.</item> <item name="pitchstart" type="number">The initial pitch. <warning>Deprecated, use pitch.</warning>⤶ </item> <item name="pitchend" type="number">The pitch end.⤶ <warning>Deprecated, use pitch.</warning>⤶ </item>⤶ ⤶ <item name="level" type="number">The soundlevel of the sound in dB. See <page>Enums/SNDLVL</page>.</item>⤶ <item name="sound" type="string">The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory (must be in a subfolder, so sound/test.wav will not work).</item> <item name="volume" type="number" default="1.0">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`</item> <item name="pitch" type="number" default="100">The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value.</item> </fields> </structure>