# SAudioReactiveBase

## Index

### Properties Index

| Property Name                                         |
| ----------------------------------------------------- |
| bool [**Enabled** ](#enabled)`get` `set`              |
| int [**BandMin** ](#bandmin)`get` `set`               |
| int [**BandMax** ](#bandmax)`get` `set`               |
| float [**BPMWindow** ](#bpmwindow)`get` `set`         |
| float [**LimitIncrease** ](#limitincrease)`get` `set` |
| float [**LimitDecrease** ](#limitdecrease)`get` `set` |
| float [**MinValue** ](#minvalue)`get` `set`           |
| float [**MaxValue** ](#maxvalue)`get` `set`           |
| int [**Mode** ](#mode)`get` `set`                     |
| virtual float [**Power** ](#power)`get`               |

## Properties

### Enabled

bool **Enabled** `get` `set`

*Whether the Audio Reactive component is enabled or not.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.Enabled = false
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--clicking this object will Enable/Disable it's Audio Reactive Base component
thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.AudioReactive


OnClick = function()
component.Enabled =  not component.Enabled
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
```

{% endtab %}
{% endtabs %}

### BandMin

int **BandMin** `get` `set`

*The Band Min property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.BandMin= 1
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Band Min property
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.BandMin = (slider.Value * 12.0) -- from 0 to 12
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### BandMax

int **BandMax** `get` `set`

*The Band Max property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.BandMax= 11
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Band Max property
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.BandMax = (slider.Value * 12.0) -- from 0 to 12
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### BPMWindow

float **BPMWindow** `get` `set`

*The BPM Window property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.BPMWindow= 5
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's BPM Window property
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.BPMWindow = (slider.Value * 50) - 50   -- from -50 to 50
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### LimitIncrease

float **LimitIncrease** `get` `set`&#x20;

*The Limit Increase property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.LimitIncrease= 1
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Limit Increase property.
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.LimitIncrease= (slider.Value * 50) - 50   -- from -50 to 50
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### LimitDecrease

float **LimitDecrease** `get` `set`

*The Limit Decrease property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.LimitDecrease= 3
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Limit Decrease property.
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.LimitDecrease= (slider.Value * 50) - 50   -- from -50 to 50
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### MinValue

float **MinValue** `get` `set`

*The Min Value property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.MinValue= 1
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Min Value property.
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.MinValue= (slider.Value * 50) - 50   -- from -50 to 50
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### MaxValue

float **MaxValue** `get` `set`

*The Max Value property of an Audio Reactive component.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.MaxValue= 3
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--the below script will make a slider change an Audio Reactive Component's Max Value property.
--[Add "theslider" and "theaudioreactive" reference to the Scripting Runtime component]

slider = Space.Host.GetReference("theslider").UISlider
ar = Space.Host.GetReference("theaudioreactive").AudioReactive


OVC = function()
ar.MaxValue= (slider.Value * 50) - 50   -- from -50 to 50
end

slider.OnValueChanged(OVC)
```

{% endtab %}
{% endtabs %}

### Mode

int **Mode** `get` `set`

*The Mode property of an Audio Reactive component. Band is 0, and BMP is 1.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.Mode= 1
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--clicking this object will toggle between it's two Audio Reactive Modes

thisGameObject = Space.Host.ExecutingObject
component = thisGameObject.AudioReactive


OnClick = function()
  if component.Mode == 0 then
    component.Mode = 1
  else
    component.Mode = 0
  end
end


thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
```

{% endtab %}
{% endtabs %}

### Power

float **Power** `get`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.AudioReactive.Power = 1
```

{% endtab %}
{% endtabs %}

### GameObject

[SGameObject](https://docs.breakroom.tech/scripting/client-scripting-api-reference/types/sgameobject) **GameObject** `get`

*Returns a reference to the GameObject of this component.*

{% tabs %}
{% tab title="Lua" %}

```lua
theGameObject = Space.Host.ExecutingObject.AudioReactive.GameObject
```

{% endtab %}
{% endtabs %}
