Skip to main content

Overview

The VRStageLighting_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: VRSL
Inherits from: UdonSharpBehaviour (in VRChat) or MonoBehaviour (in Unity)
Enable or disable Audio Link Reaction for this fixture.
AudioLinkBandState
default:"Bass"
The frequency band of the spectrum to react to. Options: Bass, Low_Mids, High_Mids, Treble
int
default:"0"
The level of delay to add to the reaction. Higher values create a more delayed response to audio.
float
default:"1.0"
Multiplier for the sensitivity of the reaction. Higher values make the fixture more responsive to audio.
bool
default:"false"
Enable Color Chord tinting of the light emission. This makes the light react to the dominant frequency color.

General Settings

float
default:"1.0"
Sets the overall intensity of the shader. Good for animating or scripting effects related to intensity. Its max value is controlled by Final Intensity.
float
default:"1.0"
Sets the maximum brightness value of Global Intensity. Good for personalized settings of the max brightness of the shader by other users via UI.
bool
default:"false"
Choose between setting the Final Intensity for all meshes, or individual meshes.
float
default:"1.0"
Sets the maximum brightness value of Global Intensity for volumetric meshes only.
float
default:"1.0"
Sets the maximum brightness value of Global Intensity for projection meshes only.
float
default:"1.0"
Sets the maximum brightness value of Global Intensity for fixture meshes only.
Color
default:"White * 2.0"
The main color of the light. Supports HDR colors.

Color Sampling

bool
default:"false"
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.
bool
default:"false"
Check this box if you wish to use traditional color sampling instead of white to black conversion.
Vector2
default:"(0.5, 0.5)"
The UV coordinates to sample the color from on the texture.
bool
default:"false"
Check this box if you wish to enable AudioLink Theme colors.
int
default:"1"
Theme Color to Sample from. AudioLink supports 4 theme colors.

Movement Settings

Transform
default:"null"
The target for this mover to follow. When set, the fixture will automatically aim at this transform.

Fixture Settings

float
default:"4.0"
Projection Spin Speed (Udon Override Only). Negative values spin in the opposite direction.
bool
default:"false"
Enable projection spinning (Udon Override Only).
int
default:"1"
Use this to change what projection is selected.

Mesh Settings

MeshRenderer[]
required
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.
float
default:"2.5"
Controls the radius of a mover/spot light.
float
default:"1.0"
Controls the length of the cone of a mover/spot light.
float
default:"8.5"
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.
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 color
  • ConeWidth - Get/Set the cone width
  • ConeLength - Get/Set the cone length
  • MaxConeLength - Get/Set the maximum cone length
  • GlobalIntensity - Get/Set the global intensity
  • FinalIntensity - Get/Set the final intensity
  • FinalIntensityComponentMode - Get/Set component mode
  • FinalIntensityVolumetric - Get/Set volumetric intensity
  • FinalIntensityProjection - Get/Set projection intensity
  • FinalIntensityFixture - Get/Set fixture intensity
  • SelectGOBO - Get/Set the selected gobo
  • EnableAudioLink - Get/Set AudioLink enabled state
  • Band - Get/Set the frequency band
  • Delay - Get/Set the reaction delay
  • BandMultiplier - Get/Set the band multiplier
  • TextureSamplingCoordinates - Get/Set texture sampling coordinates
  • SpinSpeed - Get/Set projection spin speed
  • ProjectionSpin - Get/Set projection spin enabled
  • ColorChord - Get/Set color chord enabled
  • ColorTextureSampling - Get/Set texture sampling enabled
  • TraditionalColorTextureSampling - Get/Set traditional sampling mode
  • ThemeColorSampling - Get/Set theme color sampling enabled
  • ThemeColorTarget - Get/Set theme color target

Usage Example