Scripted dial alpha
3 posters
Page 10 of 11
Page 10 of 11 • 1, 2, 3 ... , 9, 10, 11
Re: Scripted dial alpha
The script you show is not in the log file; the log shows a script with more commands.thx538 wrote:And one more thing .... which I think is a regression.
I had this code who was working well :
...
.. while receiving the following messages :
- Code:
7: MIDI OUT [Bome MIDI Translator 5 Virtual Out]: BF 18 15
9: MIDI OUT [Bome MIDI Translator 5 Virtual Out]: F0 6C 00 01 20 20 20 20 20 20 20 20 F7
But now, since one of the latest versions it does not work anymore.
@g_sname_sel is not replaced when receiving a blank value, while it did before.
I don't know exactly what you mean by "@g_sname_sel is not replaced when receiving a blank value". The log file has the following entries after receiving a blank value:
- [BackgroundScript1 (sysex:F0 6C 00 XX F7){@g_sname_sel:#IF(HEXVALUE(MID(@e_sysex,1,2))=1, RIGHT(@e_sysextext, LEN(@e_sysextext)-1), CONCAT(@g_sname_sel, RIGHT(@e_sysextext, LEN(@e_sysextext)-1)))#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'=' ']
- ...
- [BackgroundScript1 (@g_sname_sel:" ")(cc:16,24,1-32){@g_sname_sel:#CONCAT("Scene: ",@e_ccvalue)#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'='Scene: 21']
Re: Scripted dial alpha
Sorry, I don't remember - are you on Mac or Windows?thx538 wrote:And I have also observed the "Wait ... plugin is loading" window several times today.
It's difficult to reproduce.
What Stream Deck software version do you use?
If logging is enabled when it happens, it would be interesting to see the log.
Re: Scripted dial alpha
Admin wrote:I checked for "none" before evaluating the math expression; that's why "none" was never set (I assume that's the problem you have discovered). I fix this in the next version.
I will retest for these two when they are fixed, then.Admin wrote:OK, I found it. It was a change in a completely different part of the plugin that caused it.
You are right, I could not reproduce this one this morning. Let's forget about it and see if it happens again.Admin wrote:From what I can see, @g_sname_sel is replaced when receiving a blank value.
Windows 10. The StreamDeck software version is the latest one: 6.7.3 (21005).Admin wrote:Sorry, I don't remember - are you on Mac or Windows?
What Stream Deck software version do you use?
If logging is enabled when it happens, it would be interesting to see the log.
As I mentioned it's difficult to reproduce but i'll try to capture the log if it happens again.
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
I am also wondering why this command is rejected by the editor (with unterminated # notification):
[(@t_val:100){cc:16,#IF(@l_trsc=1,24,0)#,#@l_val#}{@t_val:reset}]
... while this one is not and works successfully:
[(@t_val:100){@l_cc:#IF(@l_trsc=1,24,0)#}{cc:16,#@l_cc#,#@l_val#}{@t_val:reset}]
Thanks for your help
[(@t_val:100){cc:16,#IF(@l_trsc=1,24,0)#,#@l_val#}{@t_val:reset}]
... while this one is not and works successfully:
[(@t_val:100){@l_cc:#IF(@l_trsc=1,24,0)#}{cc:16,#@l_cc#,#@l_val#}{@t_val:reset}]
Thanks for your help
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
And I now have the "Plugin is loading ... " window, this time indefinitely.
Here is the log file : https://drive.google.com/file/d/1M7YbniZHnLdjwrlPB6-alDVHOvjufz-m/view?usp=sharing
Here is the log file : https://drive.google.com/file/d/1M7YbniZHnLdjwrlPB6-alDVHOvjufz-m/view?usp=sharing
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
thx538 wrote:And I now have the "Plugin is loading ... " window, this time indefinitely.
Here is the log file : https://drive.google.com/file/d/1M7YbniZHnLdjwrlPB6-alDVHOvjufz-m/view?usp=sharing
It looks like there are communication problems between the plugin and the Stream Deck software. The plugin sends an update for the dial screen but never gets any response from the Stream Deck software.
Maybe the Stream Deck log file can show something more.
Re: Scripted dial alpha
This is what I have, at around the same time IIRC.
- Attachments
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
There are several log entries like this:thx538 wrote:This is what I have, at around the same time IIRC.
### DeviceComm [A00WA3331JXTKA UploadXYWHImage: Ignore error: FAILED
I don't know what they mean, but "DeviceComm" and "FAILED" sound as if there is a communication problem between the device and the Stream Deck software. I have no such log entries in my logs.
Maybe Elgato can answer more precisely what the log message means.
Re: Scripted dial alpha
ok, thank you for investigating
I also have a few errors like this in the windows log file :
but only this morning (no other events like this since early october) and at a different time.
I also have a few errors like this in the windows log file :
- Code:
Application: se.trevligaspel.midi.exe
CoreCLR Version: 8.0.624.26715
.NET Version: 8.0.6
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
at StreamDeck_Midi.Script.ScriptEngineV2.HandleInitCommands() in E:\Projects\StreamDeck-Midi - Net 8\StreamDeck-Midi\Script\ScriptEngineV2.cs:line 596
at StreamDeck_Midi.PluginActionScript.WaitForLoadedProfile(Object token) in E:\Projects\StreamDeck-Midi - Net 8\StreamDeck-Midi\Actions\PluginActionScript.cs:line 304
but only this morning (no other events like this since early october) and at a different time.
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
That indicates some problems with the midi port connections, but the plugin shouldn't crash when that happens. I'll see if I can handle that situation better.thx538 wrote:ok, thank you for investigating
I also have a few errors like this in the windows log file :
...
but only this morning (no other events like this since early october) and at a different time.
Re: Scripted dial alpha
You are really stress-testing the script engine.thx538 wrote:I am also wondering why this command is rejected by the editor (with unterminated # notification):
[(@t_val:100){cc:16,#IF(@l_trsc=1,24,0)#,#@l_val#}{@t_val:reset}]
... while this one is not and works successfully:
[(@t_val:100){@l_cc:#IF(@l_trsc=1,24,0)#}{cc:16,#@l_cc#,#@l_val#}{@t_val:reset}]
Thanks for your help
The cc action failed because it has multiple arguments, and the script engine used commas to separate them. The commas in the IF statement broke this process.
I have implemented a much more intelligent argument splitter that should handle commands like that. This change affected many actions, so keep your eyes open if it has broken anything anywhere else.
This version should fix the issues you have reported.
Version 3.11.0.469
Re: Scripted dial alpha
Issue at Scripted Dial > Display Fader Title and Value at the top
Setting Dial > Rotated while pressed > Value display: controlled by script:
if the script doesn't send nothing and the dial is rotated, the title of the fader is hidden.
Same issue with Scripted Dial > Vol bar and Pan bar (values are hidden)
Setting Dial > Rotated while pressed > Value display: controlled by script:
if the script doesn't send nothing and the dial is rotated, the title of the fader is hidden.
Same issue with Scripted Dial > Vol bar and Pan bar (values are hidden)
jordikt- Posts : 278
Join date : 2024-02-10
Re: Scripted dial alpha
Hello,
I have this in the initialization of a background script
[(init){@g_pp:%trevligaspel%/Images/}] Picture Path
I have this working well in a scripted dial :
{iconleft:#CONCAT(@g_pp,"Hand-Blue2.png")#}
But this (used in a legacy script on a button) is not working :
[(init+)(@g_t_img_idx:*){image:#CONCAT(@g_pp,"TrackStatus-", @g_t_img_idx, ".png")#}]
Log file extract below :
And the file does exist :
Edit:
And surprisingly this works (in the legacy script) :
[(init+)(@g_t_img_idx:*){image:#CONCAT("%trevligaspel%/Images/TrackStatus-", @g_t_img_idx, ".png")#}]]
I have this in the initialization of a background script
[(init){@g_pp:%trevligaspel%/Images/}] Picture Path
I have this working well in a scripted dial :
{iconleft:#CONCAT(@g_pp,"Hand-Blue2.png")#}
But this (used in a legacy script on a button) is not working :
[(init+)(@g_t_img_idx:*){image:#CONCAT(@g_pp,"TrackStatus-", @g_t_img_idx, ".png")#}]
Log file extract below :
- Code:
2024-10-25 17:02:55.8147 2,14ms DEBUG 11 variableAction Execute [BackgroundScript1 Setting variable 'g_t_img_idx'='1']
2024-10-25 17:02:55.8148 0,09ms DEBUG 11 ScriptEngine RunActionList [33100745bd807b89d098dffbd65cd9ad (init+)(@g_t_img_idx:*){image:#CONCAT(@g_pp, "TrackStatus-", @g_t_img_idx, ".png")#}]
2024-10-25 17:02:55.8150 0,19ms DEBUG 11 imageAction Execute [33100745bd807b89d098dffbd65cd9ad showing image '%trevligaspel%/Images/TrackStatus-1.png']
2024-10-25 17:02:55.8152 0,25ms WARN 11 ImageController GetImage [33100745bd807b89d098dffbd65cd9ad Row:1, Column:0 Image '%trevligaspel%/Images/TrackStatus-1.png' could not be found]
And the file does exist :
Edit:
And surprisingly this works (in the legacy script) :
[(init+)(@g_t_img_idx:*){image:#CONCAT("%trevligaspel%/Images/TrackStatus-", @g_t_img_idx, ".png")#}]]
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
Admin wrote:thx538 wrote:And one more thing .... which I think is a regression.
I don't know exactly what you mean by "@g_sname_sel is not replaced when receiving a blank value". The log file has the following entries after receiving a blank value:
- [BackgroundScript1 (sysex:F0 6C 00 XX F7){@g_sname_sel:#IF(HEXVALUE(MID(@e_sysex,1,2))=1, RIGHT(@e_sysextext, LEN(@e_sysextext)-1), CONCAT(@g_sname_sel, RIGHT(@e_sysextext, LEN(@e_sysextext)-1)))#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'=' ']
- ...
- [BackgroundScript1 (@g_sname_sel:" ")(cc:16,24,1-32){@g_sname_sel:#CONCAT("Scene: ",@e_ccvalue)#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'='Scene: 21']
From what I can see, @g_sname_sel is replaced when receiving a blank value.
Now I have a reproduction. The same issue happens again, but it does not come from the background script, bur rather in this code in a scripted dial :
[(init+)(@g_tname_sel:*)(@g_sname_sel:*)(@l_trsc:1){title:#@g_sname_sel#}{text:#@g_tname_sel#}]
Attached is the log file, which says :
Command [(init+)(@g_tname_sel:*)(@g_sname_sel:*)(@l_trsc:1){title:#@g_sname_sel#}{text:#@g_tname_sel#}] not executed since it is in the command chain]
- Attachments
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
jordikt wrote:Minor issue (maybe due differences between macOS and Windows):
Titles of Vol Bar and Pan Bar are slightly misaligned with the v-pot and fader titles (vertically misaligned).
It's not a macOS/Windows difference; the bar title is deliberately raised to give more space to the value row that can be displayed simultaneously.
Re: Scripted dial alpha
I found the fader problem, but don't understand what you mean with the vol/pan bar.jordikt wrote:Issue at Scripted Dial > Display Fader Title and Value at the top
Setting Dial > Rotated while pressed > Value display: controlled by script:
if the script doesn't send nothing and the dial is rotated, the title of the fader is hidden.
Same issue with Scripted Dial > Vol bar and Pan bar (values are hidden)
Re: Scripted dial alpha
thx538 wrote:Hello,
I have this in the initialization of a background script
[(init){@g_pp:%trevligaspel%/Images/}] Picture Path
I have this working well in a scripted dial :
{iconleft:#CONCAT(@g_pp,"Hand-Blue2.png")#}
But this (used in a legacy script on a button) is not working :
[(init+)(@g_t_img_idx:*){image:#CONCAT(@g_pp,"TrackStatus-", @g_t_img_idx, ".png")#}]
OK, found it. The script engine didn't expand environment variables during the execution of an action, only during the parsing of the script.
Re: Scripted dial alpha
This is a built-in safeguard against loops. In the log file you have this sequence:thx538 wrote:...Attached is the log file, which says :
Command [(init+)(@g_tname_sel:*)(@g_sname_sel:*)(@l_trsc:1){title:#@g_sname_sel#}{text:#@g_tname_sel#}] not executed since it is in the command chain]
- [BackgroundScript1 (sysex:F0 6C 00 XX F7){@g_sname_sel:#IF(HEXVALUE(MID(@e_sysex,1,2))=1, RIGHT(@e_sysextext, LEN(@e_sysextext)-1), CONCAT(@g_sname_sel, RIGHT(@e_sysextext, LEN(@e_sysextext)-1)))#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'=' ']
- [33100745bd807b89d098dffbd65cd9ad (init+)(@g_sname_sel:*){text:#CONCAT("Scene", REPT(char(10), 4), @g_sname_sel)#}]
- [c61bf6c5889d76d62adf1bce52bea08c (init+)(@g_tname_sel:*)(@g_sname_sel:*)(@l_trsc:1){title:#@g_sname_sel#}{text:#@g_tname_sel#}]
- [BackgroundScript1 (@g_sname_sel:" ")(cc:16,24,1-32){@g_sname_sel:#CONCAT("Scene ",CHAR(35)," ",@e_ccvalue)#}]
- [BackgroundScript1 Setting variable 'g_sname_sel'='Scene # 14']
- [33100745bd807b89d098dffbd65cd9ad Command [(init+)(@g_sname_sel:*){text:#CONCAT("Scene", REPT(char(10), 4), @g_sname_sel)#}] not executed since it is in the command chain]
If you follow the sequence of events...
Lines 1-2 are the background script reacting to a sysex input, executing a command that sets the @g_sname_sel variable to spaces.
Lines 3-4 are buttons/dials triggered by the changed @g_sname_sel content.
Lines 5-6 are the background script (again) triggered by the blank value in @g_sname_sel and changing the content to 'Scene # 14'.
Line 7 is the same command as line 3, now triggered by the new change of the @g_sname_sel content.
The script engine blocks line 7 since it is already executed in the chain of commands. If it were not blocked, we could potentially get an eternal loop. In this particular case, the command on line 3/7 does not trigger anything in itself, but the script engine doesn't check that. This could possibly be made more intelligent, but that's the way it is at the moment.
Re: Scripted dial alpha
Admin wrote:I found the fader problem, but don't understand what you mean with the vol/pan bar.jordikt wrote:Issue at Scripted Dial > Display Fader Title and Value at the top
Setting Dial > Rotated while pressed > Value display: controlled by script:
if the script doesn't send nothing and the dial is rotated, the title of the fader is hidden.
Same issue with Scripted Dial > Vol bar and Pan bar (values are hidden)
I mean it's the same issue:
- select Volume bar or Pan bar as display
- select Dial > Rotated while pressed > Value display: controlled by script
- use a script that doesn't send any text
If the dial is rotated while pressed, the value text of the bar is hidden.
jordikt- Posts : 278
Join date : 2024-02-10
Re: Scripted dial alpha
Admin wrote:This is a built-in safeguard against loops.thx538 wrote:...Attached is the log file, which says :
Command [(init+)(@g_tname_sel:*)(@g_sname_sel:*)(@l_trsc:1){title:#@g_sname_sel#}{text:#@g_tname_sel#}] not executed since it is in the command chain]
...
This could possibly be made more intelligent, but that's the way it is at the moment.
Thank you for the explanation, it was very clear !
I managed it on my side with a local variable in the background script and a timer to set a global variable and fire the change only once per received (sysex) event.
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
Now i have another issue with this code in a scripted dial :
... where @g_chnum0 is set in the background script with :
[(sysex:F0 6D XX F7){@g_max_ch:#HEXVALUE(MID(@e_sysex,4,2))#}{@g_chnum0:#HEXVALUE(MID(@e_sysex,1,2))#}
{@g_nbp:#HEXVALUE(MID(@e_sysex,7,2))#}{@g_pupdt:0}]
It seems that the {iconleft:#none#} action raises an exception.
Log file Extract :
and it triggers the "Plugin is loading ..." screen of death.
Full log is attached.
Thank you for your attention.
- Code:
[(init+)(@g_chnum0:*){@l_chnum:#@g_chnum0#}{@l_chdisp:1}] Triggered when receiving Sysex
[(@l_chnum:*){@l_chmatch:#IF(@g_chnum0=@l_chnum,1,0)#}]
[(@l_chmatch:1){iconleft:#none#}{text:#IF(@g_max_var=0,"No variation",CONCAT("Var. ",@l_vnum," / ",@g_max_var))#}{@t_chtimer:reset}]
[(@l_chmatch:0){iconleft:#CONCAT(@g_pp,"Hand-Blue2.png")#}{@t_chtimer:restart}]
... where @g_chnum0 is set in the background script with :
[(sysex:F0 6D XX F7){@g_max_ch:#HEXVALUE(MID(@e_sysex,4,2))#}{@g_chnum0:#HEXVALUE(MID(@e_sysex,1,2))#}
{@g_nbp:#HEXVALUE(MID(@e_sysex,7,2))#}{@g_pupdt:0}]
It seems that the {iconleft:#none#} action raises an exception.
Log file Extract :
- Code:
2024-10-26 07:33:43.3283 0,69ms DEBUG 53 sysexEvent SetBuiltinVariables [574b4dc48d1d4c4da4e3cbebd31aebc8 sysex=(04 04 08), sysexvalue=(4), sysextext=()]
2024-10-26 07:33:43.3285 0,23ms DEBUG 53 ScriptEngine RunActionList [BackgroundScript1 (sysex:F0 6D XX F7){@g_max_ch:#HEXVALUE(MID(@e_sysex,4,2))#}{@g_chnum0:#HEXVALUE(MID(@e_sysex,1,2))#}{@g_nbp:#HEXVALUE(MID(@e_sysex,7,2))#}{@g_pupdt:0}]
2024-10-26 07:33:43.3287 0,25ms DEBUG 53 variableAction Execute [BackgroundScript1 Setting variable 'g_max_ch'='4']
2024-10-26 07:33:43.3289 0,18ms DEBUG 53 variableAction Execute [BackgroundScript1 Setting variable 'g_chnum0'='4']
2024-10-26 07:33:43.3294 0,44ms DEBUG 53 ScriptEngine RunActionList [42a2e07344767ba678634cf0b63d1e1e (init+)(@g_chnum0:*){@l_chnum:#@g_chnum0#}{@l_chdisp:1}]
2024-10-26 07:33:43.3294 0,01ms DEBUG 53 DialScript CmddExStartStop [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-26 07:33:43.3295 0,11ms DEBUG 53 variableAction Execute [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum'='4']
2024-10-26 07:33:43.3297 0,22ms DEBUG 53 ScriptEngine RunActionList [42a2e07344767ba678634cf0b63d1e1e (@l_chnum:*){@l_chmatch:#IF(@g_chnum0=@l_chnum,1,0)#}]
2024-10-26 07:33:43.3297 0,01ms DEBUG 53 DialScript CmddExStartStop [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-26 07:33:43.3299 0,14ms DEBUG 53 variableAction Execute [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chmatch'='1']
2024-10-26 07:33:43.3301 0,22ms DEBUG 53 ScriptEngine RunActionList [42a2e07344767ba678634cf0b63d1e1e (@l_chmatch:1){iconleft:#none#}{text:#IF(@g_max_var=0,"No variation",CONCAT("Var. ",@l_vnum," / ",@g_max_var))#}{@t_chtimer:reset}]
2024-10-26 07:33:43.3301 0,01ms DEBUG 53 DialScript CmddExStartStop [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=2]
2024-10-26 07:33:43.3303 0,18ms WARN 53 Script_Action GetValue [42a2e07344767ba678634cf0b63d1e1e exception evalutating expression '#none#' using value '0': System.Exception: The value for variable none was not set!
at org.matheval.Expression.VisitNode(Node root) in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Expression.cs:line 486
at org.matheval.Expression.Eval() in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Expression.cs:line 317
at StreamDeck_Midi.Script.Script_Action.GetSomeValueFromExpression(String contextID, String text, Int32 value) in E:\Projects\StreamDeck-Midi - Net 8\StreamDeck-Midi\Script\Script_Action.cs:line 359]
2024-10-26 07:33:43.3303 0,02ms DEBUG 53 iconleftAction Execute [42a2e07344767ba678634cf0b63d1e1e removing icon]
and it triggers the "Plugin is loading ..." screen of death.
Full log is attached.
Thank you for your attention.
- Attachments
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
jordikt wrote:Issue at Scripted Dial > Display Fader Title and Value at the top
Setting Dial > Rotated while pressed > Value display: controlled by script:
if the script doesn't send nothing and the dial is rotated, the title of the fader is hidden.
Same issue with Scripted Dial > Vol bar and Pan bar (values are hidden)
Same issue if Rotated while pressed > Value display is set to #none# (Fader, Volume bar, Pan bar)
jordikt- Posts : 278
Join date : 2024-02-10
Re: Scripted dial alpha
Hello,
I will be on holiday next week so Gunnar maybe will have a little rest .
I will read this thread but will have no access to my computer.
Have a nice week end !
I will be on holiday next week so Gunnar maybe will have a little rest .
I will read this thread but will have no access to my computer.
Have a nice week end !
thx538- Posts : 128
Join date : 2023-10-23
Re: Scripted dial alpha
YAY! No more error reports.thx538 wrote:Hello,
I will be on holiday next week so Gunnar maybe will have a little rest .
I will read this thread but will have no access to my computer.
Have a nice week end !
I really appreciate your work with detecting script problems. I hope you will have a little rest on a well-deserved holiday.
Page 10 of 11 • 1, 2, 3 ... , 9, 10, 11
Similar topics
» I'd like to hear your thoughts about what you want to see in a scripted dial.
» 3.10.0.5 beta / 3.11 alpha
» Stream Deck+ alpha tester wanted
» Can I use 14-bit CC in dial mode?
» Dial curve definition
» 3.10.0.5 beta / 3.11 alpha
» Stream Deck+ alpha tester wanted
» Can I use 14-bit CC in dial mode?
» Dial curve definition
Page 10 of 11
Permissions in this forum:
You cannot reply to topics in this forum