This mostly works. I spin the associated knob and the tooltip shows decimal values between -5 and 5. But I want the values to just be integers. Source for other modules seems like they are doing exactly the same thing (no derived ParamQuantity, no [sg]etDisplayValue) and “it just works”. But I get the decimal values. How do I get it to display (and return) just integers.
I have to confess that I have derived my own knob just to set the snap in the constructor, just like those custom ones. Not exactly difficult, but setting snap enabled seems like a more direct (smarter) way.
Depending on your religion, the constructor seems more “object oriented” than directly accessing the public attributes on the param quantities. Burying it in the constructor also makes your mainline code prettier
haha, yes the old “what is object oriented”. I think now has been replaced by “are these unit tests or integration tests”? I have to say the VCV “style” is very far from my “style”, but I like it - it makes it easy to do things. For example, VCV never uses the keyword class and all members tend to be public. Having everything public enables things you would not otherwise be able to to. Of course they won’t all necessary work, but at least you can try it.