Env microphone: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(more underscores)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=env_microphone}}
{{wrongtitle|title=env_microphone}}
==Entity Description==
Broadcasts sound from a location for either playback or monitoring.


{{cleanup}}
==Keyvalues==
* {{kv targetname}}
* {{kv parentname}}
* {{kv enabledisable}}
* '''target'''
: <target_destination> If the speaker is in Measuring mode, this is the name of the entity where the sound level is to be measured.
* '''SpeakerName'''
: <target_destination> The name of a speaker entity through which to play any sounds heard by this microphone. If specified, the microphone will consider itself in Speaker mode. '''Cannot be an env_speaker!'''
* '''ListenFilter'''
: <filterclass> The name of an filter entity which specifies the only entities the microphone can hear. Sounds emitted by other entities will not be heard.
* '''speaker_dsp_preset'''
: <choices> Only useful in Speaker mode. If specified, when the microphone is enabled, it'll set the global dsp_speaker preset to this value. Sounds played back through speakers will then be affected by the selected DSP.
:{|
! Literal Value || Description
|-
| 0 || Use Default
|-
| 50 || 1 NO EFFECT
|-
| 51 || 2 (DUPLICATE OF 1)
|-
| 52 || 3 (DUPLICATE OF 1)
|-
| 53 || 4 (DUPLICATE OF 1)
|-
| 54 || 5 (DUPLICATE OF 1)
|-
| 55 || 6 SPEAKER, LOUDER
|-
| 56 || 7 SPEAKER VERY SMALL
|-
| 57 || 8 LOUDSPEAKER, ECHO
|-
| 58 || 9 SPEAKER SMALL
|-
| 59 || 10 SPEAKER TINY
|}


Records sound from a location for either playback or monitoring.
* '''Sensitivity'''
 
: <float> (0-10) If the speaker is being used to monitor sound levels, this keyvalue dictates its sensitivity.  
==Keyvalues==
:{|
* '''Measure target:''' The location from where sound levels are to be monitored. If blank, the env_microphone's own position will be used.
! Literal Value || Description
* '''Speaker:''' The entity from which recorded sounds will come. If this is not set, the microphone will monitor sound levels instead. '''Cannot be an env_speaker!'''
|-
* '''Listen Filter:''' The microphone will only hear sounds coming from the entites covered by this filter entity. Must be <code>[[filter_activator_class]]</code>, <code>[[filter_activator_name]]</code>, or <code>[[filter_multi]]</code>.
| 0 || Deaf
* '''Speaker DSP Preset:''' Adds Digital Sound Processing to this microphone's recordings:
|-
** '''Use Default:''' Adds basic the speaker DSP effect. This decreases the playback's quality as a cheap microphone/speaker setup might.
| 1 || Normal
** '''1 NO EFFECT:''' Sounds are played back at the exact quality they are recorded
|-
** '''2-5 (DUPLICATE OF 1):''' Obsolete?
| 2-10 || Increasing Sensitivity
** '''6 SPEAKER, LOUDER:''' The basic speaker DSP, plus extra volume
|}
** '''7 SPEAKER VERY SMALL:''' Simulates a very small speaker
** '''8 LOUDSPEAKER, ECHO:''' Forcibly adds echo to the playback
** '''9 SPEAKER SMALL:''' A weaker version of 7
** '''10 SPEAKER TINY:''' A stronger version of 7
* '''Sensitivity (0-10):''' If the speaker is being used to monitor sound levels, this keyvalue dictates its sensitivity.  
** '''0:''' deaf
** '''1:''' normal
** '''2-10:''' increasing sensitivity
* '''Smoothing (0-1):''' Smooths the microphone's readout if it is being used to monitor.
* '''Maximum hearing range (0-infinite):''' How far away the microphone should record sounds from.


* '''MaxRange'''
: <float> (0-∞) Sounds beyond this range won't be heard, irrelevant of attenuation.
: WARNING: setting this to zero (or a value > 1024) when the microphone is in Speaker mode can be very bad for performance!!
==Inputs==
==Inputs==
* '''SetSpeakerName:''' Alter the output speaker for this microphone.
* {{i targetname}}
* {{i parentname}}
* {{i enabledisable}}
* '''SetSpeakerName <target_destination>'''
: Set the microphone to output through a different speaker entity.


==Outputs==
==Outputs==
* '''SoundLevel:''' Fires if the sound level of an area changes when the microphone is in measuring mode.
* {{o targetname}}
* '''OnRoutedSound:''' Fires when a sound is routed through the microphone's speaker.
* '''SoundLevel <float>'''
* '''OnHeardSound:''' Fires when the microphone hears any sound it cares about, regardless of how it is handled.
: Fired in Measuring mode whenever the sound level changes.
* '''OnRoutedSound'''
: Fired whenever a sound is routed out through the specified speaker (if any).
* '''OnHeardSound'''
: Fired whenever this microphone hears any sound it cares about.


[[Category:Sound System]]
[[Category:Sound System]]
[[Category:Entities]]
[[Category:Entities]]

Revision as of 15:38, 6 August 2005

Template:Wrongtitle

Entity Description

Broadcasts sound from a location for either playback or monitoring.

Keyvalues

<target_destination> If the speaker is in Measuring mode, this is the name of the entity where the sound level is to be measured.
  • SpeakerName
<target_destination> The name of a speaker entity through which to play any sounds heard by this microphone. If specified, the microphone will consider itself in Speaker mode. Cannot be an env_speaker!
  • ListenFilter
<filterclass> The name of an filter entity which specifies the only entities the microphone can hear. Sounds emitted by other entities will not be heard.
  • speaker_dsp_preset
<choices> Only useful in Speaker mode. If specified, when the microphone is enabled, it'll set the global dsp_speaker preset to this value. Sounds played back through speakers will then be affected by the selected DSP.
Literal Value Description
0 Use Default
50 1 NO EFFECT
51 2 (DUPLICATE OF 1)
52 3 (DUPLICATE OF 1)
53 4 (DUPLICATE OF 1)
54 5 (DUPLICATE OF 1)
55 6 SPEAKER, LOUDER
56 7 SPEAKER VERY SMALL
57 8 LOUDSPEAKER, ECHO
58 9 SPEAKER SMALL
59 10 SPEAKER TINY
  • Sensitivity
<float> (0-10) If the speaker is being used to monitor sound levels, this keyvalue dictates its sensitivity.
Literal Value Description
0 Deaf
1 Normal
2-10 Increasing Sensitivity
  • MaxRange
<float> (0-∞) Sounds beyond this range won't be heard, irrelevant of attenuation.
WARNING: setting this to zero (or a value > 1024) when the microphone is in Speaker mode can be very bad for performance!!

Inputs

Set the microphone to output through a different speaker entity.

Outputs

Fired in Measuring mode whenever the sound level changes.
  • OnRoutedSound
Fired whenever a sound is routed out through the specified speaker (if any).
  • OnHeardSound
Fired whenever this microphone hears any sound it cares about.