This page is incomplete! You can contribute information using GitHub issues or pull requests.

...

Related HaloScript

Function/global

Type

(debug_looping_sound [boolean])

Displays active sound_looping with cyan spheres for their maxmimum distance and blue spheres for their minimum.

Global
(debug_sound [boolean])

Sound sources will be labeled in 3D with their tag path and a their minimum and maximum distances shown as red and yellow spheres, respectively.

Global
(debug_sound_cache [boolean])

If enabled, sound cache statistics will be shown in the top left corner of the screen, including how full it is.

Global
(debug_sound_cache_graph [boolean])

Shows a graph of sound cache slots at the top of the screen, similar to texture_cache_graph. Can be used in Sapien/debug builds.

Global
(debug_sound_channels [boolean])

Displays the utilization of sound channel limits in the top left corner of the screen.

Global
(debug_sound_channels_detail [boolean])

Displays two columns of number pairs while sounds play with an unknown meaning.

Global
(debug_sound_environment [boolean])

If enabled, shows the tag path of the cluster's current sound_environment.

Global
(multiplayer_hit_sound_volume [real])

Sets the gain of the hit sound heard when damage is dealt in multiplayer. Defaults to 0.2.

Global
(sound_cache_dump_to_file)

Writes the sound cache information from debug_sound_cache and a listing of currently cached sounds to sound_cache_dump.txt.

Global
(sound_gain_under_dialog [real])

Controls how quiet non-dialog sounds are when scripted dialog is playing (sound class must be scripted_dialog_other, scripted_dialog_force_player, or scripted_dialog_force_unspatialized). Does not apply to involuntary AI dialog like death/pain lines. Defaults to 0.7. The effect takes about half a second to fade in/out.

Global
(sound_obstruction_ratio [real])

Controls how "muffled" sounds are when heard behind an obstruction like the BSP or an object with collision geometry. Defaults to 0.1. A value of 0 means "not muffled", while a value above about 6 effectively mutes them.

Global

Structure and fields

FieldTypeComments
flagsbitfield
FlagMaskComments
fit to adpcm blocksize0x1
split long sound into permutations0x2
sound classenum

Determines the "type" of sound and how it is treated by the engine. For example, weapon sounds can wake sleeping Grunts and music volume can be adjusted independently. The engine is only capable of playing up to 4 sounds of a sound class simultaneously on high sound settings.

OptionValueComments
projectile impact0x0
projectile detonation0x1
unused0x2
unused10x3
weapon fire0x4
weapon ready0x5
weapon reload0x6
weapon empty0x7
weapon charge0x8
weapon overheat0x9
weapon idle0xA
unused20xB
unused30xC
object impacts0xD
particle impacts0xE
slow particle impacts0xF
unused40x10
unused50x11
unit footsteps0x12
unit dialog0x13
unused60x14
unused70x15
vehicle collision0x16
vehicle engine0x17
unused80x18
unused90x19
device door0x1A
device force field0x1B
device machinery0x1C
device nature0x1D
device computers0x1E
unused100x1F
music0x20
ambient nature0x21
ambient machinery0x22
ambient computers0x23
unused110x24
unused120x25
unused130x26
first person damage0x27
unused140x28
unused150x29
unused160x2A
unused170x2B
scripted dialog player0x2C

Causes non-dialog sounds to temporarily fade out while playing, controlled by sound_gain_under_dialog. This sound class will not play when the player is dead, regardless of how the sound was triggered.

scripted effect0x2D
scripted dialog other0x2E

Causes non-dialog sounds to temporarily fade out while playing, controlled by sound_gain_under_dialog.

scripted dialog force unspatialized0x2F

Causes non-dialog sounds to temporarily fade out while playing, controlled by sound_gain_under_dialog.

unused180x30
unused190x31
game event0x32
sample rateenum
  • Read-only
OptionValueComments
22050 Hz0x0
44100 Hz0x1
minimum distancefloat
  • Unit: world units
