Automated: update component fields |
989onan bot (talk | contribs) Automated: update Fields |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox Component | |||
|Image=VolumeMeterComponent.png | |||
|Name=Volume Meter | |||
}} | |||
The '''VolumeMeter''' component can be used to get the volume of an inputted audio source. | The '''VolumeMeter''' component can be used to get the volume of an inputted audio source. | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Smoothing|Float| | |Smoothing|Float|Smooth lerp the <code>Volume</code> field this much. | ||
|Power|Float| | |Power|Float|Raise <code>Volume</code> to this exponent. 1 will leave <code>Volume</code> unchanged. | ||
|Method|VolumeMeterMethod| | |Method|VolumeMeterMethod| Whether the outputted value should be the current volume, or the change in volume over time (delta) | ||
|Source|IAudioSource| | |Source|IAudioSource|The audio source to read the volume of (as long as it's streaming or playing). | ||
|Volume|{{RootFieldType|RawOutput`1|[[Type:Float|Float]]}}|TypeAdv4=true| | |Volume|{{RootFieldType|RawOutput`1|[[Type:Float|Float]]}}|TypeAdv4=true| The current volume of <code>Source</code> raised to the exponent <code>Power</code>, after smoothing factor of <code>Smoothing</code>. | ||
}} | }} | ||
[[ | |||
== Usage == | |||
Attach to a slot and provide any [[Type:IAudioSource|IAudioSource]] to <code>Source</code>. When audio data is being generated by <code>Source</code> the <code>Volume</code> field will start changing values. | |||
== Examples == | |||
This component can be used to add visual reaction to avatars when talking, or in audio/music visualizers. | |||
== See Also == | |||
{{Template:AudioClip_SeeAlso}} | |||
[[Category:Components{{#translation:}}|Volume Meter]] | [[Category:Components{{#translation:}}|Volume Meter]] | ||
[[Category:Components:Media:Utility{{#translation:}}|Volume Meter]] | [[Category:Components:Media:Utility{{#translation:}}|Volume Meter]] |
Latest revision as of 06:05, 17 March 2025
Component image File:VolumeMeterComponent.pngVolume Meter component as seen in the Scene Inspector
The VolumeMeter component can be used to get the volume of an inputted audio source.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Smoothing
|
Float | Smooth lerp the Volume field this much.
|
Power
|
Float | Raise Volume to this exponent. 1 will leave Volume unchanged.
|
Method
|
VolumeMeterMethod | Whether the outputted value should be the current volume, or the change in volume over time (delta) |
Source
|
IAudioSource | The audio source to read the volume of (as long as it's streaming or playing). |
Volume
|
raw output of Float | The current volume of Source raised to the exponent Power , after smoothing factor of Smoothing .
|
Usage
Attach to a slot and provide any IAudioSource to Source
. When audio data is being generated by Source
the Volume
field will start changing values.
Examples
This component can be used to add visual reaction to avatars when talking, or in audio/music visualizers.
See Also
- Type:IAudioSource
- Component:AudioClipPlayer
- Component:StaticAudioClip
- Component:ChannelVolumeMeter
- Component:VolumeMeter
- Component:SawtoothWaveClip
- Component:ValueNoiseClip
- Component:ButtonAudioClipPlayer
- Component:LerpingMultiClipPlayer
- TalkVisualizer
- Component:RandomAudioClipPlayer
- Component:MultiAudioClipPlayer
- Component:SimplexNoiseClip
- Component:TriangleWaveClip
- Component:SquareWaveClip
- Component:SineWaveClip