Component:VolumeMeter

From Resonite Wiki
Revision as of 00:31, 5 December 2024 by Martysh12 (talk | contribs) (Tweak argument descriptions, add another See Also link, clarify language)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
File:VolumeMeterComponent.png
Volume Meter component as seen in the Scene Inspector

The VolumeMeter component can be used to get the volume of an inputted audio source.

Fields

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.
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