v0.1Latest
Clamp
Clamp
Constrains an incoming control value to a bounded range, holding it at the configured minimum or maximum whenever it strays outside. It is a safety and shaping utility for keeping modulation within a target window before it reaches a sensitive parameter. Values already inside the range pass through unchanged.

Inputs
Input
- ID:
x - Kind:
control - Rate:
control - Coercion: Implicit
- Default:
0
Min
- ID:
min - Kind:
control - Rate:
control - Coercion: Implicit
- Default:
0
Max
- ID:
max - Kind:
control - Rate:
control - Coercion: Implicit
- Default:
1
Outputs
Result
- ID:
y - Kind:
control - Rate:
control - Coercion: Implicit
Notes
- Canonical ID:
math.clamp - Category:
math - Runtime Surface: control
- Runtime Targets:
control-main-thread - JUCE Early Access: Supported
- Early Access Note: Native-supported in the plugin for the current catalog/runtime support contract.
- Formula: y = min(max(x, min), max)