Overview
TheVRStageLighting_AudioLink_Static class provides AudioLink integration for stage lighting fixtures in VRSL. It allows fixtures to react to audio in real-time by responding to different frequency bands, with support for color chords, theme colors, and texture sampling.
This script is designed for fixtures that react to music rather than DMX control, making it ideal for dynamic, music-driven lighting setups.
Namespace: VRSLInherits from:
UdonSharpBehaviour (in VRChat) or MonoBehaviour (in Unity)
Audio Link Settings
Enable or disable Audio Link Reaction for this fixture.
The frequency band of the spectrum to react to. Options:
Bass, Low_Mids, High_Mids, TrebleThe level of delay to add to the reaction. Higher values create a more delayed response to audio.
Multiplier for the sensitivity of the reaction. Higher values make the fixture more responsive to audio.
Enable Color Chord tinting of the light emission. This makes the light react to the dominant frequency color.
General Settings
Sets the overall intensity of the shader. Good for animating or scripting effects related to intensity. Its max value is controlled by Final Intensity.
Sets the maximum brightness value of Global Intensity. Good for personalized settings of the max brightness of the shader by other users via UI.
Choose between setting the Final Intensity for all meshes, or individual meshes.
Sets the maximum brightness value of Global Intensity for volumetric meshes only.
Sets the maximum brightness value of Global Intensity for projection meshes only.
Sets the maximum brightness value of Global Intensity for fixture meshes only.
The main color of the light. Supports HDR colors.
Color Sampling
Check this box if you wish to sample a separate texture for the color. The color will be influenced by the intensity of the original emission color. The texture is set in the shader itself.
Check this box if you wish to use traditional color sampling instead of white to black conversion.
The UV coordinates to sample the color from on the texture.
Check this box if you wish to enable AudioLink Theme colors.
Theme Color to Sample from. AudioLink supports 4 theme colors.
Movement Settings
The target for this mover to follow. When set, the fixture will automatically aim at this transform.
Fixture Settings
Projection Spin Speed (Udon Override Only). Negative values spin in the opposite direction.
Enable projection spinning (Udon Override Only).
Use this to change what projection is selected.
Mesh Settings
The meshes used to make up the light. You need at least 1 mesh in this group for the script to work properly. Supports up to 5 mesh renderers.
Controls the radius of a mover/spot light.
Controls the length of the cone of a mover/spot light.
Controls the mesh length of the cone of a mover/spot light.
Public Methods
_UpdateInstancedProperties()
Updates all material property blocks with current fixture settings including AudioLink parameters._UpdateInstancedPropertiesSansAudioLink()
Updates material property blocks without AudioLink functionality enabled._SetProps()
Initializes the MaterialPropertyBlock for this fixture.Properties (for Udon Scripting)
All public fields have corresponding properties for safe access from Udon scripts:LightColorTint- Get/Set the light colorConeWidth- Get/Set the cone widthConeLength- Get/Set the cone lengthMaxConeLength- Get/Set the maximum cone lengthGlobalIntensity- Get/Set the global intensityFinalIntensity- Get/Set the final intensityFinalIntensityComponentMode- Get/Set component modeFinalIntensityVolumetric- Get/Set volumetric intensityFinalIntensityProjection- Get/Set projection intensityFinalIntensityFixture- Get/Set fixture intensitySelectGOBO- Get/Set the selected goboEnableAudioLink- Get/Set AudioLink enabled stateBand- Get/Set the frequency bandDelay- Get/Set the reaction delayBandMultiplier- Get/Set the band multiplierTextureSamplingCoordinates- Get/Set texture sampling coordinatesSpinSpeed- Get/Set projection spin speedProjectionSpin- Get/Set projection spin enabledColorChord- Get/Set color chord enabledColorTextureSampling- Get/Set texture sampling enabledTraditionalColorTextureSampling- Get/Set traditional sampling modeThemeColorSampling- Get/Set theme color sampling enabledThemeColorTarget- Get/Set theme color target
Usage Example
AudioLink Band States
| Band State | Description |
|---|---|
Bass | Reacts to low frequency bass (20-200 Hz) |
Low_Mids | Reacts to low-mid frequencies (200-500 Hz) |
High_Mids | Reacts to high-mid frequencies (500-2000 Hz) |
Treble | Reacts to high frequencies (2000-20000 Hz) |
Related Components
- VRStageLighting_DMX_Static - DMX-controlled fixtures
- VRStageLighting_AudioLink_Laser - AudioLink laser effects
- VRSL_LocalUIControlPanel - Local UI control panel for VRSL