# Endless rotary - "jog dial" style

**URL:** <https://forum.juce.com/t/endless-rotary-jog-dial-style/16236>\
**Category:** General JUCE discussion\
**Created:** [December 19, 2015, 10:16am UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236 "2015-12-19T10:16:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mucoder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mucoder/32/595_2.png) [@mucoder](https://forum.juce.com/u/mucoder)\
**Post date:** [December 19, 2015, 10:16am UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/1 "2015-12-19T10:16:44Z")

</div>

I have a need for a variation of the rotary slider that acts like an endless rotary&nbsp;jog dial on video mixing consoles. Or like a platter on a turntable or dj mixer if that makes it clearer.&nbsp;

I'm aware that we&nbsp;can&nbsp;use&nbsp;stopAtEnd = false with a regular rotary slider, but the problem is in that case that:

- clicking on the rotary will immediately jump to the clicked position (real jog dials don't act that way)
- dragging up/down will not allow zero crossings (whereas a jog dial&nbsp;should allow multiple revolutions when dragging up/down far enough)

@Jules:&nbsp;Any chance for such a feature to make it into one of the next versions? It could be of use to many people I guess.

BTW as a workaround I wrote some&nbsp;experimental overrides on the MouseDown/Drag/Up methods that add this behaviour. However this has the problem that I cannot call pimpl.sendDragStart() because I obviously&nbsp;have no access to the Slider::Pimpl

A poor man's temp solution could be to add a protected sendDragStart() / sendDragEnd() pair on the Slider class that call the pimpl for me. I would already be very grateful for that!

&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 21, 2015, 10:05am UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/2 "2015-12-21T10:05:03Z")

</div>

It's not something that'd fit into the current Slider class, which is very firmly designed for a fixed range. It'd need to be a new separate class of component which has different behaviour. It's a good request, but not sure how big a priority it'd be for us, as it's actually not something that many people have asked for.

---

<div class="post-metadata">

**Author:** ![mucoder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mucoder/32/595_2.png) [@mucoder](https://forum.juce.com/u/mucoder)\
**Post date:** [December 22, 2015, 1:42pm UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/3 "2015-12-22T13:42:54Z")

</div>

a new optimised&nbsp;class&nbsp;would be fine as well of course!&nbsp;But I can imagine there are more pressing things indeed

how about just adding the protected sendDragStart/End then&nbsp;- it's&nbsp;is a tiny change&nbsp;that&nbsp;would be unlikely to to disrupt any existing code, while it would&nbsp;help&nbsp;me avoid writing an entire new class myself :-)

&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 22, 2015, 2:11pm UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/4 "2015-12-22T14:11:28Z")

</div>

Sorry, but exposing aspects of the internal implementation for users to access is never a "tiny change"!

Of all the types of request you can make to a library developer, asking for hidden methods to be made public is likely to be the least welcome - if we let you couple your code to the way things&nbsp;work internally, it means we can't change the implementation in the future.

---

<div class="post-metadata">

**Author:** ![mucoder](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mucoder/32/595_2.png) [@mucoder](https://forum.juce.com/u/mucoder)\
**Post date:** [December 23, 2015, 12:44pm UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/5 "2015-12-23T12:44:27Z")

</div>

point taken and even agreeing with it :-) &nbsp;Though that abstract/implementation&nbsp;boundary is&nbsp;often not&nbsp;black and white&nbsp;- it's always a balancing act between flexibility for the library writer (to change implementation without breaking anything) and for the library user (to adapt it to real-world needs)- one that Juce does admirably most of the time it must be said

I guess what I _really_ wanted&nbsp;is to have some kind of implementation-independent semantics on the abstract Slider interface that inheritors&nbsp;can use to signal to the audioprocessor host that it's about to produce a lot of changes (via the SliderAttachment intermediate that is). &nbsp; I don't care how it is implemented really. &nbsp;Anyhow, not a matter of life and death!

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 23, 2015, 12:54pm UTC](https://forum.juce.com/t/endless-rotary-jog-dial-style/16236/6 "2015-12-23T12:54:17Z")

</div>

Yeah, I agree. The slider class has always been a bad one for long-term feature creep, and I've often thought about breaking it up into a collection of classes to control various aspects of its behaviour. Will hopefully get chance to do that one day!
