Gain
Stereo gain and pan utility with level metering. Uses the built-in GUI.
Source: examples/truce-example-gain/.
#What it demonstrates
- Exponentially smoothed parameters (
smooth = "exp(5)") - Naive pan law (
gain_l = 1 - max(pan, 0),gain_r = 1 + min(pan, 0)) - Peak metering via
ProcessContext::set_meter - Grid layout with knobs, XY pad, and stereo meter
#Parameters
| Name | Range | Unit | Description |
|---|---|---|---|
| Gain | -60 to +6 | dB | Output level |
| Pan | -1 to +1 | pan | Stereo balance |
#GUI variants
The same gain plugin is implemented with five different GUI backends — compare them to see how each framework handles the same layout:
- gain (this one) — built-in grid layout
- gain-egui — egui immediate-mode widgets
- gain-iced — iced retained-mode widgets
- gain-slint — declarative
.slintmarkup - gain-vizia — vizia reactive widgets (desktop only)