Es/Soundscape: Difference between revisions

From Valve Developer Community
< Es
Jump to navigation Jump to search
m (Nesciuse moved page Soundscape/es to Es/Soundscape over redirect: Language prefixes)
m (-Using L template for links)
Line 5: Line 5:
Solo puede estar funcionando una entidad soundscape al mismo tiempo y dicho sonido individual no puede controlarse mediante inputs. Al activarse otro soundscape el juego las cruzará entre una y otra.
Solo puede estar funcionando una entidad soundscape al mismo tiempo y dicho sonido individual no puede controlarse mediante inputs. Al activarse otro soundscape el juego las cruzará entre una y otra.
<!--
<!--
{{tip|Cross fade time is defined by the [[convar]] <code>soundscape_fadetime</code>.}}
{{tip|Cross fade time is defined by the {{L|convar}} <code>soundscape_fadetime</code>.}}


{{tip|Use the [[convar]] <code>soundscape_debug</code> to examine which soundscape is active and why.}}
{{tip|Use the {{L|convar}} <code>soundscape_debug</code> to examine which soundscape is active and why.}}


{{note|Soundscapes will not work if the map has not been compiled with VVIS, at least in "-fast" mode.}}
{{note|Soundscapes will not work if the map has not been compiled with VVIS, at least in "-fast" mode.}}


{{note|Sound files will not properly loop unless they have a cue point. See [[Looping a Sound]].}}
{{note|Sound files will not properly loop unless they have a cue point. See {{L|Looping a Sound}}.}}


{{note|In most ''Source'' engine branches, soundscapes cannot play two of the same sounds, even if the pitch, the volume or the sound level is different. See below for possible solutions.}}
{{note|In most ''Source'' engine branches, soundscapes cannot play two of the same sounds, even if the pitch, the volume or the sound level is different. See below for possible solutions.}}


{{note|At least one soundscape radius should cover the [[info_player_start]] or whatever game specific [[:Category:player spawn entities|player spawn entities]] you have, else the players will spawn without loading any soundscape until they trigger a Soundscape.}}
{{note|At least one soundscape radius should cover the {{L|info_player_start}} or whatever game specific {{LCategory|player spawn entities}} you have, else the players will spawn without loading any soundscape until they trigger a Soundscape.}}


== Browsing Soundscapes ==
== Browsing Soundscapes ==
Line 36: Line 36:


