Changes between Initial Version and Version 1 of SoundGroup


Ignore:
Timestamp:
May 22, 2015, 11:56:57 PM (9 years ago)
Author:
s0600204
Comment:

Create page with some information about SoundGroups

Legend:

Unmodified
Added
Removed
Modified
  • SoundGroup

    v1 v1  
     1Sound Groups are collections of sounds for particular purposes, used by Entity Templates.
     2
     3To use them in an entity template, use:
     4{{{
     5  <Sound>
     6    <SoundGroups>
     7      <walk>actor/human/movement/walk.xml</walk>
     8      <run>actor/human/movement/walk.xml</run>
     9      <attack>attack/weapon/sword.xml</attack>
     10      <death>actor/human/death/death.xml</death>
     11    </SoundGroups>
     12  </Sound>
     13}}}
     14
     15A !SoundGroup is defined in the following fashion:
     16{{{
     17<?xml version="1.0" encoding="utf-8" ?>
     18<SoundGroup>
     19        <Gain>1</Gain>
     20        <Priority>80</Priority>
     21        <RandGain>1</RandGain>
     22        <GainUpper>1</GainUpper>
     23        <GainLower>0</GainLower>
     24        <Path>audio/actor/fauna/death</Path>
     25        <Sound>camel_death_10.ogg</Sound>
     26        <Sound>camel_death_11.ogg</Sound>
     27</SoundGroup>
     28}}}
     29
     30=== !SoundGroup Attributes ===
     31
     32==== Sound ====
     33 * '''Required'''
     34 * '''Type''': String
     35 * '''Description''': A file to play, without path. You can have more than one of this entry.
     36
     37==== Path ====
     38 * '''Required'''
     39 * '''Type''': String
     40 * '''Description''': Base path to audio files
     41
     42==== Gain ====
     43 * '''Optional'''
     44 * '''Type''': Float
     45 * '''Default''': 0.7
     46 * '''Description''': Volume of effect in game. 1.0 is full volume, lower values are quieter. Cannot be set higher than 1.0.
     47
     48==== !RandOrder ====
     49 * '''Optional'''
     50 * '''Type''': Boolean Integer
     51 * '''Default''': 0
     52 * '''Description''': If 0, then the sounds will be selected to play in the order defined in the soundgroup. If 1, they will be selected to play at random.
     53
     54==== !RandGain ====
     55 * '''Optional'''
     56 * '''Type''': Boolean Integer
     57 * '''Default''': 0
     58 * '''Description''': If set to 1, then the Gain will be overridden by a value selected at random from between !GainUpper and !GainLower, with a different value being chosen each time a sound in this group is played.
     59
     60==== !GainUpper ====
     61 * '''Optional'''
     62 * '''Type''': Float
     63 * '''Default''': 1.0
     64 * '''Description''': The upper bound of the !RandGain
     65
     66==== !GainLower ====
     67 * '''Optional'''
     68 * '''Type''': Float
     69 * '''Default''': 0.8
     70 * '''Description''': The lower bound of the !RandGain
     71
     72==== Looping ====
     73 * '''Optional'''
     74 * '''Type''': Boolean Integer
     75 * '''Default''': 0
     76 * If set to 1, this sound will loop indefinately.
     77
     78==== Omnipresent ====
     79 * '''Optional'''
     80 * '''Type''': Boolean Integer
     81 * '''Default''': 0
     82 * '''Description''': If set, this soundgroup will be played whether the source is onscreen or not. Volume will be affected by distance between camera and source.
     83
     84==== Distanceless ====
     85 * '''Optional'''
     86 * '''Type''': Boolean Integer
     87 * '''Default''': 0
     88 * '''Description''': If set, this soundgroup will be played whether the source is onscreen or not. Volume will not be affected by distance. Ideal for alerts and global sound effects.
     89
     90==== !HeardBy ====
     91 * '''Optional'''
     92 * '''Type''': String
     93 * Possible Values: "owner"
     94 * '''Default''': Unset/NULL
     95 * '''Description''': Who should hear this sound. If not set, then everyone will hear the sound (distance/on-screen permitting). If set to "owner", then only the owner of the entity making the sound will hear it. No other values are permitted.
     96
     97==== Pitch ====
     98 * '''Optional'''
     99 * '''Type''': Float
     100 * '''Default''': 1.0
     101 * '''Note''': Must be larger than 0
     102 * '''Description''': Desired pitch shift, where 1.0 equals same pitch out as in. Each reduction by 50 percent equals a pitch shift of -12 semitones (one octave reduction). Zero is not a legal value.
     103
     104==== !RandPitch ====
     105 * '''Optional'''
     106 * '''Type''': Boolean Integer
     107 * '''Default''': 0
     108 * '''Description''': Whether or not Random Pitch-Shifting is enabled for this effect
     109
     110==== !PitchUpper ====
     111 * '''Optional'''
     112 * '''Type''': Float
     113 * '''Default''': 1.1
     114 * '''Description''': Upper bound of the Random Pitch Shifting. See description for Pitch.
     115
     116==== !PitchLower ====
     117 * '''Optional'''
     118 * '''Type''': Float
     119 * '''Default''': 0.9
     120 * '''Description''': Lower bound of the Random Pitch Shifting. See description for Pitch.
     121
     122==== Priority ====
     123 * '''Optional'''
     124 * '''Type''': Float
     125 * '''Default''': 60
     126 * '''Description''': The priority of the sound. In cases where there are too many sounds active for the system to play them all, or cases where two sounds need to be started in the same frame, higher priority sounds take precedance.
     127 * '''Recommended values''':
     128   - 100  - emergency use only (undefined overhead)
     129   - 90 - required (voiceover, you are under attack warning)
     130   - 80 - rather important (battle sounds, death, destruction)
     131   - 70 - rather important (building)
     132   - 60 - not so important (resources)
     133   - 50 - fluff (ambient - birds, etc.)
     134
     135==== Cones ====
     136Sounds in 0AD may be directional. This is simulated with the use of two cones, one inside the other. The sound is played at the volume set by <Gain/> inside the inner cone, with the sound attenuating (decreasing) between the edges of the inner and outer cones until it hits the volume set by <ConeGain/>. The direction of the cones are determined by which way the entity making the sound is facing. (Diagram may be needed)
     137
     138===== !ConeGain =====
     139 * '''Optional'''
     140 * '''Type''': Float
     141 * '''Default''': 0
     142 * '''Description''':  This is the volume of the effect outside the directional cone.
     143
     144===== !ConeInner =====
     145 * '''Optional'''
     146 * '''Type''': Float
     147 * '''Default''': 360.0
     148 * '''Description''': Inside angle of the sound cone, in degrees. The default of 360 means that the inner angle covers the entire world, which is equivalent to an omnidirectional source.
     149
     150===== !ConeOuter =====
     151 * '''Optional'''
     152 * '''Type''': Float
     153 * '''Default''': 360.0
     154 * '''Description''': Outer angle of the sound cone, in degrees. The default of 360 means that the outer angle covers the entire world. If the inner angle is also 360, then the zone for angle-dependent attenuation is zero.
     155
     156=== Unused Attributes ===
     157These are not currently used by the Sound Manager (at least as best as this author can tell, anyhow)
     158
     159==== Replacement ====
     160 * '''Optional'''
     161 * '''Type''': String
     162 * '''Remarks''': Haven't a clue what this is/was supposed to be. Clears grammar checks, but not actually read by pyrogenesis, nor is there a space reserved for it in the cpp object.
     163
     164==== Threshold ====
     165 * '''Optional'''
     166 * '''Type''': Float
     167 * '''Default''': 3
     168 * '''Remarks''': Read and stored in the cpp object, but not used.
     169 * '''Description''': Intensity Threshold switching value. The Sound Manager was going to have this concept of "Intensity". Essentially, if you have one gatherer collecting wood, the system will play a (randomly selected from the group) sound effect of a single axe htting wood. A second gatherer joins in, and the system ends up playing two sounds from the same group within a short space of time. As the number of gatherers increases, then the system is suddenly having to play multiple sounds simultaneously from the same group, which apart from potentially not sounding good, isn't good for performance. To keep things simpler for itself, once the sound manager reaches the point where its playing a given amount of sounds or more simultaneously from the same audio group, then it will switch to playing a single sound effect of multiple hits. This value is, as far as I can determine, the threshold at which this group would stop and the one above it would start. The intensity system was never fully implemented, so this value is useless.
     170
     171==== Decay ====
     172 * '''Optional'''
     173 * '''Type''': Float
     174 * '''Default''': 3.0
     175 * '''Remarks''': Read and stored in the cpp object, but not used.