Quantcast

Implementing software knob behaviour

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Implementing software knob behaviour

Christopher Arndt
Hi all,

I'm currently trying to write a software MIDI/OSC control panel in
Kivy/Python [1]. I want to implement a sensible knob behaviour but I
have trouble getting this right. The general idea is:

- Click (starting somewhere in the area of the knob control) and drag
upwards/downwards (y-axis) increases / decreases the value.
- Dragging left/right (x-axis) decreases step size of increments /
decrements.
- Each knob has a min/max value.

My questions are:

- What should I use as the reference point for finding the distance of
the movement? The centre of the knob or where the first touch event
occurred?
- Should I apply the distance to the value directly or use the distance
as a relative value (i.e. increment / decrement to the value when the
touch started)? If the former, how do I prevent value jumps?

- Or, to put it another way: how do you guys actually implement knob
behaviour?


Chris



[1] http://kivy.org/


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (1012 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Implementing software knob behaviour

Thorsten Wilms-2
On 16.05.2017 09:25, Christopher Arndt wrote:
> - What should I use as the reference point for finding the distance of
> the movement? The centre of the knob or where the first touch event
> occurred?

First touch.

Elsewise, if that point is above the center and the cursor/finger moves
down, what are you going to do until the center has been passed?


> - Should I apply the distance to the value directly or use the distance
> as a relative value (i.e. increment / decrement to the value when the
> touch started)? If the former, how do I prevent value jumps?

I don't quite understand what you are trying to describe here.

I think the behavior should be as if a slider was brought up, with the
current value, positioned such that the indicator (top of the value bar)
is right below the pointer/finger. You should probably actually display
a slider. For touch, it's worth thinking about not (only) showing
something right in place, as the finger/hand may obstruct it.

The slider area may end up  partially off screen. You could rely on the
user to slide twice if they want to reach an extreme in such a case. Or
implement a scroll-fully-into-view feature. With a mouse, you could
allow the pointer to go off-screen / wrap-around (this works quite well
in the 3D app Blender). At the same time the pointer goes over the edge,
the slider could be moved appropriately. For a touch interface, you'd
have to move the slider as the finger approaches the edge, though.

In case inspiration regarding the visuals is welcome:
https://thorwil.wordpress.com/2007/04/27/not-knobs-5/
https://thorwil.wordpress.com/2007/05/01/fan-sliders/


--
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Implementing software knob behaviour

Christopher Arndt
Am 16.05.2017 um 12:47 schrieb Thorsten Wilms:
> In case inspiration regarding the visuals is welcome:
> https://thorwil.wordpress.com/2007/04/27/not-knobs-5/
> https://thorwil.wordpress.com/2007/05/01/fan-sliders/

Very welcome. Your series of blog posts seems to tackle exactly the
questions I was asking myself and more. I'll read them carefully and
then come back - probably with more questions ;)


Chris
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Implementing software knob behaviour

immanuel litzroth-2
In reply to this post by Christopher Arndt
This has a bunch of good information.
https://thorwil.wordpress.com/2007/05/01/fan-sliders/
I'll try to get some time this weekend to formulate a considered reply.
Immanuel

On Tue, May 16, 2017 at 9:25 AM, Christopher Arndt <[hidden email]> wrote:
Hi all,

I'm currently trying to write a software MIDI/OSC control panel in
Kivy/Python [1]. I want to implement a sensible knob behaviour but I
have trouble getting this right. The general idea is:

- Click (starting somewhere in the area of the knob control) and drag
upwards/downwards (y-axis) increases / decreases the value.
- Dragging left/right (x-axis) decreases step size of increments /
decrements.
- Each knob has a min/max value.

My questions are:

- What should I use as the reference point for finding the distance of
the movement? The centre of the knob or where the first touch event
occurred?
- Should I apply the distance to the value directly or use the distance
as a relative value (i.e. increment / decrement to the value when the
touch started)? If the former, how do I prevent value jumps?

- Or, to put it another way: how do you guys actually implement knob
behaviour?


Chris



[1] http://kivy.org/


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev



_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Implementing software knob behaviour

Len Ovens
In reply to this post by Christopher Arndt
On Tue, 16 May 2017, Christopher Arndt wrote:

> I'm currently trying to write a software MIDI/OSC control panel in
> Kivy/Python [1]. I want to implement a sensible knob behaviour but I
> have trouble getting this right. The general idea is:
>
> - Click (starting somewhere in the area of the knob control) and drag
> upwards/downwards (y-axis) increases / decreases the value.
> - Dragging left/right (x-axis) decreases step size of increments /
> decrements.
> - Each knob has a min/max value.

OK, interesting idea. Make it and try it see how it "feels".

> My questions are:
>
> - What should I use as the reference point for finding the distance of
> the movement? The centre of the knob or where the first touch event
> occurred?

first touch. any knob or fader should work from first touch because (if
nothing else) touch is not precise. The touch may end up off the widget
(or even the application window), but so long as the touch continues, it
belongs to that widget.

> - Should I apply the distance to the value directly or use the distance

NO.

> as a relative value (i.e. increment / decrement to the value when the
> touch started)? If the former, how do I prevent value jumps?

again both knobs and faders should move the value from where it is now to
somewhere else. It is pretty much impossible to touch a slider at the
point the value already is, it is much harder with a knob. Besides which
you are activating it like a slider so there is no visual hint of where
the finger/mouse should touch to start from the current value. My
personal thought on any controller (glass or physical controls) is to base
things on encoders not pots. The thing you are controlling might also
change the value of a knob (banking or preset change)

I would point to Ardour's GUI, Open Stage Control or the X32 remote editor
appliaction (free download) as examples.

You will note all of these use left/right the same as they use up/down.
The idea of using left/right as graininess is interesting. I have seen x/y
pads used that way too. With an x/y pad the graininess can be value of
touch point while the value itself is incremental because the x/y pad
gives some indication of where to touch. However, the main thing I like
about knobs over a slider is that it takes the least real estate for the
most effect. An x/y box uses the most real estate being bigger than a
slider even. Open Stage Control uses two fingers for fine movement on it's
sliders, but that would be difficult with a knob. (my fingers are too big)
Other applications use a meta key for fine.

--
Len Ovens
www.ovenwerks.net

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Loading...