Trevliga Spel forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Buttons on inactive pages don't get updated

4 posters

Go down

Buttons on inactive pages don't get updated Empty Buttons on inactive pages don't get updated

Post by heartdriven Thu Apr 06, 2023 10:29 pm

First of all, thank you for maintaining this great plugin.  It works out of the box and I didn't have a hard time setting it up.

I'm not sure if this is a bug in this plugin or not, but here's my issue:

I have a list of on/off notes (toggle) buttons that control my software (pistons in a pipe organ VST called Hauptwerk) with a midi out and in set up and the midi busses well configured.  This all works like a charm when all the buttons are on the same page.  So when the signal is coming from my VST then the button updates accordingly.  It's almost like magic Very Happy

However, when I have a button on a different page and a signal is sent from the VST, then the button's status is unchanged.  It feels like buttons on pages are in "sleep mode" so I don't know if this is a plugin issue, or if it's an issue that must be addressed by Elgato.
Anyway, thanks for the great work! You turn my Stream Deck into a wonderful machine cheers

heartdriven

Posts : 5
Join date : 2023-04-06

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Fri Apr 07, 2023 8:11 am

The plugin should keep track of incoming messages, even for buttons on inactive pages. Which action are you using?
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by heartdriven Fri Apr 07, 2023 9:45 am

Admin wrote:The plugin should keep track of incoming messages, even for buttons on inactive pages. Which action are you using?
I'm not sure what you mean by action, but I've made a screenshot of the config of this button (see below).

