Clamp
Runs on: Shared (backend or chatbox overlay).
Keeps a number within a range. Below the minimum it outputs the minimum, above the maximum it outputs the maximum, and in range it passes through unchanged. Use it to keep volumes, counters and multipliers in bounds.
Inputs
| Name | Type | Description |
|---|---|---|
Value | number | The number to constrain. |
Outputs
| Name | Type | Description |
|---|---|---|
Result | number | The clamped value, between Min and Max. |
Configuration
- Min: The lowest allowed value.
- Max: The highest allowed value.
Example
To keep a TTS volume boost between 10 and 100, set Min to 10 and Max to 100. An input of 150 outputs 100, and -5 outputs 10.