zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Encoder does not step between enumerated values consistently #585

Closed riban-bw closed 1 year ago

riban-bw commented 2 years ago

Describe the bug When a control has a list of values with associated labels, the encoder often requres several detents to be passed before the value changes.

To Reproduce Steps to reproduce the behavior:

  1. Add Pianoteq layer
  2. Adjust SELECT encoder

Expected behaviour Sustain pedal changes value on each detent of encoder rotation.

Actual behaviour Sustain pedal changes value on each second or third detent of encoder rotation.

Setup:

Additional context Current implementation assumes all enumeration steps are equally spaced and has integer rounding error. It would be better for the controller to know this is an enumerated list and associate the encoder value with the index of the step, i.e. set encoder range to span quantity of enumerations and look up each value from emuneration list. This hits lots of the code and may be best updated in a refactor of this bit of the code, e.g. new_zyncoder_algorithm development branch. (I started but got lost in the warren.)

jofemodo commented 2 years ago

I've made some improvements to the zynthian_gui_controller class and the behaviour now seems to be a lot better:

https://github.com/zynthian/zynthian-ui/commit/e8cd3676071a17ee5fa6a1a4739d15f83d790ce8

Could you update and test?

riban-bw commented 2 years ago

This is much better but the limits are wrong. The first and last steps do nothing, e.g. Pianoteq rotate SELECT encoder:

Removing 2205 milestone as current behaviour is much improved and won't block stable release (although it would be nice if it fully worked properly!).

jofemodo commented 2 years ago

Most of people could use Zynthian all his life and wouldn't be conscious about this detail. In spain we use to say that you are a "tikis-mikis" ... jajaja! Same as me, but different. Good for Zynthian, anyway!! Tikis-mikismo is always good for improving things ,-DD I will take a look to this when feel inspired.

riban-bw commented 2 years ago

The word tiquismiquis means fussy or nitpicker in English. It's used to describe someone's character. This is someone who is hard to please and demanding about his requirements and needs.

Some say I am pedantic whilst others say I have a high attention to detail :-) This kind of detail is the difference between a user feeling great about a product or feeling there is something wrong that they can't quite pinpoint. We must indeed fix the big issues first but should also record the small ones so they don't go unfixed forever. I like the software development term, "papercuts" for small issues that don't stop the core workflow but are irksome. Some development teams have a short push of fixing paper cuts. I tend to use this kind of bug as a distraction when the tough stuff is proving challenging. Pick of something simple then get back to the big stuff.

Priority - low.

riban-bw commented 1 year ago

This is now fixed by encoder library moving to relative steps rather than absolute steps and moving value to Python zyncoder object.