I am a bit lost. Maybe you can give me a hint. I want to set up a single (hardware) button interface that works like this:
Short press cycles through a block of presets in increasing order.
Long press cycles through the same block in decreasing order.
Double press changes into another mode, so that now:
Short press cycles through another block of presets in increasing order
Long press slowly increases brightness of LEDs while pressed. Next long press slowly decreases brightness of LEDs while pressed. Next long press increases again…
Double press switches back to the first mode as explained above.
It seems that I can’t find a way to change short press/long press handling depending on the ‘mode’ I am in. It always behaves in only one fixed way. I figure I would need some kind of status variable and an if…else construct, or I am missing something. And it seems that the length of the long press can’t be translated into a value of any kind.
This may be possible with playlists set to manual advance but I never tried. Also I do not know at what version this is available but it is in latest nightly alpha builds.
The cycling is not the problem. A hardware button can be mapped to a controlling preset that switches through a preset block. Changing the mapping via API commands or the conditional control flow of API commands is the culprit . What I described as a ‘mode’ change.
Its a battery powered standalone mobile device with not much space for a lot of buttons. One control button should suffice.
you cant dynamically map commands, thats why I proposed playlists. you should be able to advance in a playlist with one json command and switch preset (i.e. playlist) with another.
In my git repo linked there are also examples on json commands, they work the same way in remots as in presets.
Ok. I found the command. It’s also in the HTTP Request API List: ‘&NP’
It only steps in increasing order, but it’s certainly very usefull. Would be cool to have it also decreasing in the future. Do I have to make this a feature request?
As I’m using the MoonModules Fork, it’s not yet available for me, as they are on 14.5 right now. But good to know for the (hopefully) near future.