Soundscapes can only be configured through these entities:
Soundscapes can only be configured through these entities:
*[[env_soundscape]]
*{{L|env_soundscape}}
*[[env_soundscape_triggerable]]
*{{L|env_soundscape_triggerable}}
There are other entities which can activate the soundscape, but these are the only entities which actually define soundscape properties. The other entities will point to these and use them as masters to remotely trigger the soundscape.
There are other entities which can activate the soundscape, but these are the only entities which actually define soundscape properties. The other entities will point to these and use them as masters to remotely trigger the soundscape.
Whenever these entities activate a soundscape, any positional audio will originate from the targets defined under their properties.{{tip| Many soundscapes define positions for sounds to emanate from, so it is always a good idea to  peek into the soundscape entry and get a feel for what you can do. Most entries are found in the text files listed in the <code><game>/scripts/soundscapes_manifest.txt</code> file. To better understand soundscape entries, [[Soundscape#Creating_Soundscapes|see below]].}}
Whenever these entities activate a soundscape, any positional audio will originate from the targets defined under their properties.{{tip| Many soundscapes define positions for sounds to emanate from, so it is always a good idea to  peek into the soundscape entry and get a feel for what you can do. Most entries are found in the text files listed in the <code><game>/scripts/soundscapes_manifest.txt</code> file. To better understand soundscape entries, [[Soundscape#Creating_Soundscapes|see below]].}}
Line 49: Line 49:
Estas entidades pueden ser activadas por las siguientes:
Estas entidades pueden ser activadas por las siguientes:


*[[env_soundscape:es|env_soundscape]]
*{{L|env_soundscape}}
*[[env_soundscape_triggerable:es|env_soundscape_triggerable]] (activada normalmente por [[trigger_soundscape:es|trigger_soundscape]].)
*{{L|env_soundscape_triggerable}} (activada normalmente por {{L|trigger_soundscape}}.)
*[[env_soundscape_proxy:es|env_soundscape_proxy]] (activa una env_soundscape o env_soundscape_triggerable.)
*{{L|env_soundscape_proxy}} (activa una env_soundscape o env_soundscape_triggerable.)


Las entidades soundscape están [[point_entities:es|basadas en un punto]], pero se activan cuando el jugador entra en dicho radio de acción.
Las entidades soundscape están {{L|point_entities|basadas en un punto}}, pero se activan cuando el jugador entra en dicho radio de acción.


Las dos excepciones a esto son env_soundscape_proxy (que se activa cuando env_soundscape o env_soundscape_triggerable) y env_soundscape_triggerable (que también suele activarse cuando se activa trigger_soundscape).
Las dos excepciones a esto son env_soundscape_proxy (que se activa cuando env_soundscape o env_soundscape_triggerable) y env_soundscape_triggerable (que también suele activarse cuando se activa trigger_soundscape).
Line 63: Line 63:




{{tip|Use the [[convar]] [[soundscape_debug]] to examine which entity is active and why.}}
{{tip|Use the {{L|convar}} {{L|soundscape_debug}} to examine which entity is active and why.}}




Line 82: Line 82:
{{clarify|¿Se ha corregido esto en alguna prescisión de CS:GO?}}
{{clarify|¿Se ha corregido esto en alguna prescisión de CS:GO?}}


Una posible solcuión es crear una copia del primer sonido y llamarla distinto. Esto puede valer para sonidos cortos, pero no se recomeienda para todos los casos. Esta es la solución que Valve ha usado  ''cs_militia'', en [[Counter-Strike:_Source:es|Counter-Strike Source]]. En la cocina , hay dos tubos fluorescentes con un zumbido, pero el primero es «<code>ambient/machines/fluorescent_hum_1.wav</code>» y el segundo «<code>ambient/machines/fluorescent_hum_2.wav</code>». Ambos son completamente idéncitos, pero deeare completely identical, but need to be two different name in order to be used in the same soundscape.
Una posible solcuión es crear una copia del primer sonido y llamarla distinto. Esto puede valer para sonidos cortos, pero no se recomeienda para todos los casos. Esta es la solución que Valve ha usado  ''cs_militia'', en {{L|Counter-Strike:_Source|Counter-Strike Source}}. En la cocina , hay dos tubos fluorescentes con un zumbido, pero el primero es «<code>ambient/machines/fluorescent_hum_1.wav</code>» y el segundo «<code>ambient/machines/fluorescent_hum_2.wav</code>». Ambos son completamente idéncitos, pero deeare completely identical, but need to be two different name in order to be used in the same soundscape.


Otro ejemplo es la siguiente situación. Tenemos 3 luces fluorescentes y queremos sonidos en su ubicación. Para que funcione correctamente el soundscape y las entidades Hammer deben configurarse.
Otro ejemplo es la siguiente situación. Tenemos 3 luces fluorescentes y queremos sonidos en su ubicación. Para que funcione correctamente el soundscape y las entidades Hammer deben configurarse.
Line 125: Line 125:
Despite the fact that most Source engine branches cannot play more than one identical sound at once, in some situations, it appears that it is possible to play the same sound multiple time at different locations using channels.
Despite the fact that most Source engine branches cannot play more than one identical sound at once, in some situations, it appears that it is possible to play the same sound multiple time at different locations using channels.
After many tests in various situations and source code exploration, it seems to be possible by using different channels. For example, instead of using different names, we use different channels like <code>CHAN_STATIC</code>, <code>CHAN_STREAM</code>, <code>CHAN_AUTO</code>, etc. For an unknown reason at the moment, this won't work every time or for each time the map is loaded.
After many tests in various situations and source code exploration, it seems to be possible by using different channels. For example, instead of using different names, we use different channels like <code>CHAN_STATIC</code>, <code>CHAN_STREAM</code>, <code>CHAN_AUTO</code>, etc. For an unknown reason at the moment, this won't work every time or for each time the map is loaded.
See [[Soundscript]] for more information.
See {{L|Soundscript}} for more information.


== Custom Soundscapes ==
== Custom Soundscapes ==
Line 131: Line 131:
=== Creation ===
=== Creation ===


Soundscape scripts are very similar to [[soundscripts]], but still remain entirely different things.
Soundscape scripts are very similar to {{L|soundscripts}}, but still remain entirely different things.


Soundscapes require a few of their own rules, and are placed in plain text files that are separate from normal soundscript files. A typical soundscape file might be named <code>soundscape_mall.txt</code> and may contain anywhere from 5-30 different soundscapes that take on the following format.
Soundscapes require a few of their own rules, and are placed in plain text files that are separate from normal soundscript files. A typical soundscape file might be named <code>soundscape_mall.txt</code> and may contain anywhere from 5-30 different soundscapes that take on the following format.
Line 149: Line 149:


=== Common keyvalues ===
=== Common keyvalues ===
; <code>wave <[[string]]></code>
; <code>wave <{{L|string}}></code>
: The path and filename of the sound to play, relative to <code>game\sound\</code>.
: The path and filename of the sound to play, relative to <code>game\sound\</code>.
; <code>volume <[[normal]]></code>
; <code>volume <{{L|normal}}></code>
: 1 is full power, 0 is silent.
: 1 is full power, 0 is silent.
; <code>pitch <[[integer]]></code>
; <code>pitch <{{L|integer}}></code>
: Percentage value. 70-130 is the useful range.
: Percentage value. 70-130 is the useful range.
[[File:Sound_attenuation.jpg|right|200px]]
[[File:Sound_attenuation.jpg|right|200px]]
Line 162: Line 162:
; <code>origin <origin></code> {{l4d|since}}
; <code>origin <origin></code> {{l4d|since}}
: Plays a sound at this origin, for example <tt>"0,0,0"</tt>. The coordinates must be comma-delimited but may contain preceding and following spaces. {{note|Similar to <code>position</code> but the script itself decides where to play this sound. Only useful for soundscapes intended for one single map, because on other maps you won't have any way of changing the location of the sound.}}
: Plays a sound at this origin, for example <tt>"0,0,0"</tt>. The coordinates must be comma-delimited but may contain preceding and following spaces. {{note|Similar to <code>position</code> but the script itself decides where to play this sound. Only useful for soundscapes intended for one single map, because on other maps you won't have any way of changing the location of the sound.}}
; <code>attenuation <[[float]]></code>
; <code>attenuation <{{L|float}}></code>
: How quickly the sound's volume drops as the camera moves away from it. Only relevant with a <code>position</code> specified. Default value is: "1.00". The lower the value is, greater the radius of the sound will be. And the opposite, higher the value is, smaller the radius of the sound will be. See the image above for illustrated example.
: How quickly the sound's volume drops as the camera moves away from it. Only relevant with a <code>position</code> specified. Default value is: "1.00". The lower the value is, greater the radius of the sound will be. And the opposite, higher the value is, smaller the radius of the sound will be. See the image above for illustrated example.
; <code>soundlevel <string></code>
; <code>soundlevel <string></code>
Line 194: Line 194:
Plays a sound constantly. Does not allow random values.
Plays a sound constantly. Does not allow random values.


{{note|Sound files will not properly loop unless they have a cue point. See [[Looping a Sound]].}}
{{note|Sound files will not properly loop unless they have a cue point. See {{L|Looping a Sound}}.}}
{{bug|If another soundscape containing the same "playlooping" sound is triggered, but the sound has a different "pitch" value, the sound will cease to play unless the soundscape is re-triggerred from the one not containing said sound.}}
{{bug|If another soundscape containing the same "playlooping" sound is triggered, but the sound has a different "pitch" value, the sound will cease to play unless the soundscape is re-triggerred from the one not containing said sound.}}
{{clr}}
{{clr}}
Line 252: Line 252:
: Forces all unpositioned (i.e. ambient) sounds in the sub-scape to emit from one location.
: Forces all unpositioned (i.e. ambient) sounds in the sub-scape to emit from one location.
{{clr}}
{{clr}}
==== dsp <[[integer]]> ====
==== dsp <{{L|integer}}> ====
{{pre|style=float:right;margin-left:1em|
{{pre|style=float:right;margin-left:1em|
// Disable DSP and play no ambient sounds
// Disable DSP and play no ambient sounds
Line 269: Line 269:
}
}
}}
}}
;dsp_spatial <[[integer]]>
;dsp_spatial <{{L|integer}}>
;;dsp_volume <[[float]]>
;;dsp_volume <{{L|float}}>


Overrides the current [[DSP]] preset (which would otherwise be derived from the [[$surfaceprop]] of nearby [[material]]s).
Overrides the current {{L|DSP}} preset (which would otherwise be derived from the {{L|$surfaceprop}} of nearby {{L|material}}s).


For a list of values, open <code>scripts\[[dsp_presets|dsp_presets.txt]]</code>. You may need to extract this from the relevant engine GCF with [[GCFScape]]. To preview a DSP  preset, submit <code>room_type <[[int]]></code> to the console.
For a list of values, open <code>scripts\{{L|dsp_presets|dsp_presets.txt}}</code>. You may need to extract this from the relevant engine GCF with {{L|GCFScape}}. To preview a DSP  preset, submit <code>room_type <{{L|int}}></code> to the console.


{{note|Be careful when setting presets in soundscapes that could be used in many different locations.}}
{{note|Be careful when setting presets in soundscapes that could be used in many different locations.}}
Line 281: Line 281:
{{note|A dsp spatial type can also be assigned to a soundscape in conjunction with dsp room type ("dsp") with <code>"dsp_spatial" "''n''"</code>}}
{{note|A dsp spatial type can also be assigned to a soundscape in conjunction with dsp room type ("dsp") with <code>"dsp_spatial" "''n''"</code>}}
{{clr}}
{{clr}}
==== fadetime <[[float]]> ====
==== fadetime <{{L|float}}> ====
{{pre|style=float:right;margin-left:1em|
{{pre|style=float:right;margin-left:1em|
"SoundScapeName"
"SoundScapeName"
Line 297: Line 297:
The amount of time, in seconds, at which a soundscape fades in.
The amount of time, in seconds, at which a soundscape fades in.
{{clr}}
{{clr}}
==== soundmixer <[[string]]> ====
==== soundmixer <{{L|string}}> ====
{{pre|style=float:right;margin-left:1em|
{{pre|style=float:right;margin-left:1em|
"quiet"
"quiet"
Line 306: Line 306:
}
}
}}
}}
Selects a custom [[soundmixer]]. Soundmixers manage the priority and volume of groups of sounds; create new ones in <code>scripts\soundmixers.txt</code>  (ALWAYS use Default_Mix as a template).
Selects a custom {{L|soundmixer}}. Soundmixers manage the priority and volume of groups of sounds; create new ones in <code>scripts\soundmixers.txt</code>  (ALWAYS use Default_Mix as a template).
{{clr}}
{{clr}}
===Example===
===Example===
Line 387: Line 387:
The engine uses <code>scripts/soundscapes_manifest.txt</code> to find soundscapes files, but you could also use <code>scripts/soundscapes_%mapname%.txt</code> to load soundscapes on a map-by-map basis. All soundscapes are loaded on map start.
The engine uses <code>scripts/soundscapes_manifest.txt</code> to find soundscapes files, but you could also use <code>scripts/soundscapes_%mapname%.txt</code> to load soundscapes on a map-by-map basis. All soundscapes are loaded on map start.


The <code>soundscapes_%mapname%</code> method should be used when modifying the manifest is unnecessary or impossible (e.g. on custom maps without their own mod directories). This file can be [[BSPZIP|zipped into the BSP itself]] as well.
The <code>soundscapes_%mapname%</code> method should be used when modifying the manifest is unnecessary or impossible (e.g. on custom maps without their own mod directories). This file can be {{L|BSPZIP|zipped into the BSP itself}} as well.


New soundscapes can be added to the manifest by adding a new "file" line at the bottom, like this:
New soundscapes can be added to the manifest by adding a new "file" line at the bottom, like this:
Line 402: Line 402:


{{soundscape lists}}
{{soundscape lists}}
* [[env_soundscape:es|env_soundscape]]
* {{L|env_soundscape}}
* [[env_soundscape_proxy:es|env_soundscape_proxy]]
* {{L|env_soundscape_proxy}}
* [[env_soundscape_triggerable:es|env_soundscape_triggerable]]
* {{L|env_soundscape_triggerable}}
* [[trigger_soundscape:es|trigger_soundscape]]
* {{L|trigger_soundscape}}
* [[Notepad++ VDF languages:es|Idiomas de VDF en Notepad++]]
* {{L|Notepad++ VDF languages|Idiomas de VDF en Notepad++}}


[[Category:Sound System:es]]
[[Category:Sound System:es]]
[[Category:Level Design:es]]
[[Category:Level Design:es]]

Revision as of 08:26, 11 July 2024

English (en)Español (es)Français (fr)Русский (ru)中文 (zh)Translate (Translate)
Música y sonido

Soundscape es un tipo de script de sonido usado para dar ambiente a los mapas. Se puede usar en cualquier número de mapas, solo necesita una entidad para implementarse y no genera tráfico de red. Los soundscapes unsan una mezcla entre sonidos ejecutados aleatoriamente y en bucle, con la posibilidad de ser emitidos desde uno u ocho ubicaciones asignables.

Solo puede estar funcionando una entidad soundscape al mismo tiempo y dicho sonido individual no puede controlarse mediante inputs. Al activarse otro soundscape el juego las cruzará entre una y otra.

Activación de soundscapes

Cualquier entidad soundscape, cuando se activa, empieza a ser detectable por el jugador. Los soundscapes permanecen en marcha hasta que ocurra un cambio en el mapa o se active otro soundscape.

Tip.pngConsejo:soundscape_flush es un comando de consola para cancelar un soundscape activo.

Entidades «soundscape»

Estas entidades pueden ser activadas por las siguientes:

Las entidades soundscape están basadas en un punto(en), pero se activan cuando el jugador entra en dicho radio de acción.

Las dos excepciones a esto son env_soundscape_proxy (que se activa cuando env_soundscape o env_soundscape_triggerable) y env_soundscape_triggerable (que también suele activarse cuando se activa trigger_soundscape).


Distintos sonidos en un soundscape

Actualmente, en la mayoría de escisiones del motor Source, no se pueden reproducir dos o más sonidos idénticos a la vez en un mismo soundscape, aunque el volumen o el tono del nivel sea distinto.

Este error se ha remediado, Counter-Strike: Global Offensive los soundscapes reproduzcan varias repeticiones de sonidos idénticos.

Clarificar: ¿Se ha corregido esto en alguna prescisión de CS:GO?

Una posible solcuión es crear una copia del primer sonido y llamarla distinto. Esto puede valer para sonidos cortos, pero no se recomeienda para todos los casos. Esta es la solución que Valve ha usado cs_militia, en Counter-Strike Source(en). En la cocina , hay dos tubos fluorescentes con un zumbido, pero el primero es «ambient/machines/fluorescent_hum_1.wav» y el segundo «ambient/machines/fluorescent_hum_2.wav». Ambos son completamente idéncitos, pero deeare completely identical, but need to be two different name in order to be used in the same soundscape.

Otro ejemplo es la siguiente situación. Tenemos 3 luces fluorescentes y queremos sonidos en su ubicación. Para que funcione correctamente el soundscape y las entidades Hammer deben configurarse.

Soundscape identicalsounds.jpg
Hammer identicalsounds.jpg
"soundscape.demovdc"
{
	"playlooping"
	{
		"volume"	".65"
		"pitch"		"92"
		"channel"	"CHAN_AUTO"
		"position"	"0"
		"attenuation"	"1.2"
		"wave"		"ambient\machines\fluorescent_hum_1.wav"
	}
	
	"playlooping"
	{
		"volume"	".65"
		"pitch"		"92"
		"channel"	"CHAN_AUTO"
		"position"	"1"
		"attenuation"	"1.2"
		"wave"		"ambient\machines\fluorescent_hum_2.wav"
	}
	
	"playlooping"
	{
		"volume"	".65"
		"pitch"		"92"
		"channel"	"CHAN_AUTO"
		"position"	"2"
		"attenuation"	"1.2"
		"wave"		"ambient\machines\fluorescent_hum_3.wav"
	}
}

Véase también