Sound and Music: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (abstract mapping series header)
(→‎Audio files: probably should have this here)
 
(28 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{lang|Sound and Music}}
{{Abstract Mapping}}
{{Abstract Mapping}}
{{cleanup|This article and related articles about Sound are a mess.}}
{{todo|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.
'''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.


== Entities ==
== Entities ==
*[[ambient_generic]] &mdash; this is the basic entity to play a specific sound, including music
*[[ambient_generic]] &mdash; this is the basic entity to play a specific sound or soundscript, including music.
*[[env_soundscape]] plays background noises (see [[Soundscapes]])
*[[ambient_music]] &mdash; {{l4d2}} audio in the music layer, overriding music queued by the AI Director.
*[[env_soundscape]] &mdash; for playing background noises and ambience. (see [[Soundscapes]])
*[[env_soundscape_proxy]] Point entity that acts like a soundscape but gets all of its sound parameters from another [[env_soundscape]] entity.
*[[env_soundscape_proxy]] Point entity that acts like a soundscape but gets all of its sound parameters from another [[env_soundscape]] entity.
*[[env_soundscape_triggerable]] Point entity just like [[env_soundscape]] except that it works in conjunction with the [[trigger_soundscape]] entity to determine when a player hears it.
*[[env_soundscape_triggerable]] Point entity just like [[env_soundscape]] except that it works in conjunction with the [[trigger_soundscape]] entity to determine when a player hears it.
*[[trigger_soundscape]] Brush-based soundscape trigger. Does not need outputs, as it automatically triggers the soundscape specified by its Soundscape property.  
*[[trigger_soundscape]] Brush-based soundscape trigger. Does not need outputs, as it automatically triggers the soundscape specified by its Soundscape property.  
*[[env_microphone]] &mdash; detects sounds
*[[env_microphone]] &mdash; detects sounds.
*[[env_speaker]] &mdash; plays sounds based on a set of [[Response System]] rules
*[[env_speaker]] &mdash; plays sounds based on a set of [[Response System]] rules.
*[[scripted_sentence]] &mdash; used to make an [[NPC]] speak an idea
*[[scripted_sentence]] &mdash; used to make an [[NPC]] speak an idea.
*[[sound_mix_layer]] &mdash; {{l4d2}} used to set a mix layer to a specific value.
*[[logic_choreographed_scene]] &mdash; used for conversations and other sequences. See [[:Category:Choreography]].
*[[logic_choreographed_scene]] &mdash; used for conversations and other sequences. See [[:Category:Choreography]].


== Articles ==
== Articles ==
*[[:Category:Sound System]] &mdash; how sound works in Source
*[[:Category:Sound System]] &mdash; how sound works in Source.
*[[Hammer Sound Browser]] &mdash; documents the [[Hammer]] user interface for browsing sounds
*[[Soundscripts]] &mdash; advanced sound usage in Source.
*[[Soundscapes]] &mdash; background sounds in a map
*[[Sound In Code]]
*[[Sound sensitive trigger]] &mdash; how to trigger an event based on the loudness
*[[Hammer Sound Browser]] &mdash; documents the [[Hammer]] user interface for browsing sounds.
*[[Startup Music]] &mdash; one way to add music to a mod's title screen (alternately, put it in a [[Menu Background Map]])
*[[Soundscapes]] &mdash; background sounds and ambience.
*[[Sound sensitive trigger]] &mdash; how to trigger an event based on the loudness.
*[[Startup Music]] &mdash; one way to add music to a mod's title screen (alternatively, put it in a [[Menu Background Map]]).


== AI sounds ==
== AI sounds ==
Line 27: Line 33:


== Music ==
== Music ==
* [[Music Composition]] - software synthesizers and other audio tools
* [[Creating your own music]] &mdash; composing and adding music to a mod.
* [[Soundtrack lists]] &mdash; for using existing music already included in the base game


== Materials ==
== Materials ==
To specify the set of sounds for a custom [[:Category:Material System|material]] (the noises produced in response to hits, scrapes, etc), see [[Material surface properties]].
To specify the set of sounds for a custom [[:Category:Material System|material]] (the noises produced in response to hits, scrapes, etc), see [[Material surface properties]].
== Audio files ==
* [[MP3]]
* [[WAV]]
* [[XWV]]


== Notes ==
== Notes ==
*To play music, use [[Hammer Sound Browser]] to search for keyword <code>music</code>.
* To play music, use [[Hammer Sound Browser]] to search for keyword <code>music</code>.
*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 [[list of entities|entities]] for details.
* 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 [[list of entities|entities]] for details.
* To make audio files affected by the music slider, add the [[Soundscripts#Sound_Characters|{{code|#}} character]] before the file path when declaring (ex {{code|"#music/HL2_song20_submix0.mp3"}})
* Although Source supports surround sound, it cannot read audio files containing more than two channels. Surround effects should be either downmixed to stereo, implemented using [[soundscape]] targets or [[ambient_generic]] entities, or worked around using carefully placed [[scene]] actors.


== See Also ==
== See also ==
* [[:Category: Level Design]]
* [[Level Design]]
* [[L4D_Soundscripts|Left 4 Dead Soundscripts]]
* [[L4D_Soundscripts|Left 4 Dead Soundscripts]]


== External links ==
== External links ==
* [http://www.youtube.com/watch?v=CxVxeGYh618 Custom sounds tutorial]
<!-- the following links are not valid.
*[http://halflifestorm.com/?page_id=160 Adding Sounds into your Maps] - Tutorial
*[http://halflifestorm.com/?page_id=160 Adding Sounds into your Maps] - Tutorial
*[http://halflifestorm.com/?page_id=170 Triggering sounds in your Maps] - Tutorial
*[http://halflifestorm.com/?page_id=170 Triggering sounds in your Maps] - Tutorial
-->
<!-- SDK nuts has closed. When (and if) this tutorial is ported onto the VDC, please link to it instead!
<!-- SDK nuts has closed. When (and if) this tutorial is ported onto the VDC, please link to it instead!
*[http://www.sdknuts.net/akg/?sdk=tutarts Art & Sound] &mdash; tutorials about sound in Source, including adding custom sounds {{TODO|replace with list of sound tutorials}}
*[http://www.sdknuts.net/akg/?sdk=tutarts Art & Sound] &mdash; tutorials about sound in Source, including adding custom sounds {{TODO|replace with list of sound tutorials}}
Line 48: Line 66:


[[Category:Sound System]]
[[Category:Sound System]]
[[Category:Hubs]]

Latest revision as of 16:23, 2 May 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)
Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | List of HL2 Animals and Creatures | Mapping with Antlions | Beams and Lasers | Cables and Ropes | Moving Clouds | Color Theory in Level Design | Combat | Combine | Compression (Source 1) | Doors | Dust, Fog, & Smoke | Elevators | Level Transitions | Environmental Lighting, Sun, Weather, & Outdoors | Explosions | Fire | Half-Life 2 Foliage | Glass & Windows | Headcrab | Health | Ladders | Lighting | Optimization (level design) | Physics | Retinal scanners | Sound and Music | Special effects | Terrain | Trains | Turrets | Water | Weapons | Zombie

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
This article and related articles about Sound are a mess.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Todo: 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.

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.

Audio files

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.
  • To make audio files affected by the music slider, add the # character before the file path when declaring (ex "#music/HL2_song20_submix0.mp3")
  • Although Source supports surround sound, it cannot read audio files containing more than two channels. Surround effects should be either downmixed to stereo, implemented using soundscape targets or ambient_generic entities, or worked around using carefully placed scene actors.

See also

External links