Endless Knob

I’d like to make a knob you can keep turning left or right. Anyone got an example of something like that handy?

:thinking: I can only think of a Real World example - the frequency tuning knob in my car radio. Also the Volume control, come to think of it.

I suppose there would be no need for a pointer on it.

1 Like

Are you wanting unlimited number of turns, or just multi-turns? Like, say, dialling from 0 to 100 at the rate of 10 units per turn.

1 Like

Unlimited number of turns is what I was imagining. I’m just curious if there are any examples of it out there already in VCV rack

You can’t go unlimited because you need a distinct min-value and a distinct max-value.

On my module TapeRecorder I built the cassette-reels based on knobs. And the tape can be very long. My solution was to set minAngle = -6.f * M_PI and maxAngle = 6.f * M_PI to get 6 full circles a user can turn the knob in one mouse-movement. After the mouse-movement has ended it’s quite easy to turn the knob back to a position inside the middle circle by addin/subtracting full circles from the actual angle.

Do you want to emulate an endless encoder?

1 Like

That’s not true.

parameter knobs in VCVRack support INFINITY and -INFINITY for their min and max values. If you set both ends to infinity, this triggers the knobs to become endless knobs. But they seem tricky to handle. I don’t know of any examples where they are being used.

2 Likes

Impromptu CV Pad uses a parameter with INFINITY/-INFINITY.

2 Likes

By setting minAngle = -INFINITY and maxAngle = INFINITY the knob graphics will not be displayed.

By setting configParam(MY_PARAM, -INFINITY, INFINITY, 0) the knob will be displayed an can be turned endlessly, but double clicking the knob does not reset it to the default value.

3 Likes

like the mouse wheel? I usually borrow mouse wheel functions for things that need a knob in absolute mode.

When you just need a +1, 0, or -1 value to determine if the knob is being rotated and in what direction.

Instead of an indexing value between two set points.

I would use 2 buttons instead:

[-1] and [+1]