Editing EDF sound reference

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
==Sounds==
The [[EDF]] '''Sound''' block defines sounds to be used in the game. They are linked to the sound lumps included in wads, and the default Doom and Heretic entries have the same names as the lumps, minus the DS prefix (for Doom).
The [[EDF]] '''Sound''' block defines sounds to be used in the game. They are linked to the sound lumps included in wads, and the default Doom and Heretic entries have the same names as the lumps, minus the DS prefix (for Doom).
{{backto|EDF}}
{{backto|EDF}}


===Syntax===
==Syntax==
  sound <mnemonic>
  sound <mnemonic>
  {
  {
Line 24: Line 23:
   dehackednum    <number>
   dehackednum    <number>
  }
  }
===Fields===
==Fields==
*'''lump'''
*'''lump'''
:The <code>lump</code> field indicates the lump name that this sound resource will have in WAD or PKE files. If the <code>prefix</code> field below is <code>true</code>, the prefix "DS" will be appended to this name when looking for the sound. Otherwise, this name will be used exactly as it is provided. In the event a sound is not found, a default sound for the current game mode (DSPISTOL in DOOM, GLDHIT in Heretic) will be played instead.
:Default: If a value is not provided to this field, then this sound's mnemonic will be copied directly to this field. In this case, the default value for the prefix field becomes "true". This means that the mnemonic will be prefixed with the "DS" prefix to construct the final sound lump name. If an explicit value is provided to this field, then the default value of the prefix field becomes "false". This means the lump name, as provided, becomes the final sound lump name and will not be prefixed in any way.
:If you use [[PKE]] archives and the sound name is longer than 8 characters, you ''must'' use the long file name format. The long file name is done by the following rules:
:The lump field indicates the lump name that this sound resource will have in WAD files. If the prefix field below is true, the prefix "DS" will be appended to this name when looking for the sound. Otherwise, this name will be used exactly as it is provided. In the event a sound is not found, a default sound for the current game mode (DSPISTOL in DOOM, GLDHIT in Heretic) will be played instead.
:*/ (slash) ''must'' be added at the beginning of the path.
:*The full path, including extension, inside the PKE must be used.
:*It must be lowercase, even if it has different capitalization in the PKE.
:*It is mandatory to put quotes around the path.
:Long file name example: <code>lump "/sounds/soundname1.snd"</code> for a sound file of <code>sounds/SoundName1.snd</code> inside the PKE archive.
:If a value is not provided to this field, then this sound's mnemonic will be copied directly to this field. In this case, the default value for the <code>prefix</code> field becomes <code>true</code>. This means that the mnemonic will be prefixed with the "DS" prefix to construct the final sound lump name. If an explicit value is provided to this field, then the default value of the prefix field becomes <code>false</code>. This means the lump name, as provided, becomes the final sound lump name and will not be prefixed in any way.  
*'''prefix'''
*'''prefix'''
:Default = Depends on presence of lump field
:Default = Depends on presence of lump field
Line 49: Line 42:
:This field establishes a relative priority for this sound. When sounds must be stopped in order to start new ones, those with the lowest priority will be replaced first. Priority scales down with distance, so sounds playing at higher volume or closer to the player have priority over quieter and more distant sounds. Please note carefully that a higher value in this field means a lower priority. So 0 is the highest priority possible, and 255 is the lowest priority (priorities lower than 255 will be capped into range).
:This field establishes a relative priority for this sound. When sounds must be stopped in order to start new ones, those with the lowest priority will be replaced first. Priority scales down with distance, so sounds playing at higher volume or closer to the player have priority over quieter and more distant sounds. Please note carefully that a higher value in this field means a lower priority. So 0 is the highest priority possible, and 255 is the lowest priority (priorities lower than 255 will be capped into range).
*'''link'''
*'''link'''
:Default = '''none'''
:Default = "none"
:This field links this sound definition to another existing sound definition. Its value must either be '''none''' or another valid sound mnemonic. When a linked sound is played, the sound that is linked to will be played instead, using the '''linkvol''' and '''linkpitch''' parameters provided in ''this'' sound entry. All parameters for playing the sound, including priority, singularity, pitch variance, and clipping distances come from ''this'' sound definition, and not from the sound to which this one is linked. Thus this option can be used to define a modified sound derived from another sound.
:This field links this sound definition to another existing sound definition. Its value must either be "none," or another valid sound mnemonic. When a linked sound is played, the sound that is linked to will be played instead, using the linkvol and linkpitch parameters provided in this sound entry. All parameters for playing the sound, including priority, singularity, pitch variance, and clipping distances come from this sound definition, and not from the sound to which this one is linked.
*'''alias'''
*'''alias'''
:Default = "none"
:Default = "none"
Line 56: Line 49:
*'''random'''
*'''random'''
:Default = no list
:Default = no list
:This fields allows this sound to have random alternatives when it's played. Include the list of sound mnemonics, separated by commas (curly braces around the list are optional).
:This fields allows this sound to have random alternatives when it's played. Include the list of sound mnemonics, separated by commas, within curly braces.
*'''skinindex'''
*'''skinindex'''
:Default = ''sk_none''
:Default = ''sk_none''
Line 75: Line 68:
:This field provides a value to be added to the sound's volume when a linked sound is played through this sound definition. Volume range is from 0 to 127, but this field may be any value. The resulting value when added to the base volume will be capped into range. For example, if a sound normally plays at full volume, specifying a negative value in this field will reduce the volume.
:This field provides a value to be added to the sound's volume when a linked sound is played through this sound definition. Volume range is from 0 to 127, but this field may be any value. The resulting value when added to the base volume will be capped into range. For example, if a sound normally plays at full volume, specifying a negative value in this field will reduce the volume.
*'''linkpitch'''
*'''linkpitch'''
:Default = 128 (normal)
:Default = 127 (normal)
:This field provides a pitch value to be used when a linked sound is played through this sound definition. Pitch values should be between 0 and 255 when provided.
:This field provides a pitch value to be used when a linked sound is played through this sound definition. Pitch values should be between 0 and 255 when provided.
*'''clipping_dist'''
*'''clipping_dist'''
Line 84: Line 77:
:This value specifies the distance from the origin at which this sound will be at full volume. Attenuation between the clipping_dist and close_dist values is currently always linear. The sound engine currently only considers an approximate distance on the X-Y plane, so this behavior may be slightly more rough than expected. The value of this field should be less than the value of the clipping_dist field above. If not, the sound will always be played at full volume (this can be intentionally exploited).
:This value specifies the distance from the origin at which this sound will be at full volume. Attenuation between the clipping_dist and close_dist values is currently always linear. The sound engine currently only considers an approximate distance on the X-Y plane, so this behavior may be slightly more rough than expected. The value of this field should be less than the value of the clipping_dist field above. If not, the sound will always be played at full volume (this can be intentionally exploited).
*'''pitchvariance'''
*'''pitchvariance'''
:Default = '''none'''
:Default = none
:This field allows specification of the type of pitch variation this sound plays with when pitched sounds are enabled. The following values are allowed:  
:This field allows specification of the type of pitch variation this sound plays with when pitched sounds are enabled. The following values are allowed:  
:*'''none'''           -- No pitch variation
:*none            -- No pitch variation
:*'''Doom'''           -- Pitch variation similar to that used in DOOM v1.1 for most sounds
:*Doom            -- Pitch variation similar to that used in DOOM v1.1 for most sounds
:*'''DoomSaw'''         -- Pitch variation similar to that used for saw sounds in DOOM v1.1.
:*DoomSaw        -- Pitch variation similar to that used for saw sounds in DOOM v1.1.
:*'''Heretic'''         -- Pitch variation similar to that used in Heretic
:*Heretic        -- Pitch variation similar to that used in Heretic
:*'''HereticAmbience''' -- Pitch variation similar to that used in Heretic for global ambience.
:*HereticAmbience -- Pitch variation similar to that used in Heretic for global ambience.
:In general, DOOM types provide less variation than Heretic types. Note that Eternity has now repaired some bugs in the BOOM sound pitch variation code, and so the effect works much better than it did previously.
:In general, DOOM types provide less variation than Heretic types. Note that Eternity has now repaired some bugs in the BOOM sound pitch variation code, and so the effect works much better than it did previously.
*'''subchannel'''
*'''subchannel'''
Line 112: Line 105:
:Default = -1
:Default = -1
:In order to be accessible to Dehacked patches, a sound definition must be given a unique DeHackEd number. The value zero is reserved and cannot be used. In order to avoid conflict, and to remain compatible with future versions of the Eternity Engine, user sounds should either use DeHackEd numbers between 10000 and 32768, or simply use the value -1 if no thing/frame or DeHackEd access is necessary.
:In order to be accessible to Dehacked patches, a sound definition must be given a unique DeHackEd number. The value zero is reserved and cannot be used. In order to avoid conflict, and to remain compatible with future versions of the Eternity Engine, user sounds should either use DeHackEd numbers between 10000 and 32768, or simply use the value -1 if no thing/frame or DeHackEd access is necessary.
 
