Difference between revisions of "Sound and Music"

From Valve Developer Community
Jump to: navigation, search
m (changed 'how to play music' block to better reflect how to play music in source engine.)
 
Line 9: Line 9:
 
'''Sound''' in Source can be processed in many ways. It can emit from a location in the world, have its pitch or volume altered, trigger behaviours from NPCs, and be lip synced.
 
'''Sound''' in Source can be processed in many ways. It can emit from a location in the world, have its pitch or volume altered, trigger behaviours from NPCs, and be lip synced.
  
'''Music''' differs from other sounds in Source only in that its path is prefixed with a '#' character. <code>#sound.wav</code> (or <code>.mp3</code>) is music whereas <code>sound.wav</code> is not.
+
Any sound can be played as '''music''' by prefixing it's path with <code>#/</code>. <code>#/music/sound.wav</code> or <code>#/ui/gamestartup.mp3</code> works.
  
 
== Entities ==
 
== Entities ==

Latest revision as of 22:21, 1 July 2019

Русский
Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | Animals & Creatures | Antlions | Beams & Lasers | Cables & Ropes | Clouds & Sky | Color Theory | Combat | Combine | Doors | Dust, Fog & Smoke | Elevators | Environmental Lighting & Weather | Explosions | Fire | Foliage | Glass | Headcrab | Health | Ladders | Lighting | Optimization | Physics | Retinal scanners | Sound & Music | Special effects | Terrain | Trains | Turrets | Water | Zombie

To do: There needs to be a brief description or link to a tutorial or guide on how to take an existing .wav file and make it accessible to the Hammer Sound Browser or Face Poser.


Sound in Source can be processed in many ways. It can emit from a location in the world, have its pitch or volume altered, trigger behaviours from NPCs, and be lip synced.

Any sound can be played as music by prefixing it's path with #/. #/music/sound.wav or #/ui/gamestartup.mp3 works.

Entities

Articles

AI sounds

  • AI sounds are not audible to the player; they are purely an AI construction. They can be placed in-map with the ai_sound entity.

Music

Materials

To specify the set of sounds for a custom material (the noises produced in response to hits, scrapes, etc), see Material surface properties.

Notes

  • To play music, use Hammer Sound Browser to search for keyword music.
  • Many entities can have sounds assigned to them. For example, prop_door_rotating can be assigned sounds for opening, closing, swinging, being locked, and being unlocked. See the individual entities for details.

See Also

External links