Also, I have captured extended logs for one of these buttons, and they can be found at gist.github.com/heartdriven/ce021406cf2bb0058ec8adef40b1b20d (i'm unable to post links yet, sorry).  I've annotated with my actions during the capture.

Hoping it helps!

Tom

Buttons on inactive pages don't get updated Screen10

heartdriven

Posts : 5
Join date : 2023-04-06

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by heartdriven Fri Apr 07, 2023 10:07 am

Looking at the logs, it seems like all the buttons on the page I'm leaving get detached. The buttons on the page I am switching to get attached...

heartdriven

Posts : 5
Join date : 2023-04-06

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Fri Apr 07, 2023 10:16 am

Every button type (Note On/Off, Control Change, Mackie Control, etc.) is called an "action".

You are correct; the Note On/Off action does not correctly adapt to the current state when a page has been inactive. The state is saved by the background engine but is not picked up when the action is activated. Sad

The plugin started small and has been adapted and extended over time, and the code has been increasingly hard to maintain. Due to this, I am currently working on an internal redesign that will make everything easier to maintain.

As a part of that redesign, I will take care of things like this. Unfortunately, it will take quite some time before the new version is released; basically, everything internal will change, and it will require a thorough beta test period before I'm confident that the redesign hasn't broken anything.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

heartdriven and ozark2001 like this post

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by heartdriven Fri Apr 07, 2023 10:33 am

Admin wrote:Every button type (Note On/Off, Control Change, Mackie Control, etc.) is called an "action".

You are correct; the Note On/Off action does not correctly adapt to the current state when a page has been inactive. The state is saved by the background engine but is not picked up when the action is activated. Sad

The plugin started small and has been adapted and extended over time, and the code has been increasingly hard to maintain. Due to this, I am currently working on an internal redesign that will make everything easier to maintain.

As a part of that redesign, I will take care of things like this. Unfortunately, it will take quite some time before the new version is released; basically, everything internal will change, and it will require a thorough beta test period before I'm confident that the redesign hasn't broken anything.

It's absolutely not a dealbreaker for me and I completely understand.  I can overcome it for the next months or years.  If you need someone to test, feel free to reply in this topic  Very Happy.  I'm a (web) developer myself, so I understand the issues that come with a growing code base.  If I can do anything to help, feel free to ask! But i'm oblivious about the stream deck and the SDK.

Anyway, thanks for the effort, the openness and the quick reply!

heartdriven

Posts : 5
Join date : 2023-04-06

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by heartdriven Sun Oct 08, 2023 10:41 am

Admin wrote:Every button type (Note On/Off, Control Change, Mackie Control, etc.) is called an "action".

You are correct; the Note On/Off action does not correctly adapt to the current state when a page has been inactive. The state is saved by the background engine but is not picked up when the action is activated. Sad

The plugin started small and has been adapted and extended over time, and the code has been increasingly hard to maintain. Due to this, I am currently working on an internal redesign that will make everything easier to maintain.

As a part of that redesign, I will take care of things like this. Unfortunately, it will take quite some time before the new version is released; basically, everything internal will change, and it will require a thorough beta test period before I'm confident that the redesign hasn't broken anything.
Just writing to report that since one of this summer’s updates, this bug does not happen anymore on my stream deck (with hauptwerk).

Thanks for the maintenance of this wonderful plugin!

Kind regards
Tom

heartdriven

Posts : 5
Join date : 2023-04-06

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by thx538 Wed Nov 08, 2023 7:44 am

Well, I am resurrecting this thread because I have the impression that scripts are not executed on inactive pages.

I have this simple script on a button that triggers and reacts to track solo event:

[(config){TriggerOnLocalMidiEvents:No}]
[(press){cc:2,25,127}] Daw toggles Solo On/Off upon reception and sends either 0 or 127 in return
[(cc:2,25,0){text:Solo Off}{image:%trevligaspel%/Icons/TrackSoloOff.png}]
[(cc:2,25,127){text:Solo On}{image:%trevligaspel%/Icons/TrackSoloOn.png}]


if the CC#25 is received when the page is inactive, nothing is changed (as compared to the previous status) when I activate the page again. When the page remains active everything works fine
I may be doing something wrong.
Thanks for your support

Edit: After an additional test I can confirm that "simple" buttons (eg. Control Change) do get updated even when the page is inactive, so my guess is that this behavior does not apply to scripts Am I correct ?

thx538

Posts : 128
Join date : 2023-10-23

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Wed Nov 08, 2023 9:55 am

Scripts are run when a page is loaded, but only events that are "happening" are executed.

For example, the single event (cc:2,25,0) is only executed when the command is received, and since the script is inactive when the command is received, it will not run. When the button is loaded and the script is run, nothing is executed since the (cc:2,25,0) command isn't received at that moment. There is an (init) event you can use to force the script to pick up on the state when the button is loaded. If you add this to the script, it should work:

[(config){TriggerOnLocalMidiEvents:No}]
[(press){cc:2,25,127}] Daw toggles Solo On/Off upon reception and sends either 0 or 127 in return
[(cc:2,25,0){text:Solo Off}{image:%trevligaspel%/Icons/TrackSoloOff.png}]
[(cc:2,25,127){text:Solo On}{image:%trevligaspel%/Icons/TrackSoloOn.png}]
[(init)(cc:2,25,0){text:Solo Off}{image:%trevligaspel%/Icons/TrackSoloOff.png}]
[(init)(cc:2,25,127){text:Solo On}{image:%trevligaspel%/Icons/TrackSoloOn.png}]

The multi-event (init)(cc:2,25,0) means that the command will be executed once when the button is loaded, and it will check the state of CC2 and act upon it.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by thx538 Wed Nov 08, 2023 12:01 pm

Brillant !
I should have read the documentation better.
Thank you for your prompt answer.

I think I am now closer to my objective of seamlessly integrating a Streamdeck+ with Live 11 (incl. ClyphX Pro) and a midi fighter Twister with Bome Midi Translator, but without using the mackie protocol..

A few additional questions and comments below :
  • Is there a way to fire an event when the streamdeck is plugged or unplugged (or the streamdeck app is launched or exited) ?

  • Is there some sort of scripting capability for dials (encoders). I am aware of the possibility to use custom translation files but I would like to be able to dynamically change titles (incl. in multi midi mode); if feasible - might be an idea for a future version ?

  • In multi midi for dials, would it be possible to have the dial push event cycle through the different items and select them automatically (instead of tapping in the tactile bar) ?

  • A little annoyance with multi midi on Dials is that you cannot fully blank a title. If you try to blank an existing title, a single character still remains on the device. I thing it is a (minor) bug and can provide with additional details at your convenience.


Thank you again for the quality of your support.

thx538

Posts : 128
Join date : 2023-10-23

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Wed Nov 08, 2023 1:20 pm

thx538 wrote:Is there a way to fire an event when the streamdeck is plugged or unplugged (or the streamdeck app is launched or exited)?
Technically, it would be possible to act on device plugged/unplugged events since the plugin is notified, but the plugin does not act on those events, and there is no script logic to handle them.

thx538 wrote:Is there some sort of scripting capability for dials (encoders). I am aware of the possibility to use custom translation files but I would like to be able to dynamically change titles (incl. in multi midi mode); if feasible - might be an idea for a future version ?
There is currently no script solution for dials. It would be a logical extension to implement scripts for dials, but I have no immediate plans for that.

thx538 wrote:In multi midi for dials, would it be possible to have the dial push event cycle through the different items and select them automatically (instead of tapping in the tactile bar) ?
Possible, yes. But will it be implemented? Not so sure.

thx538 wrote:A little annoyance with multi midi on Dials is that you cannot fully blank a title. If you try to blank an existing title, a single character still remains on the device. I thing it is a (minor) bug and can provide with additional details at your convenience.
That's an interesting bug.  Shocked

Don't tell anyone, but the development of the Midi plugin is a bit slow at the moment. I will, of course, keep it updated and fix bugs, but I'm a bit hesitant to add new features at the moment.

I'm investigating what it would take to develop a "Midi plugin 2.0" with an extremely more flexible approach than the current plugin. If I'm going down that route, it would be a Midi plugin on steroids where the communication is decoupled from the display.

If it is possible to have a usable design (in the editor), I would like to have one single "all-inclusive" action that can handle any Midi command and scripts combined with any display. A possible future feature would also be to include Midi 2.0 capabilities in that plugin version, and I'm trying to get my head around what that would require.

Things like script support for dials would be a natural thing in that version of the plugin, and if I decide to create it, that is where I will put my hours. If I find it too complex to develop, I will spend more time with the current plugin.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by ozark2001 Wed Nov 08, 2023 5:13 pm

Great idea for MidiPlugin 2.0 Smile
Curious how much work/time would that be estimated on current achieved version?

I guess there is no simple way to allow/enable existing script function of buttons also for dials, as dials vs. buttons are complete different?

ozark2001

Posts : 11
Join date : 2023-11-08

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Wed Nov 08, 2023 6:03 pm

ozark2001 wrote:Curious how much work/time would that be estimated on current achieved version?
I haven't a clue how much time I've spent on this plugin, but I have spent time with it more or less daily for the last four years...

ozark2001 wrote:
I guess there is no simple way to allow/enable existing script function of buttons also for dials, as dials vs. buttons are complete different?
The Midi part of the script should be the same (more or less) for a scripted dial, but the dial and display management will be very different.
The button display is very simple: a text and/or an image.
The dial display is a blank canvas that can be designed freely, similar to a web page (though it's defined in json instead of HTML). For a script to handle the dial display, I must invent some clever way to address dial display objects in the script.

So, no, there is no simple way to enable existing scripts for the dial, I'm afraid.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by thx538 Thu Nov 09, 2023 6:49 pm

Well, in my opinion, the scripting would not be used to change the visual design on the tactile bar (there are are already many options available) but rather to customize the titles and hopefully the content (number of items and display value) of translation files. Maybe having the capability to use/insert global variables would suffice in most cases.

And btw, to continue our interesting discussion :
Admin wrote:
thx538 wrote:In multi midi for dials, would it be possible to have the dial push event cycle through the different items and select them automatically (instead of tapping in the tactile bar) ?
Possible, yes. But will it be implemented? Not so sure.
A workaround is to use a pile of buttons (on the dial), then duplicate the multi midi definition and select the desired item for each step. It works well.


Admin wrote:
thx538 wrote:Is there a way to fire an event when the streamdeck is plugged or unplugged (or the streamdeck app is launched or exited)? ?
Technically, it would be possible to act on device plugged/unplugged events since the plugin is notified, but the plugin does not act on those events, and there is no script logic to handle them.
I thought of a workaround with a global variable that would be initialized only once within the (init) event of a button. Changing this variable (eg. from 0 to 1) would only occur once and the change could be detected to fire an external midi message so that the rest of the world is aware that the streamdeck is plugged.
Am I correct ?

thx538

Posts : 128
Join date : 2023-10-23

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Admin Thu Nov 09, 2023 9:42 pm

thx538 wrote:A workaround is to use a pile of buttons (on the dial), then duplicate the multi midi definition and select the desired item for each step. It works well.
I'm implementing a new feature that I call "Selector" (for lack of a better word), where you can press/rotate to select something rather than execute something. I tested this on multi dials to select item, and it works really well. I will soon publish a beta version with this functionality.

thx538 wrote:I thought of a workaround with a global variable that would be initialized only once within the (init) event of a button. Changing this variable (eg. from 0 to 1) would only occur once and the change could be detected to fire an external midi message so that the rest of the world is aware that the streamdeck is plugged.
Am I correct ?
No. The (init) command will be executed when the profile or page with the button is loaded, not when a device is connected, so you won't get the effect you want.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Buttons on inactive pages don't get updated Empty Re: Buttons on inactive pages don't get updated

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum