[LAD] Implementing software knob behaviour

Christopher Arndt chris at chrisarndt.de
Tue May 16 07:25:31 UTC 2017


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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 993 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20170516/af596504/attachment.pgp>


More information about the Linux-audio-dev mailing list