Editing
EDF sound reference
(section)
From Eternity Wiki
Jump to navigation
Jump 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.
Anti-spam check. Do
not
fill this in!
==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. 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. Environmental sequences are set up similarly with sector sequences, by placing thing types #1200 to #1300 anywhere inside the map. #1200 to #1299 use the last two digits to designate the number, while #1300 uses the first ExtraData argument. '''NOTE:''' You can include all '''soundsequence''' blocks inside a '''ESNDSEQ''' lump. It will be loaded automatically at game startup, independent of '''EDFROOT'''. ===Syntax=== soundsequence <mnemonic> { id <number> cmds { <string>, ... } commands <heredoc string> type <sequence type> stopsound <sound mnemonic> attenuation <attenuation type> randomplayvol <boolean> volume <number> minvolume <number> nostopcutoff <boolean> doorsequence <sound sequence mnemonic> platsequence <sound sequence mnemonic> floorsequence <sound sequence mnemonic> ceilingsequence <sound sequence mnemonic> } ===Parameters=== The fields are as follows: *'''id''' :''Default:'' -1 :Sets up the sound sequence number to recognize it in maps. Environmental sequences use a different namespace from sector ones, and sector sequences can be separated in door, platform and general sequences (see below) *'''cmds''' :''Default:'' { "end" } :'''(Deprecated)''' The list of Hexen-style commands to control the playing of sounds. Each command is written as a string, separated with a comma from the others. While this syntax will continue to be supported, it is recommended that new modifications use the heredoc-enabled syntax via the '''commands''' field instead. *'''commands''' :''Default'': @" end "@ :The commands field allows specification of sound sequences in the natural Hexen-derived syntax, without quotations or commas, by embedding the commands one per line inside an EDF heredoc (a literally interpreted string delimited by @" and "@ sequences). This is the recommended method of specification. '''SVN r1420+''' *'''type''' :''Default:'' "sector" :There are four separate namespaces: sector, door, plat and environment. The second is restricted to doors and polys; the third to general moving floors/ceilings and lifts. *'''stopsound''' :''Default:'' "none" :The sound mnemonic to play when the sector stops. Will never happen if this is an environmental sequence. *'''attenuation''' :''Default:'' "normal" :Can be: normal, idle, static, none. *'''randomplayvol''' :''Default:'' false :If set to true, every normal "play" command which doesn't specify a volume will begin at a randomized volume level which may be modified by the user's s_enviro_volume setting. This property exists to support Heretic-compatible global environmental sequence behavior. '''SVN r1420+''' *'''volume''' :''Default'': 127 *'''minvolume''' :''Default:'' -1 *'''nostopcutoff''' :''Default'': false ===Sequence commands=== *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. *playuntildone <sound> : The indicated sound will be played, and the sequence will not move on to the next command or terminate until the sound has finished playing. *playtime <sound> <time> : The indicated sound will be played and the sequence will pause for the number of gametics (35 per second) before moving on to the next command. *playrepeat <sound> : The indicated sound will be played continuously without interruption. This command never ends, so the sequence will not terminate unless something such as a sector action stops it externally. This command should not be used in global environmental sequences. *playloop <sound> <time> : The indicated sound will be played in a loop every "time" gametics. As above, this command will never end. *playabsvol <sound> <vol> : Like the play command, but allows specification of the sound's base volume from 0 to 127. *playrelvol <sound> <vol> : Like the play command, but specifies a volume which is relative to the sound sequence's previous volume setting. *delay <tics> : Stop the sound sequence from progressing for the indicated number of gametics. *delayrand <min> <max> : Delay the sound sequence from progressing for a random number of gametics between and including "min" and "max". *volume <vol> : Set the sequence's current absolute volume level to the indicated value between 0 and 127. *relvolume <vol> : Modify the sequence's current absolute volume level by the indicated amount. The number specified should be negative to make the sequence more quiet. *attenuation <attn> : Set the sequence's attenuation value. This command is executed at game startup and therefore the last one specified is the only one that will take effect. *stopsound <snd> : Set the sequence's stopsound attribute. This command is executed at game startup and therefore the last one specified is the only one that will take effect. *nostopcutoff : Set the sequence's nostopcutoff attribute. This command is executed at game startup and therefore the last one specified is the only one that will take effect. *restart : Restart the current sound sequence. This command should not be used in global environmental sequences. *end : End the sequence. This command is not required by the Eternity Engine, and exists for Hexen compatibility. ===Example=== // 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. soundsequence EEDoorCloseNormal { cmds = { "play EE_DoorOpen", "stopsound EE_DoorClose" } } // This is an environmental sequence for Heretic, which is used by placing a thing of // type 1200 anywhere on the map. It is started by the environmental sequence manager // at random, with the probability of it being played being determined by the proportion // of 1200 objects to other environmental sequence spots on the map. soundsequence EEHticAmbScream { type = environment id = 0 cmds = { "playuntildone ht_amb1" } volume = 96 minvolume = 32 attenuation = none } // This is a sound sequence meant to be played by a PolyObject. It could also use // type sector and would still work, but using type door is more explicit. PolyObjects // always use door-type actions when starting sequences, so they check the door lookup // first for id numbers between 0 and 63. soundsequence PolyDoor { type = door id = 0 cmds = { "play EE_BDoorOpen", "stopsound EE_PlatStop" } } // This is one of the more complicated environmental sequences from sounds.edf. // It plays two alternating footstep sounds every 15 gametics at a constantly // decreasing volume level. soundsequence EEHticSlowFootSteps { type = environment id = 3 cmds = { "playtime ht_amb4 15", "playrelvol ht_amb11 -3", "delay 15", "playrelvol ht_amb4 -3", "delay 15", "playrelvol ht_amb11 -3", "delay 15", "playrelvol ht_amb4 -3", "delay 15", "playrelvol ht_amb11 -3", "delay 15", "playrelvol ht_amb4 -3", "delay 15", "playrelvol ht_amb11 -3", "nostopcutoff" } volume = 96 minvolume = 32 attenuation = none } // Yes, sound sequences can be completely silent :) All fields are defaulting, and // the only command in the command list is "end". soundsequence EEPlatSilent { }
Summary:
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)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information