Cabbage Logo
Back to Cabbage Site

Encoder - once more

When I picked up an instrument I made some time ago, Etude #2, I noticed a strange behaviour of the encoder. I first thought about a particular problem with my instrument, but then found the same thing for the example from the documentation. A complete rotation of the encoder corresponds to a change of 100. If the increment is small (as in the example 0.001) rotating the encoder with the mouse wheel allows fine control, but the encoder does not visibly move. If I control it by mouse drag it is difficult to move it by less than ±1 which is 1000x the increment. Is there any way to set the value one rotation of the encoder corresponds to? min()/max() don’t work. Actually, I set min(-1), max(1) in my instrument but that only causes the encoder being trapped on 1/50 of its possible rotation.

I just tested the encoder eample that comes with Cabbage and I see nothing wrong with it. It behaves fine with the mouse drag, and the mouse wheel. Can you prepare a simple example for me to test? Also, you can set the one rotation value, it’s reapeatInterval(). You can see its use in the encoder example.

I used the example from the web documentation. That doesn’t have the repeatInterval(1). And the default seems to be 100. That together with increment(0.001) in the example leads to the strange behaviour because there are 10^5 steps per rotation. I guess using an approriate value for repeatInterval() will fix the problem also in my instrument.

Oh you’re right, that example is a little outdated, but the one that ships with Cabbage is more up to date. Let me know if you have better luck with that one :+1: