mod-audio / mod-sdk

SDK to implement the MOD gui interface
GNU General Public License v3.0
34 stars 16 forks source link

Fix film for discrete knobs #18

Closed vallsv closed 4 years ago

vallsv commented 4 years ago

Hi,

Here is a fix to use the full available film in case of discrete knoks.

That is important cause i have to align this knok with labels for each discrete values.

Is this code also used for the Mod Duo server? Or it have to be backported?

Here is an example with a knok with 6 values (integer from 0 to 5 included). On the left the master, on the right the fix. fix-discrite-knoks

The code still looks weird cause a double round sounds like it is possible to accumulate many delta error. But i mostly understand nothing to the code (what is steps and so on).

falkTX commented 4 years ago

That makes a lot of sense actually. Will merge, thanks.

btw, it is written knob, not knok

falkTX commented 4 years ago

we can do the same fix in mod-ui, that is the webserver inside the MOD Duo units.

vallsv commented 4 years ago

Thanks a lot. And I am kind of dyslexial. I had to fix many times this typo on by code :-)

leogermani commented 4 years ago

Hi guys,

Its been a while since I was working on this so I can't tell it for myself. But could you have a look at this documentation and check whether there is something that should be changed?

https://wiki.moddevices.com/wiki/Preparing_the_assets#Knobs.2C_sliders_and_similars

See that in the docs, for the situation you are describing, I suggest to prepare the sprite image only with the steps the knob will have so you get full control to align them.

In other words, in those cases you dont let the UI auto-calculate the rotation, you prepare the image with each step pointing to the right place (It seems to me a better idea).

vallsv commented 4 years ago

The documentation is still fine.

But i think in most of the cases it is easier to use the continuous sprite to deal with discrete cases. Preparing sprites is a lot of time, and if i have to change the style, it's much easier.

blushi commented 4 years ago

That seems fine to me, it removes the "undesired behavior" mentioned by the wiki.