Buttons on inactive pages don't get updated
4 posters
Page 1 of 1
Buttons on inactive pages don't get updated
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
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
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
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
heartdriven- Posts : 5
Join date : 2023-04-06
Re: Buttons on inactive pages don't get updated
The plugin should keep track of incoming messages, even for buttons on inactive pages. Which action are you using?
Re: Buttons on inactive pages don't get updated
I'm not sure what you mean by action, but I've made a screenshot of the config of this button (see below).Admin wrote:The plugin should keep track of incoming messages, even for buttons on inactive pages. Which action are you using?
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
heartdriven- Posts : 5
Join date : 2023-04-06
Re: Buttons on inactive pages don't get updated
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
Re: Buttons on inactive pages don't get updated
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.
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.
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.
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.
heartdriven and ozark2001 like this post
Re: Buttons on inactive pages don't get updated
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.
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 . 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
Re: Buttons on inactive pages don't get updated
Just writing to report that since one of this summer’s updates, this bug does not happen anymore on my stream deck (with hauptwerk).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.
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.
Thanks for the maintenance of this wonderful plugin!
Kind regards
Tom
heartdriven- Posts : 5
Join date : 2023-04-06
Re: Buttons on inactive pages don't get updated
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 ?
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 : 130
Join date : 2023-10-23
Re: Buttons on inactive pages don't get updated
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.
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.
Re: Buttons on inactive pages don't get updated
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 :
Thank you again for the quality of your support.
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 : 130
Join date : 2023-10-23
Re: Buttons on inactive pages don't get updated
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 a way to fire an event when the streamdeck is plugged or unplugged (or the streamdeck app is launched or exited)?
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: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 ?
Possible, yes. But will it be implemented? Not so sure.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) ?
That's an interesting bug.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.
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.
Re: Buttons on inactive pages don't get updated
Great idea for MidiPlugin 2.0
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?
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
Re: Buttons on inactive pages don't get updated
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:Curious how much work/time would that be estimated on current achieved version?
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.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 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.
Re: Buttons on inactive pages don't get updated
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 :
Am I correct ?
And btw, to continue our interesting discussion :
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:Possible, yes. But will it be implemented? Not so sure.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) ?
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.Admin wrote: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 a way to fire an event when the streamdeck is plugged or unplugged (or the streamdeck app is launched or exited)? ?
Am I correct ?
thx538- Posts : 130
Join date : 2023-10-23
Re: Buttons on inactive pages don't get updated
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: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.
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.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 ?
Similar topics
» MIDI buttons not working with update to 1.8.6 (exclamation point)
» Batch Programming Buttons
» Banks and track change buttons not working
» Increment/Decrement Program Change buttons
» Script working but unstable when replicated in several buttons
» Batch Programming Buttons
» Banks and track change buttons not working
» Increment/Decrement Program Change buttons
» Script working but unstable when replicated in several buttons
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum