robbert-vdh / nih-plug

Rust VST3 and CLAP plugin framework and plugins - because everything is better when you do it yourself
ISC License
1.81k stars 155 forks source link

GUI knobs value limited to between 0 and 1 inclusive #141

Open Arkforest opened 7 months ago

Arkforest commented 7 months ago

This issue originally arose while testing https://github.com/magnetophon/lamb-rs which uses this framework.

When using the GUI of any NIH-Plug plugin, I have an issue selecting specific values on the linear knobs, like for the Downwards Ratio in Spectral Compressor, for instance. Upon left clicking on any knob and moving my mouse, the value of said knob instantly snaps to either 0 or 1 (as either integer or float values) or somewhere in between, like with the Global Threshold knob in Spectral Compressor. If the range of possible values does not include 0 or 1 or anything in between, it is hard snapped to one end of the knob with the value closest to 0 or 1, like with the Window Size and Window Overlap knobs in Spectral Compressor. When manipulating the same knobs without the GUI (using Ardour's generic GUI for all plugins), I am able to freely adjust the value to anything outside of 0 and 1 (though it displays the maximum possible value for a particular knob when the left mouse button is held down on it). This problem affects most knobs, but it doesn't affect some knobs, like the SC Channel Link, Upwards Hi-Freq Rolloff and Downwards Hi-Freq Rolloff knobs in Spectral Compressor. The only outlier knob I've noticed on the aforementioned plugins is the Output Gain knob on Spectral Compressor, which can be adjusted between -50 and 0.

I am currently using AV Linux 21.3 and this issue has been tested on both binary and compiled (on AV Linux 21.3 with the official Rust toolchain) versions of lamb-rs by magnetophon as well as the most recent binary versions of Diopser and Spectral Compressor as of now. I opened the VST3 plugins in Ardour, version 7.2.123, and the respective VST3 folders were stored in the ~/.vst3 folder. I'm not sure if this problem affects other Debian-based distros, like MX Linux or Ubuntu or even Debian.

I have also attached a zip file with two MKV videos demonstrating the problem.

nihvideos.zip