==Example==
===Example===
  # Define some new sounds
  # Define some new sounds
  # This one is only accessible via scripting because it doesn't have a DeHackEd number.
  # This one is only accessible via scripting because it doesn't have a DeHackEd number.
Line 174: Line 166:
   
   
  sound Explosion { alias = explod }
  sound Explosion { alias = explod }
 
=Soundsequence=
==Sound sequences==
Sound sequences are effects that play while a sector is moving, a polyobject is moving, or when a Heretic-style (environmental) ambient sound is under way. Similar to things, frames or individual sounds, sequences are defined in EDF by using the '''soundsequence''' block. The mnemonic must be at most 32 characters long. Sound sequence definitions can be cascaded, and the latter ones will overwrite other identically named sequences.
Sound sequences are effects that play while a sector is moving, a polyobject is moving, or when a Heretic-style (environmental) ambient sound is under way. Similar to things, frames or individual sounds, sequences are defined in EDF by using the '''soundsequence''' block. The mnemonic must be at most 32 characters long. Sound sequence definitions can be cascaded, and the latter ones will overwrite other identically named sequences.


Sector movement sequences are used by placing thing types #1400 to #1500 on the map, inside the designated sectors. The ones numbered from #1400 to #1499 will play the sequence with the '''id''' between 0 and 99, while #1500 will use its first argument in the [[ExtraData]] definition.
Sector movement sequences are used by placing thing types #1400 to #1500 on the map, inside the designated sectors. The ones numbered from #1400 to #1499 will play the sequence with the '''id''' between 0 and 99, while #1500 will use its first argument in the [[ExtraData]] definition.
In [[UDMF]], sequences can be set directly on sector properties, removing the need for placing things inside.