maximum distancefloat
  • Unit: world units
skip fractionfloat
random pitch boundsBounds
  • Default: 1,1

This is the base playback rate of the sound, affecting tempo and pitch.

FieldTypeComments
minfloat
maxfloat
inner cone anglefloat
  • Default: 6.28318548202515
outer cone anglefloat
  • Default: 6.28318548202515
outer cone gainfloat
  • Default: 1
random gain modifierfloat
  • Default: 1
  • Max: 1
  • Min: 0

Warning: HEK Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range. H1A Guerilla doesn't have this issue.

maximum bend per secondfloat
zero skip fraction modifierfloat
zero gain modifierfloat
  • Max: 1
  • Min: 0

Warning: HEK Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range. H1A Guerilla doesn't have this issue.

zero pitch modifierfloat
one skip fraction modifierfloat
one gain modifierfloat
  • Max: 1
  • Min: 0

Warning: HEK Guerilla allows you to set this value outside its valid range. Avoid crashes by staying in the valid range. H1A Guerilla doesn't have this issue.

one pitch modifierfloat
channel countenum
  • Read-only
OptionValueComments
mono0x0
stereo0x1
formatenum
  • Read-only
OptionValueComments
16-bit PCM0x0
Xbox ADPCM0x1
IMA ADPCM0x2
Ogg Vorbis0x3
FLAC0x4
promotion soundTagDependency: sound
promotion countuint16
longest permutation lengthuint32
  • Cache only
  • Hidden

natural pitch * seconds * 1100; not set if pitch modifier is set to anything besides 1; not accurate since increasing natural pitch decreases the length uses the 'buffer size' value for 16-bit PCM and Ogg Vorbis (divide by 2 * channel count to get sample count); uses entire size of samples for ADPCM (multiply by 130 / 36 * channel count to get sample count)

unknown ffffffff 0uint32
  • Cache only
unknown ffffffff 1uint32
  • Cache only
pitch rangesBlock
  • HEK max count: 8
  • Read-only
  • Processed during compile
FieldTypeComments
nameTagString
natural pitchfloat
  • Default: 1

This is the base pitch for this pitch range. When the pitch bend is equal to this, then the audio is played at normal pitch and speed. Note that 0 defaults to 1.

bend boundsBounds?

This is the minimum and maximum bend in which this pitch range will be used. If the lower bound is higher than natural pitch, then it will be set to natural pitch. Also, if the higher bound is lower than natural pitch, then it will be set to natural pitch.

actual permutation countuint16
  • Read-only

This is the number of actual permutations in the pitch range, not including chunks due to splitting.

playback ratefloat
  • Cache only
unknown ffffffff 0uint32
  • Cache only
unknown ffffffff 1uint32
  • Cache only
permutationsBlock
  • HEK max count: 256
  • Read-only
  • Processed during compile
FieldTypeComments
nameTagString
  • Read-only
skip fractionfloat
  • Min: 0
  • Max: 1
gainfloat
  • Min: 0
  • Max: 1
  • Default: 1
formatenum?
  • Read-only
next permutation indexuint16
  • Read-only
samples pointeruint32
  • Cache only
tag id 0uint32
  • Cache only

Set to the sound tag's tag ID

buffer sizeuint32
  • Read-only

this is the buffer size used to hold (and, for Vorbis, decompress) the 16-bit PCM data (unused in Xbox ADPCM)

tag id 1uint32
  • Cache only

Set to the sound tag's tag ID

samplesTagDataOffset
  • Read-only
FieldTypeComments
sizeuint32
externaluint32
file offsetuint32
pointerptr64
mouth dataTagDataOffset?
  • Read-only
subtitle dataTagDataOffset?
  • Read-only

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • InfernoPlus (Discovering scripted player dialog class does not play when dead)
  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)
  • Neo (Researching global sound_gain_under_dialog)