Display knob on Dashboard for variable of int type?


Hi there,

I’m very new to this and I’ve been trying to customise an app to build the exact controller I want.

It seems that the only way I’ve found to display a knob on the ROLI Dashboard is using a displayMode="bipolar" variable whose type is float:


Is there a way to display a knob with int values?

I can do with a float value, not a big issue and I was just curious :slight_smile:



Hi, not sure about what you mean.
but if you don’t wanna see the decimal on the screen you can round by the use of
call it after the setRange fonction
if you wanna have the int value in the code
int value = Slider.getValue();
if it’s a pointer
int value = Slider->getValue();


Hi @nseaprotector and thanks!

Sorry if my message wasn’t clear. You understood correctly and I’d like to hide the decimal for the sliders on the screen shot I posted. I’d like to show “127” and “115”, instead of “127.0” and “115.22”. They’re MIDI values so the decimal is irrelevant here. I convert this value to an int later to use it as a fixed/min/max velocity, so the decimal is just a cosmetic issue in the interface.

I’ll try to make it work with what you replied. I’m actually using the BLOCKS Code editor, so I’m not sure I can customise the Slider function. As I said, I’ve very new to this and I have a poor knowledge of C++ unfortunately. I’ll look into this next week! Thanks again.