Polyobject sequences are set up from the [[Polyobject_linedef_types|Polyobj_StartLine and Polyobj_ExplicitLine]] ExtraData linedef specials. '''Polyobj_StartLine''' uses the 3rd argument for this, while '''Polyobj_ExplicitLine''' uses the 4th.
Polyobject sequences are set up from the [[Polyobject_linedef_types|Polyobj_StartLine and Polyobj_ExplicitLine]] ExtraData linedef specials. '''Polyobj_StartLine''' uses the 3rd argument for this, while '''Polyobj_ExplicitLine''' uses the 4th.
Line 188: Line 177:
'''NOTE:''' You can include all '''soundsequence''' blocks inside a '''ESNDSEQ''' lump. It will be loaded automatically at game startup, independent of '''EDFROOT'''.
'''NOTE:''' You can include all '''soundsequence''' blocks inside a '''ESNDSEQ''' lump. It will be loaded automatically at game startup, independent of '''EDFROOT'''.


===Syntax===
==Syntax==


  soundsequence <mnemonic>
  soundsequence <mnemonic>
Line 208: Line 197:
  }
  }


===Parameters===
==Parameters==
The fields are as follows:
The fields are as follows:


Line 248: Line 237:
:''Default'': false
:''Default'': false


===Sequence commands===
==Sequence commands==
*play <sound>
*play <sound>
: The indicated sound will be played but the sequence will not delay in moving to the next command. If this is the last sound in the sequence, the sound might be cutoff unless other properties prevent this.
: The indicated sound will be played but the sequence will not delay in moving to the next command. If this is the last sound in the sequence, the sound might be cutoff unless other properties prevent this.
Line 281: Line 270:
*end
*end
: End the sequence. This command is not required by the Eternity Engine, and exists for Hexen compatibility.
: End the sequence. This command is not required by the Eternity Engine, and exists for Hexen compatibility.
 
