Have you tried doing your quantization in the SetValue? Simply changing the display value isn’t changing the underlying value. I’m guessing that the display value is used just for the numeric display, and the value of the slider/knob position is the underlying value (which is why it isn’t “steppy”). Caveat: This is sheer speculation and I haven’t looked at the Rack code to see what it’s doing. Loking at the Rack could be heklpful to to figure out how to get knobs and sliders with steps and also provide the steppy feedback.
I suspect it may be difficult to make the slider jump in discrete steps, but its value can certainly be snapped to integer values. There are modules that use knobs to snap to integer values (like the octave setting in Vult Basal. Although its knob moves smoothly, it breaks its range into integer steps. I’m sure something like this would work with sliders also.
Are you saying that you have seen existing modules that do this with knobs? Can you give an example of one that is open source? If so, we should be able to study its source code to figure out what it is doing. I know that is easier said than done because it often takes digging through the VCV Rack source code also, in order to understand how it works.
I would be willing to help if you can point me to an existing module’s source code that does what you want.
OK, I missed that you were talking about sliders in a right-click menu. Sorry about that! Yes, I don’t see any built-in support for snapping there, as you mention. It should be possible, however it will require some work. My best guess is you should derive a custom class from Slider, then look at how Knob implements snap and do something similar.