Slider clipping bug

Hi, All.
Please tell me why the sliders are clipping (0…1) in Juce? How to fix it?

Some info would help us here first:

What are you comparing? Two JUCE-created plugins? A non-JUCE plug-in from someplace with a JUCE plug-in that you made?

We have no idea how you created or instantiated those sliders, or if you’ve hooked them up to parameters via slider attachments, etc. Did you use Projucer, or just write code to create the sliders? If you used Projucer, did you set their limits? If hooked to parameters, how are the parameters defined?

Seeing the code that instantiates the sliders might help spot the issue. As would answers to the questions above.

(By the way, in JUCE, knobs are also sliders, just with a different way of drawing and of computing the changes from mouse movements.)

It is the same plugin with and without GUI. This is an example plugin from Juce.

With GUI is maximum = 10. Without a GUI, the value turns orange to indicate over-limit.

sliders have a range of 10 on init until you either actively setRange() on them or connect them with your audioProcessorValueTreeState

And just as a side note, your screenshots look like the default look & feel from JUCE 4, we are now on JUCE 6 and a lot has changed since then – I’m not even sure right now if e.g. the AudioProcessorValueTree existed back then… And with those changes, the examples were updated as well over time. So if you did not modify the current examples to use the old look, I’d highly recommend you to update your JUCE copy before taking any further steps :slight_smile:

I also need a range 0…10.

Yes, I have an old Juce. I need it for some reason.

I’m not sure why you even care about that default interface when you have a working GUI. Most of our plug-ins have custom UI components that simply don’t work with that default interface. It’s not a problem as far as I know.

I haven’t met such a problem in other development tools, so I got interested. Need to somehow make setRange for non-GUI mode.

Probably need to redo juce_VST_Wrapper. I have not found such initialization there.

I am afraid you are on the wrong track. Maybe start with what you want to achieve:

  • is it a plugin?
  • are you using SliderAttachments?

it is all customisable, and seems you are expecting things that are setup differently. But so far I don’t see anything that needs fixing in the juce code (that doesn’t mean it never happens)