I have NO IDEA what this is doing. The name “ParamQuantity” really throws me off. My best guess is that this code is fetching the value of the switch that’s stored in the parameter. Credit to @CountModula for leading me to the answer:
If you look around in the rack SDK source you will see that ParamQuantity is derived from Quantity, and the comment in Quantity says:
/** A controller for manipulating a float value (which subclasses must store somehow) with limits and labels.
If you poke around in any of the widgets you will soon see that they are all eventually manipulating a ParamQuantity.
I don’t know how you prefer to poke around inside rack. I often use the not very smart method of sprinkling printf around in the code to see what comes out. I think smarter people just look at the code, or maybe set breakpoints in a debugger.
btw, the ParamQuantity is of course where you set custom tooltips and such. I think custom tooltips are actually documented.