==Example==
===Example===
  // This is a sequence playable by name only. It is one of the default sector sequences
  // This is a sequence playable by name only. It is one of the default sector sequences
  // defined in sounds.edf, and is used by Heretic doors when they close.
  // defined in sounds.edf, and is used by Heretic doors when they close.
Line 361: Line 349:
  }
  }


==Ambience==
=Ambience=
'''Ambience''' sections allow the user to define the behavior of ambient sound spots, which can be placed on maps using DoomEd numbers 14001 through 14065. The first 64 of these objects automatically use the ambience sections with numeric indexes 1 through 64. Object 14065 accepts the index number in its first argument field, which may be specified either through the use of ExtraData via the Hexen map format or via the upcoming UDMF format.
'''Ambience''' sections allow the user to define the behavior of ambient sound spots, which can be placed on maps using DoomEd numbers 14001 through 14065. The first 64 of these objects automatically use the ambience sections with numeric indexes 1 through 64. Object 14065 accepts the index number in its first argument field, which may be specified either through the use of ExtraData via the Hexen map format or via the upcoming UDMF format.


===Syntax===
==Syntax==
  ambience
  ambience
  {
  {
Line 377: Line 365:
  }
  }


===Usage===
==Usage==
*'''sound'''
*'''sound'''
:Default = "none"
:Default = "none"
Line 411: Line 399:
:Default = 35
:Default = 35
:For random ambience definitions, this field defines the longest wait period before the sound will be restarted. The ambience object will wait a period of time somewhere between minperiod and maxperiod gametics, inclusive. For proper behavior, maxperiod should be a number greater than minperiod.
:For random ambience definitions, this field defines the longest wait period before the sound will be restarted. The ambience object will wait a period of time somewhere between minperiod and maxperiod gametics, inclusive. For proper behavior, maxperiod should be a number greater than minperiod.
===Example===
==Example==
  ambience
  ambience
  {
  {
Line 442: Line 430:
  }
  }


==Environmental Sequence Manager==
=Environmental Sequence Manager=
EDF can alter basic properties of the environmental ambience sound sequence manager. This system runs in every level and randomly chooses environmental sequences to play based on what objects with DoomEd numbers 1200 through 1300 are present on the level (these objects are collected in much the same way as Boss Brain spots or D'Sparil's teleport landings). The probability of a given sequence playing on any particular event is determined solely by how many objects on the level specify that sequence as compared to the total number of objects.  
EDF can alter basic properties of the environmental ambience sound sequence manager. This system runs in every level and randomly chooses environmental sequences to play based on what objects with DoomEd numbers 1200 through 1300 are present on the level (these objects are collected in much the same way as Boss Brain spots or D'Sparil's teleport landings). The probability of a given sequence playing on any particular event is determined solely by how many objects on the level specify that sequence as compared to the total number of objects.  


There can be any number of enviromanager blocks specified, but only the values in the last one parsed will be used.  
There can be any number of enviromanager blocks specified, but only the values in the last one parsed will be used.  


===Syntax===
==Syntax==
  enviromanager
  enviromanager
  {
  {
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: