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

Scripted dial alpha

3 posters

Page 8 of 9 Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next

Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Fri Oct 11, 2024 12:25 am

Admin wrote:Version 3.11.0.352
It seems that there are issues with title and text:

- Fader / Volume bar / Pan bar
The font of the title is not adaptive. The first and last characters are hidden if the title is long.

- Volume bar / Pan bar
The font of the text is not adaptive. The first and last characters are hidden if the text is long.
The text is not taking the whole width of the screen.

You can use this code to test it:

[(init){title:1234567890123456}]
[(press) {@status:onlypressed} {text:#@status#}]
[(rotate:p) {@status:pressedAndRotated} {text:#@status#}]
[(release) (@status:onlypressed) {@status:unpressed} {text:release(n)}]
[(release) (@status:pressedAndRotated) {@status:unpressed} {text:release(p)}]

When you press and rotate, you will see that the text "PressedAndRotated" is cut and it doesn't fill the width:

Scripted dial alpha - Page 8 Bar_te10
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Fri Oct 11, 2024 8:35 am

Hello,
If you rework the adaptative font, may i suggest these improvement :
  • Currently, if we select "Title at the top, value on the fader" in the editor and then "Do nothing" for text collision, the text length is still limited to half of the control width. It would be nice to be able to use up the whole width in this case, depending on the text length.
  • It would be nice, in this case also, to be able to control the text position (center, right, left) as currently it is always on the left.

Thank you

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Fri Oct 11, 2024 12:19 pm

jordikt wrote:It seems that there are issues with title and text
thx538 wrote:If you rework the adaptative font, may i suggest these improvement.
Another case of Windows/Mac differences. The title font sizes are perfect on Windows but not on Mac.  The font is adaptive, but on Mac, it starts to reduce too late. Sad

The value field has never been adaptive or adapted to icon presence (to make it fill the entire space if no icons are present). Making the changes you suggest is "complicated" due to how display designs are defined. Text fields cannot be moved or extended; instead, multiple text fields must be defined, and the plugin must select one of them and hide all the others.

It is, of course, possible since I do it for the title field, but in the list of things I need to do at the moment, these changes have low priority.
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Fri Oct 11, 2024 12:38 pm

Admin wrote:Another case of Windows/Mac differences. The title font sizes are perfect on Windows but not on Mac.  The font is adaptive, but on Mac, it starts to reduce too late. Sad
I have no time to check it now, but if my memory is not lying, the adaptive title was working fine some betas ago. So I think it has been broken during the development.

But maybe I am wrong and the tests I did during the betas were not accurate as the one I did yesterday.

Regarding text, I don't remember if I tried long texts or not.
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Fri Oct 11, 2024 1:29 pm

jordikt wrote:...if my memory is not lying, the adaptive title was working fine some betas ago.
I think your memory is correct. I wasn't happy with the result of the adaptive calculation for dials, but I found out that Elgato is using different default fonts for buttons and dials.

I was using the wrong font when calculating the size for dials, so I changed it. I have now found out that Elgato also uses different default fonts on Windows and Mac for dials. The font I changed to works on Windows but not on Mac. I now have information about the default font on Mac so that I can adjust the calculations.
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sat Oct 12, 2024 8:34 am

Good morning,
I have a little issue with this simple script :
Code:
[(sysex:F0 6A XX F7){value:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum0:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum:#VALUE(MID(@e_sysex,1,2))#}{@g_max_ch:#VALUE(MID(@e_sysex,4,2))#}]
[(@g_max_ch:*){design:#CONCAT(@g_dp, "CH_Navigator ", @g_max_ch, ".xml")#}] Design

It works well, here is the log file:
Code:

2024-10-12 08:24:08.8878  33789,72ms DEBUG    37  sysexEvent       SetBuiltinVariables           [42a2e07344767ba678634cf0b63d1e1e sysex=(04 06), sysexvalue=(4), sysextext=()]
2024-10-12 08:24:08.8878      0,04ms DEBUG    37  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (sysex:F0 6A XX F7){value:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum0:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum:#VALUE(MID(@e_sysex,1,2))#}{@g_max_ch:#VALUE(MID(@e_sysex,4,2))#}]
2024-10-12 08:24:08.8878      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-12 08:24:08.8880      0,18ms DEBUG    37  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 4, WhilePressed=False]
2024-10-12 08:24:08.8881      0,11ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum0'='4']
2024-10-12 08:24:08.8901      2,02ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum'='4']
2024-10-12 08:24:08.8903      0,19ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'g_max_ch'='6']
2024-10-12 08:24:08.8904      0,07ms DEBUG    37  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@g_max_ch:*){design:#CONCAT(@g_dp, "CH_Navigator ", @g_max_ch, ".xml")#}]
2024-10-12 08:24:08.8904      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-12 08:24:08.8906      0,15ms DEBUG    37  designAction     Execute                       [42a2e07344767ba678634cf0b63d1e1e showing design '%trevligaspel%/Designs/CH_Navigator 6.xml']
2024-10-12 08:24:08.8908      0,22ms DEBUG    37  FaderFileCtrl    DetachFromFaderFile           [42a2e07344767ba678634cf0b63d1e1e detached from Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 0.xml)]
2024-10-12 08:24:08.8913      0,51ms DEBUG    37  FaderFileCtrl    VerifyFaderFile               ['C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 6.xml']
2024-10-12 08:24:08.8914      0,09ms DEBUG    37  TSFile           Initialize                    ['C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml' found]
2024-10-12 08:24:08.8914      0,01ms DEBUG    37  FaderFileCtrl    AttachToFaderFile             [File (C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml) added to Fader file cache]
2024-10-12 08:24:08.8914      0,01ms DEBUG    37  FaderFileCtrl    AttachToFaderFile             [42a2e07344767ba678634cf0b63d1e1e attached to Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 6.xml)]
2024-10-12 08:24:08.8914      0,00ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-12 08:24:08.8914      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-12 08:24:08.8914      0,01ms DEBUG    37  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-12 08:24:08.8915      0,08ms DEBUG    65  TSFile           CreateFileWatcher             [File watcher created for 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml']
2024-10-12 08:24:08.8931      1,65ms DEBUG    37  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Background 6.png' fetched from image cache]
2024-10-12 08:24:08.8935      0,39ms DEBUG    37  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Handle.png' fetched from image cache]
2024-10-12 08:24:08.8945      1,01ms DEBUG    37  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Images/Hand-Gray.png' fetched from image cache]
2024-10-12 08:24:08.8955      0,97ms DEBUG    37  Dial_Tools       GetChangedJsonItems           [42a2e07344767ba678634cf0b63d1e1e final result = (isChanged:True) (Json:fader:{"enabled":true,"value":"data:image/png;base64,iVB...}, )
2024-10-12 08:24:08.8956      0,09ms DEBUG    37  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]

Now if add this line at the end of the script :
Code:
[(@l_chnum:*){sysex:F0 5F #@l_chnum0# #@l_chnum# F7}]

It does not work anymore, the design is not applied and here is the (faulty) log file :
Code:
2024-10-12 08:26:01.3513  21297,54ms DEBUG    37  sysexEvent       SetBuiltinVariables           [42a2e07344767ba678634cf0b63d1e1e sysex=(04 06), sysexvalue=(4), sysextext=()]
2024-10-12 08:26:01.3513      0,05ms DEBUG    37  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (sysex:F0 6A XX F7){value:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum0:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum:#VALUE(MID(@e_sysex,1,2))#}{@g_max_ch:#VALUE(MID(@e_sysex,4,2))#}]
2024-10-12 08:26:01.3513      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-12 08:26:01.3515      0,18ms DEBUG    37  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 4, WhilePressed=False]
2024-10-12 08:26:01.3519      0,41ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum0'='4']
2024-10-12 08:26:01.3521      0,14ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum'='4']
2024-10-12 08:26:01.3521      0,05ms DEBUG    37  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_chnum:*){sysex:F0 5F #@l_chnum0# #@l_chnum# F7}]
2024-10-12 08:26:01.3521      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-12 08:26:01.3539      1,78ms DEBUG    37  sysexAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e sending Sysex 'F0 5F 04 04 F7']
2024-10-12 08:26:01.3539      0,03ms DEBUG    37  Connection       Send_SysEx                    [b66a834498534734b7aa57c10dc8b0a4 port(BMT 4), data(F0 5F 04 04 F7)]
2024-10-12 08:26:01.3539      0,02ms DEBUG    37  MidiController   Send_SysEx                    [Sending Data: f0 5f 04 04 f7 ]
2024-10-12 08:26:01.3541      0,16ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-12 08:26:01.3547      0,64ms  WARN    37  Script_Action    GetValue                      [42a2e07344767ba678634cf0b63d1e1e exception evalutating expression '#VALUE(MID(@e_sysex,4,2))#' using value '0': System.Exception: The parameter for function value is supplied with wrong format.
   at org.matheval.Functions.valueFunction.Execute(Dictionary`2 args, ExpressionContext dc) in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Functions\Impl\valueFunction.cs:line 78
   at org.matheval.Expression.ExecuteCallFunc(CallFuncNode callFunc) in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Expression.cs:line 558
   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 523
   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 379]
2024-10-12 08:26:01.3548      0,02ms DEBUG    37  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'g_max_ch'='0']
2024-10-12 08:26:01.3548      0,07ms DEBUG    37  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@g_max_ch:*){design:#CONCAT(@g_dp, "CH_Navigator ", @g_max_ch, ".xml")#}]
2024-10-12 08:26:01.3548      0,00ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-12 08:26:01.3550      0,14ms DEBUG    37  designAction     Execute                       [42a2e07344767ba678634cf0b63d1e1e showing design '%trevligaspel%/Designs/CH_Navigator 0.xml']
2024-10-12 08:26:01.3552      0,20ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-12 08:26:01.3552      0,01ms DEBUG    37  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-12 08:26:01.3552      0,00ms DEBUG    37  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]

Maybe it's not permitted to do this (sending a sysex in the middle of receiving one will screw up the processing), but I wanted to have your opinion.
Thank you for your attention.

Edit: It seems that the same error happens in other cases .. I am investigating


Last edited by thx538 on Sat Oct 12, 2024 1:19 pm; edited 2 times in total

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sat Oct 12, 2024 10:52 am

I also have a weird accumulation of values in the fader display combo box, probably caused by the fact that I use different designs dynamically, so I suppose they are added each time the design changes, although I "only" have 10 different designs.

Scripted dial alpha - Page 8 Combo12


Is there a medicine for this ?
Maybe existing names could be overwritten.


Last edited by thx538 on Sat Oct 12, 2024 11:00 am; edited 2 times in total

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sat Oct 12, 2024 10:54 am

... and finally, out of curiosity as I found a workaround,  i there a way to escape the # character in Math expressions ?

I'd like to conditionally trigger a #none# value for icons.

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Sat Oct 12, 2024 2:41 pm

thx538 wrote:...Maybe it's not permitted to do this (sending a sysex in the middle of receiving one will screw up the processing), but I wanted to have your opinion.
This revealed two pretty serious problems.
  1. The first problem is how I handle event reference variables. I need to have a unique set of event reference variables per command. The problem you see is because event reference variables are cleared when a new command is started, which will happen when you set @g_max_ch and @l_chnum variables.
  2. The second problem is in the math library where the CONCAT function fails if characters like : or \ are present, I don't know why. My fault.  Embarassed


Last edited by Admin on Sat Oct 12, 2024 3:35 pm; edited 1 time in total
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Sat Oct 12, 2024 2:44 pm

thx538 wrote:I also have a weird accumulation of values in the fader display combo box, probably caused by the fact that I use different designs dynamically, so I suppose they are added each time the design changes, although I "only" have 10 different designs.

Is there a medicine for this ?
Maybe existing names could be overwritten.
The important information for the plugin is the path, and I guess all the designs in your list have different paths. Is this a problem?
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Sat Oct 12, 2024 2:54 pm

thx538 wrote:... and finally, out of curiosity as I found a workaround,  i there a way to escape the # character in Math expressions ?

I'd like to conditionally trigger a #none# value for icons.

Removing the # character from Math expressions in general is not possible. What I can do is remove the # requirement for icons and allow the word "none" without hashes. I don't know if that hepls.
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sat Oct 12, 2024 3:52 pm

Admin wrote:
thx538 wrote:...Maybe it's not permitted to do this (sending a sysex in the middle of receiving one will screw up the processing), but I wanted to have your opinion.
This revealed two pretty serious problems.
  1. The first problem is how I handle event reference variables. I need to have a unique set of event reference variables per command. The problem you see is because event reference variables are cleared when a new command is started, which will happen when you set @g_max_ch and @l_chnum variables.
  2. The second problem is in the math library where the CONCAT function fails if characters like : or \ are present, I don't know why.

I'll let you fix these ones then.
  • For the first one it does not necessarily happens all the time but you know better. I have just noticed that the order in which you set variables is important.
  • For the second one I use CONCAT quite often as I store the design path in a global variable. You can see below a log extract with  \ and   / (which is surprisingly not substituted at the end of the path ) :
    FaderFileCtrl    AttachToFaderFile             [42a2e07344767ba678634cf0b63d1e1e attached to Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 0.xml)]
    .. where I have set my global with [(init){@g_dp:%trevligaspel%/Designs/}] in a background script.
    It seems to work here, however.


Admin wrote:
thx538 wrote:I also have a weird accumulation of values in the fader display combo box,
Maybe existing names could be overwritten.
The important information for the plugin is the path, and I guess all the designs in your list have different paths. Is this a problem?
I'm afraid yes it is a problem. I checked a few minutes ago and I had several hundreds of entries in the dropdown. Hopefully, exiting and restarting the app cleared some entries but not all.
As indicated I have only ~10 different designs (All in the same folder : %trevligaspel%/Designs/) but the problem is that the same design (and unique path) is repeated many time.
See another screenshot below after 5 minutes of use :

Scripted dial alpha - Page 8 Combo211

In addition, the last line shows a correct full path, with the mention (not found) at the end, which is something I reported a few month ago IIRC. The design file does exist.
This "not found" may give an indication (or not ... ) of why designs with the same path are added and not replaced in the droipdown.

Admin wrote:
Removing the # character from Math expressions in general is not possible. What I can do is remove the # requirement for icons and allow the word "none" without hashes. I don't know if that hepls.

Yes that would help but this with a lesser priority. I did manage with an intermediate variable that is reused in a later multi event. Like in the example below.
Code:
[(@l_chnum:*){cc:16,51,#@l_chnum#}{@l_chmatch:#IF(@l_chnum0=@l_chnum,1,0)#}] Jump browsing
[(@l_chmatch:1){iconleft:#none#}{text:#CONCAT("Variation ","...")#}{@t_chtimer:reset}]

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Sat Oct 12, 2024 8:53 pm

  • I've made another check of the adaptive font settings to verify that it works in all situations (and on both platforms).
  • The value field for the bar display now has an adaptive font size. It's still restricted and doesn't use the full width, but at least it's adaptive within its field size.
  • For icon actions, you can use "none" without # characters (in addition to #none#) to remove an icon.
  • There was a design flaw in how the script engine handled event reference variables. I had to make a lot of changes in a lot of places to fix this. If you find problems with existing scripts, please report them. @thx538, the problem you had with your sysex script should be solved with this.

@thx538, I cannot reproduce your problem with designs stacking up in the dropdown. If you still have this problem with this version, please enable logging, run some design actions from your script and send me the log file.

Version 3.11.0.389
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Sun Oct 13, 2024 12:57 am

version 3.11.0.389
Adaptive fonts for title and value are working fine in mac.
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sun Oct 13, 2024 8:39 am

Good morning !
Here is my test report :
Admin wrote:
The value field for the bar display now has an adaptive font size. It's still restricted and doesn't use the full width, but at least it's adaptive within its field size.
It works well up to 14 characters here. Longer string are truncated to fit half of the control width, as already discussed. I understand that extending the width as well as providing an option to justify (Left, Center, Right) is on your todo list but with a low priority, Fine !
Admin wrote:
For icon actions, you can use "none" without # characters (in addition to #none#) to remove an icon.
Tested successfully.

Admin wrote:@thx538, the problem you had with your sysex script should be solved with this.
It is only partially resolved.
if we take this command, where @g_max_var is set to zero from the received Sysex :
[(sysex:F0 6B XX F7)
{@g_max_var:#VALUE(MID(@e_sysex,4,2))#}{minmax:p,0,#@g_max_var#}
{@l_vnum0:#VALUE(MID(@e_sysex,1,2))#}
{@l_vnum:#@l_vnum0#}
{text:#IF(@g_max_var=0,"No variation",CONCAT("Var. ",@l_vnum," / ",@g_max_var))#}{value:p,#IF(@g_max_var=0,0,@l_vnum)#}]

It works well and displays "No variation" as long as we have 00 in the second byte of the variable part.
Now if for instance I receive 02 0A as the variable part, it fails, see the log below :
Code:
2024-10-13 07:58:35.5384  13850,50ms DEBUG     9  MidiController   MidiIn_ControlChange          [msg(Channel: Channel4, Control: 31, Value: 5, ControlFunction: Undefined)]
2024-10-13 07:58:35.5384      0,03ms DEBUG     9  MidiController   MidiIn_ControlChange          [port:BMT 5, channel=3, ctrl=31, value=5]
2024-10-13 07:58:35.5385      0,03ms DEBUG     9  MidiStateCtrl    SaveMidiState                 [Saving state for ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:31, Value:5, time=13/10/2024 07:58:35]
2024-10-13 07:58:35.5385      0,05ms DEBUG    67  GenericMidi      Queue_Processor2              [b89f469bacbdebc24a6331867cfe763a handling message (ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:31, Value:5), isReceived(True)]
2024-10-13 07:58:35.5385      0,00ms DEBUG    70  GenericMidi      Queue_Processor2              [42dde86d9785a86c13c9feb80694ad3f handling message (ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:31, Value:5), isReceived(True)]
2024-10-13 07:58:35.5385      0,01ms DEBUG    67  Button_C_Base    MessageReceivedEvent          [b89f469bacbdebc24a6331867cfe763a b89f469bacbdebc24a6331867cfe763a OutPort(BMT 4) InPort(BMT 5) Command(CC)) Setting state: False]
2024-10-13 07:58:35.5385      0,00ms DEBUG    70  Button_C_Base    MessageReceivedEvent          [42dde86d9785a86c13c9feb80694ad3f 42dde86d9785a86c13c9feb80694ad3f OutPort(BMT 4) InPort(BMT 5) Command(CC)) Setting state: False]
2024-10-13 07:58:35.5385      0,00ms DEBUG    67  StateThrottler   SetState                      [b89f469bacbdebc24a6331867cfe763a same state as last, ignoring: State(False)]
2024-10-13 07:58:35.5385      0,00ms DEBUG    70  StateThrottler   SetState                      [42dde86d9785a86c13c9feb80694ad3f same state as last, ignoring: State(False)]
2024-10-13 07:58:35.5386      0,07ms DEBUG     9  variableEvent    IsFulfilled                   [42a2e07344767ba678634cf0b63d1e1e (variable:l_return,1) Event match for variable (l_return), value(1)]
2024-10-13 07:58:35.5394      0,76ms DEBUG     9  sysexEvent       SetBuiltinVariables           [343141faa8814bb098b52c8ea5d75c39 sysex=(06 06), sysexvalue=(6), sysextext=()]
2024-10-13 07:58:35.5398      0,40ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (sysex:F0 6A XX F7){value:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum0:#VALUE(MID(@e_sysex,1,2))#}{@l_chnum:#@l_chnum0#}{@g_max_ch:#VALUE(MID(@e_sysex,4,2))#}(@l_return:1)]
2024-10-13 07:58:35.5398      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-13 07:58:35.5399      0,15ms DEBUG     9  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 6, WhilePressed=False]
2024-10-13 07:58:35.5404      0,47ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum0'='6']
2024-10-13 07:58:35.5404      0,06ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chnum'='6']
2024-10-13 07:58:35.5409      0,44ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_chnum:*){@l_chmatch:#IF(@l_chnum0=@l_chnum,1,0)#}]
2024-10-13 07:58:35.5409      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-13 07:58:35.5410      0,10ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chmatch'='1']
2024-10-13 07:58:35.5417      0,73ms DEBUG     9  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-13 07:58:35.5417      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=2]
2024-10-13 07:58:35.5417      0,01ms DEBUG     9  iconleftAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e removing icon]
2024-10-13 07:58:35.5422      0,49ms DEBUG     9  textAction       SetFaderVPotText              [42a2e07344767ba678634cf0b63d1e1e showing text 'No variation']
2024-10-13 07:58:35.5422      0,01ms DEBUG     9  timerAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Timer 't_chtimer', action 'reset']
2024-10-13 07:58:35.5422      0,00ms DEBUG     9  TimerCtrl        ResetTimer                    [42a2e07344767ba678634cf0b63d1e1e Timer 't_chtimer' reset]
2024-10-13 07:58:35.5422      0,00ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=3]
2024-10-13 07:58:35.5423      0,02ms DEBUG     9  Command          AreAllEventsFulfilled         [42a2e07344767ba678634cf0b63d1e1e Command [(press)(@l_chmatch:1){@l_return:0}{design:#CONCAT(@g_dp, "VAR_Navigator ", @g_max_var, ".xml")#}{value:#@l_vnum#}] not executed since it must be triggered by a (press) event, and the triggering event is (@l_chmatch:1)]
2024-10-13 07:58:35.5423      0,00ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-13 07:58:35.5424      0,10ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'g_max_ch'='6']
2024-10-13 07:58:35.5431      0,71ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@g_max_ch:*){design:#CONCAT(@g_dp, "CH_Navigator ", @g_max_ch, ".xml")#}]
2024-10-13 07:58:35.5431      0,00ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-13 07:58:35.5432      0,09ms DEBUG     9  designAction     Execute                       [42a2e07344767ba678634cf0b63d1e1e showing design '%trevligaspel%/Designs/CH_Navigator 6.xml']
2024-10-13 07:58:35.5433      0,11ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-13 07:58:35.5433      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-13 07:58:35.5433      0,00ms DEBUG     9  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 07:58:35.5451      1,84ms DEBUG     9  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Background 6.png' fetched from image cache]
2024-10-13 07:58:35.5457      0,55ms DEBUG     9  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Handle.png' fetched from image cache]
2024-10-13 07:58:35.5462      0,52ms DEBUG     9  Tools            GetAdjustedFont               [Font size found size=25, rect.Width=200, AdjustedSizeNew.Width=96,93196]
2024-10-13 07:58:35.5463      0,06ms DEBUG     9  Tools            GetAdjustedFont               [Font size found size=16, rect.Width=100, AdjustedSizeNew.Width=94,77083]
2024-10-13 07:58:35.5463      0,03ms DEBUG     9  Dial_Tools       GetChangedJsonItems           [42a2e07344767ba678634cf0b63d1e1e final result = (isChanged:True) (Json:fader:{"enabled":true,"value":"data:image/png;base64,iVB...}, )
2024-10-13 07:58:35.5463      0,06ms DEBUG     9  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 07:58:35.5731     26,74ms DEBUG     9  MidiController   MidiIn_ControlChange          [msg(Channel: Channel4, Control: 32, Value: 1, ControlFunction: LSBForControl0BankSelect)]
2024-10-13 07:58:35.5731      0,03ms DEBUG     9  MidiController   MidiIn_ControlChange          [port:BMT 5, channel=3, ctrl=32, value=1]
2024-10-13 07:58:35.5731      0,01ms DEBUG     9  MidiStateCtrl    SaveMidiState                 [Saving state for ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:32, Value:1, time=13/10/2024 07:58:35]
2024-10-13 07:58:35.5733      0,01ms DEBUG    70  GenericMidi      Queue_Processor2              [42dde86d9785a86c13c9feb80694ad3f handling message (ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:32, Value:1), isReceived(True)]
2024-10-13 07:58:35.5733      0,20ms DEBUG    67  GenericMidi      Queue_Processor2              [b89f469bacbdebc24a6331867cfe763a handling message (ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:3, Control,:32, Value:1), isReceived(True)]
2024-10-13 07:58:35.5734      0,00ms DEBUG    67  Button_C_Base    MessageReceivedEvent          [b89f469bacbdebc24a6331867cfe763a b89f469bacbdebc24a6331867cfe763a OutPort(BMT 4) InPort(BMT 5) Command(CC)) Setting state: False]
2024-10-13 07:58:35.5734      0,02ms DEBUG    70  Button_C_Base    MessageReceivedEvent          [42dde86d9785a86c13c9feb80694ad3f 42dde86d9785a86c13c9feb80694ad3f OutPort(BMT 4) InPort(BMT 5) Command(CC)) Setting state: False]
2024-10-13 07:58:35.5734      0,01ms DEBUG    67  StateThrottler   SetState                      [b89f469bacbdebc24a6331867cfe763a same state as last, ignoring: State(False)]
2024-10-13 07:58:35.5734      0,00ms DEBUG    70  StateThrottler   SetState                      [42dde86d9785a86c13c9feb80694ad3f same state as last, ignoring: State(False)]
2024-10-13 07:58:35.5739      0,50ms DEBUG     9  sysexEvent       SetBuiltinVariables           [831b2dee70fe4d6ea4565d9f77fcd29c sysex=(02 0A), sysexvalue=(2), sysextext=(
)]
2024-10-13 07:58:35.5742      0,33ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (sysex:F0 6B XX F7){@l_vnum0:#VALUE(MID(@e_sysex,1,2))#}{@g_max_var:#VALUE(MID(@e_sysex,4,2))#}{minmax:p,0,#@g_max_var#}{@l_vnum:#@l_vnum0#}{value:p,#IF(@g_max_var=0,0,@l_vnum)#}]
2024-10-13 07:58:35.5742      0,00ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-13 07:58:35.5744      0,14ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_vnum0'='2']
2024-10-13 07:58:35.5759      1,52ms  WARN     9  Script_Action    GetValue                      [42a2e07344767ba678634cf0b63d1e1e exception evalutating expression '#VALUE(MID(@e_sysex,4,2))#' using value '0': System.Exception: The parameter for function value is supplied with wrong format.
   at org.matheval.Functions.valueFunction.Execute(Dictionary`2 args, ExpressionContext dc) in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Functions\Impl\valueFunction.cs:line 78
   at org.matheval.Expression.ExecuteCallFunc(CallFuncNode callFunc) in E:\Projects\StreamDeck-Midi - Net 8\expression-evaluator-c-sharp-main\Math expression eval\org.matheval\Expression.cs:line 558
   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 523
   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 385]
2024-10-13 07:58:35.5759      0,02ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'g_max_var'='0']
2024-10-13 07:58:35.5763      0,41ms DEBUG     9  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_vnum'='2']
2024-10-13 07:58:35.5763      0,03ms DEBUG     9  variableEvent    IsFulfilled                   [42a2e07344767ba678634cf0b63d1e1e (variable:l_return,0) Event not met for variable (l_return), Variable value(1), Event value(0-0)]
2024-10-13 07:58:35.5771      0,80ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_vnum:*){text:#IF(@g_max_var=0,"No variation",CONCAT("Var. ",@l_vnum," / ",@g_max_var))#}]
2024-10-13 07:58:35.5771      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-13 07:58:35.5777      0,58ms DEBUG     9  textAction       SetFaderVPotText              [42a2e07344767ba678634cf0b63d1e1e showing text 'No variation']
2024-10-13 07:58:35.5777      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-13 07:58:35.5778      0,08ms DEBUG     9  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 0, WhilePressed=True]
2024-10-13 07:58:35.5778      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-13 07:58:35.5778      0,00ms DEBUG     9  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 07:58:35.5794      1,55ms DEBUG     9  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 07:58:35.5805      1,11ms DEBUG     9  sysexEvent       SetBuiltinVariables           [8a7158cfbb0e4dd7897c1676dd52e85a sysex=(45 70 69 63 20 54 72 61), sysexvalue=(69), sysextext=(Epic Tra)]
2024-10-13 07:58:35.5808      0,34ms DEBUG     9  ScriptEngine     RunActionList                 [BackgroundScript1 (sysex:F0 6D 00 XX F7){@g_dname_sel:#IF(ISBLANK(TRIM(@e_sysextext))," ",TRIM(LEFT(@e_sysextext,8)))#}]
2024-10-13 07:58:35.5810      0,21ms DEBUG     9  variableAction   Execute                       [BackgroundScript1 Setting variable 'g_dname_sel'='Epic Tra']
2024-10-13 07:58:35.5818      0,71ms DEBUG     9  ScriptEngine     RunActionList                 [bad77c5fe37de4213448748a34d5cd56 (@g_dname_sel:*){text:#CONCAT(@g_tname_sel, REPT(char(10), 4), @g_dname_sel)#}]
2024-10-13 07:58:35.5819      0,14ms DEBUG     9  textAction       Execute                       [bad77c5fe37de4213448748a34d5cd56 showing text 'Lead 2¤¤¤¤Epic Tra']
2024-10-13 07:58:35.5819      0,00ms DEBUG     9  TitleThrottler   SetTitle                      [bad77c5fe37de4213448748a34d5cd56 Delaying title 'Lead 2¤¤¤¤Epic Tra' for 50 ms]
2024-10-13 07:58:35.5828      0,86ms DEBUG     9  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (init+)(@g_dname_sel:*){title:#@g_dname_sel#}]
2024-10-13 07:58:35.5828      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-13 07:58:35.5829      0,13ms DEBUG     9  titleAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e showing title 'Epic Tra']
2024-10-13 07:58:35.5829      0,01ms DEBUG     9  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-13 07:58:35.5829      0,01ms DEBUG     9  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 07:58:35.5850      2,12ms DEBUG     9  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Background 6.png' fetched from image cache]
2024-10-13 07:58:35.5859      0,87ms DEBUG     9  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Handle.png' fetched from image cache]
2024-10-13 07:58:35.5866      0,65ms DEBUG     9  Tools            GetAdjustedFont               [Font size found size=25, rect.Width=200, AdjustedSizeNew.Width=97,21272]
2024-10-13 07:58:35.5870      0,42ms DEBUG     9  Tools            GetAdjustedFont               [Font size found size=16, rect.Width=100, AdjustedSizeNew.Width=94,77083]
2024-10-13 07:58:35.5870      0,04ms DEBUG     9  Dial_Tools       GetChangedJsonItems           [42a2e07344767ba678634cf0b63d1e1e final result = (isChanged:True) (Json:value_full:{"enabled":true,"value":"Epic Tra","color":"#FFC800","font":{"weight":531,"size":25}}, )
2024-10-13 07:58:35.5871      0,06ms DEBUG     9  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]

[REST OF THE LOG SKIPPED AND NOT RELEVANT TO AVOID MESSAGE TOO LONG]

I think the problem is due to the fact that x'0A' (Value 10) is rejected and g_max_var is set to zero instead. Indeed #VALUE(MID(@e_sysex,4,2))# fails because it expects a text containing an integer, not an hexadecimal value.

I just had a look at the documentation of the math library but could not find anything like HEX(Text) that would return an integer. I did not find anything useful in the sysex event reference documentation, as well.
... which reminds me of this discussion.
Admin wrote:
thx538 wrote:
More generally speaking is there a way to catch a given byte of the incoming variable part as an integer (like e_sysexvalue but for the 2nd byte, 3rd byte ...) or do I have to crawl the @e_sysex variable ?
I'm checking your question. I thought I knew the answer, but a (possible) bug in the math library is causing problems. I'll investigate further.
It should be fixed, in my opinion,  because sysex is not supposed to be reserved for text only but also for numerical values.
How are we going to solve this ?

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sun Oct 13, 2024 8:46 am

Admin wrote:
@thx538, I cannot reproduce your problem with designs stacking up in the dropdown. If you still have this problem with this version, please enable logging, run some design actions from your script and send me the log file.
Here is the log file with two design changes, one on press and one on release :
Code:
2024-10-13 04:34:24.8396 182653,05ms DEBUG    26  DialScript       DialDown                      [42a2e07344767ba678634cf0b63d1e1e]
2024-10-13 04:34:24.8397      0,10ms DEBUG    26  ScriptEngine     DialPressed                   [42a2e07344767ba678634cf0b63d1e1e Start]
2024-10-13 04:34:24.8397      0,04ms DEBUG    26  variableEvent    IsFulfilled                   [42a2e07344767ba678634cf0b63d1e1e (variable:l_chmatch,0) Event not met for variable (l_chmatch), Variable value(1), Event value(0-0)]
2024-10-13 04:34:24.8397      0,00ms DEBUG    26  variableEvent    IsFulfilled                   [42a2e07344767ba678634cf0b63d1e1e (variable:l_chmatch,1) Event match for variable (l_chmatch), value(1)]
2024-10-13 04:34:24.8398      0,00ms DEBUG    26  ScriptEngine     DialPressed                   [42a2e07344767ba678634cf0b63d1e1e Executing command (press)(@l_chmatch:1){@l_return:0}{design:#CONCAT(@g_dp, "VAR_Navigator ", @g_max_var, ".xml")#}{value:#@l_vnum#}]
2024-10-13 04:34:24.8399      0,11ms DEBUG    26  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (press)(@l_chmatch:1){@l_return:0}{design:#CONCAT(@g_dp, "VAR_Navigator ", @g_max_var, ".xml")#}{value:#@l_vnum#}]
2024-10-13 04:34:24.8399      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-13 04:34:24.8399      0,01ms DEBUG    26  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_return'='0']
2024-10-13 04:34:24.8399      0,01ms DEBUG    26  variableEvent    IsFulfilled                   [42a2e07344767ba678634cf0b63d1e1e (variable:l_vnum,-2147483648-2147483647) Event match for variable (l_vnum), value(5)]
2024-10-13 04:34:24.8400      0,09ms DEBUG    26  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_vnum:*)(@l_return:0){value:#@l_vnum#}{@l_vmatch:#IF(@l_vnum0=@l_vnum,1,0)#}]
2024-10-13 04:34:24.8400      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-13 04:34:24.8403      0,36ms DEBUG    26  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 5, WhilePressed=False]
2024-10-13 04:34:24.8405      0,15ms DEBUG    26  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_vmatch'='1']
2024-10-13 04:34:24.8406      0,11ms DEBUG    26  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_vmatch:1){iconleft:#none#}]
2024-10-13 04:34:24.8406      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=2]
2024-10-13 04:34:24.8406      0,01ms DEBUG    26  iconleftAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e removing icon]
2024-10-13 04:34:24.8406      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=3]
2024-10-13 04:34:24.8406      0,02ms DEBUG    26  Command          AreAllEventsFulfilled         [42a2e07344767ba678634cf0b63d1e1e Command [(release:r)(@l_vmatch:1){@l_return:1}] not executed since it must be triggered by a (release) event, and the triggering event is (@l_vmatch:1)]
2024-10-13 04:34:24.8406      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-13 04:34:24.8408      0,12ms DEBUG    26  designAction     Execute                       [42a2e07344767ba678634cf0b63d1e1e showing design '%trevligaspel%/Designs/VAR_Navigator 5.xml']
2024-10-13 04:34:24.8409      0,18ms DEBUG    26  FaderFileCtrl    DetachFromFaderFile           [42a2e07344767ba678634cf0b63d1e1e detached from Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 6.xml)]
2024-10-13 04:34:24.8411      0,14ms DEBUG    26  FaderFileCtrl    VerifyFaderFile               ['C:\Users\LPA\Documents\Trevliga Spel\Designs/VAR_Navigator 5.xml']
2024-10-13 04:34:24.8411      0,04ms DEBUG    26  TSFile           Initialize                    ['C:\Users\LPA\Documents\Trevliga Spel\Designs\VAR_Navigator 5.xml' found]
2024-10-13 04:34:24.8411      0,00ms DEBUG    26  FaderFileCtrl    AttachToFaderFile             [File (C:\Users\LPA\Documents\Trevliga Spel\Designs\VAR_Navigator 5.xml) added to Fader file cache]
2024-10-13 04:34:24.8411      0,00ms DEBUG    26  FaderFileCtrl    AttachToFaderFile             [42a2e07344767ba678634cf0b63d1e1e attached to Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/VAR_Navigator 5.xml)]
2024-10-13 04:34:24.8412      0,04ms DEBUG    26  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 5, WhilePressed=False]
2024-10-13 04:34:24.8412      0,00ms DEBUG    26  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-13 04:34:24.8412      0,00ms DEBUG    26  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:24.8412      0,06ms DEBUG    11  TSFile           CreateFileWatcher             [File watcher created for 'C:\Users\LPA\Documents\Trevliga Spel\Designs\VAR_Navigator 5.xml']
2024-10-13 04:34:24.8426      1,35ms DEBUG    26  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\VAR_Navigator_Background 5.png' fetched from image cache]
2024-10-13 04:34:24.8432      0,57ms DEBUG    26  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\VAR_Navigator_Handle.png' fetched from image cache]
2024-10-13 04:34:24.8438      0,60ms DEBUG    26  Tools            GetAdjustedFont               [Font size found size=25, rect.Width=200, AdjustedSizeNew.Width=102,632645]
2024-10-13 04:34:24.8438      0,05ms DEBUG    26  Tools            GetAdjustedFont               [Font size found size=22, rect.Width=100, AdjustedSizeNew.Width=97,59993]
2024-10-13 04:34:24.8438      0,04ms DEBUG    26  Dial_Tools       GetChangedJsonItems           [42a2e07344767ba678634cf0b63d1e1e final result = (isChanged:True) (Json:fader:{"enabled":true,"value":"data:image/png;base64,iVB...}, )
2024-10-13 04:34:24.8439      0,06ms DEBUG    26  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:24.8443      0,39ms DEBUG    26  DialScript       SendToPI                      [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:24.8446      0,27ms DEBUG    26  ScriptEngine     DialPressed                   [42a2e07344767ba678634cf0b63d1e1e End]
2024-10-13 04:34:26.3315   1486,92ms DEBUG    12  DialScript       DialUp                        [42a2e07344767ba678634cf0b63d1e1e isRotated=False]
2024-10-13 04:34:26.3315      0,03ms DEBUG    12  ScriptEngine     DialReleased                  [42a2e07344767ba678634cf0b63d1e1e Start]
2024-10-13 04:34:26.3315      0,01ms DEBUG    12  ScriptEngine     DialReleased                  [42a2e07344767ba678634cf0b63d1e1e executing command ((release:n){@l_return:1})]
2024-10-13 04:34:26.3316      0,11ms DEBUG    12  releaseEvent     SetBuiltinVariables           [cce1c84f22284404a7dc09300a9449f3 rotated=(False)]
2024-10-13 04:34:26.3317      0,03ms DEBUG    12  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (release:n){@l_return:1}]
2024-10-13 04:34:26.3317      0,00ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=0]
2024-10-13 04:34:26.3317      0,01ms DEBUG    12  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_return'='1']
2024-10-13 04:34:26.3318      0,10ms DEBUG    12  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_return:1){design:#CONCAT(@g_dp, "CH_Navigator ", @g_max_ch, ".xml")#}{value:#@l_chnum#}{iconleft:#none#}{@l_chmatch:1}]
2024-10-13 04:34:26.3318      0,00ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=1]
2024-10-13 04:34:26.3322      0,45ms DEBUG    12  designAction     Execute                       [42a2e07344767ba678634cf0b63d1e1e showing design '%trevligaspel%/Designs/CH_Navigator 6.xml']
2024-10-13 04:34:26.3323      0,11ms DEBUG    12  FaderFileCtrl    DetachFromFaderFile           [42a2e07344767ba678634cf0b63d1e1e detached from Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/VAR_Navigator 5.xml)]
2024-10-13 04:34:26.3325      0,14ms DEBUG    12  FaderFileCtrl    VerifyFaderFile               ['C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 6.xml']
2024-10-13 04:34:26.3325      0,04ms DEBUG    12  TSFile           Initialize                    ['C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml' found]
2024-10-13 04:34:26.3325      0,00ms DEBUG    12  FaderFileCtrl    AttachToFaderFile             [File (C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml) added to Fader file cache]
2024-10-13 04:34:26.3325      0,00ms DEBUG    12  FaderFileCtrl    AttachToFaderFile             [42a2e07344767ba678634cf0b63d1e1e attached to Fader file (C:\Users\LPA\Documents\Trevliga Spel\Designs/CH_Navigator 6.xml)]
2024-10-13 04:34:26.3326      0,07ms DEBUG    12  valueAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting value 3, WhilePressed=False]
2024-10-13 04:34:26.3326      0,01ms DEBUG    12  iconleftAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e removing icon]
2024-10-13 04:34:26.3326      0,00ms DEBUG    12  variableAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e Setting variable 'l_chmatch'='1']
2024-10-13 04:34:26.3327      0,05ms DEBUG    26  TSFile           CreateFileWatcher             [File watcher created for 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator 6.xml']
2024-10-13 04:34:26.3327      0,05ms DEBUG    12  ScriptEngine     RunActionList                 [42a2e07344767ba678634cf0b63d1e1e (@l_chmatch:1){iconleft:#none#}{text:#CONCAT("Var. ",@l_vnum," / ",@g_max_var)#}{@t_chtimer:reset}]
2024-10-13 04:34:26.3327      0,00ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=True, commandCount=2]
2024-10-13 04:34:26.3327      0,00ms DEBUG    12  iconleftAction   Execute                       [42a2e07344767ba678634cf0b63d1e1e removing icon]
2024-10-13 04:34:26.3330      0,27ms DEBUG    12  textAction       SetFaderVPotText              [42a2e07344767ba678634cf0b63d1e1e showing text 'Var. 5 / 5']
2024-10-13 04:34:26.3330      0,01ms DEBUG    12  timerAction      Execute                       [42a2e07344767ba678634cf0b63d1e1e Timer 't_chtimer', action 'reset']
2024-10-13 04:34:26.3330      0,00ms DEBUG    12  TimerCtrl        ResetTimer                    [42a2e07344767ba678634cf0b63d1e1e Timer 't_chtimer' reset]
2024-10-13 04:34:26.3330      0,00ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=3]
2024-10-13 04:34:26.3330      0,01ms DEBUG    12  Command          AreAllEventsFulfilled         [42a2e07344767ba678634cf0b63d1e1e Command [(press)(@l_chmatch:1){@l_return:0}{design:#CONCAT(@g_dp, "VAR_Navigator ", @g_max_var, ".xml")#}{value:#@l_vnum#}] not executed since it must be triggered by a (press) event, and the triggering event is (@l_chmatch:1)]
2024-10-13 04:34:26.3330      0,01ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=2]
2024-10-13 04:34:26.3330      0,00ms DEBUG    12  DialScript       CmddExStartStop               [42a2e07344767ba678634cf0b63d1e1e isStart=False, commandCount=1]
2024-10-13 04:34:26.3330      0,00ms DEBUG    12  DialScript       PrepareDropDowns              [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:26.3344      1,35ms DEBUG    12  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Background 6.png' fetched from image cache]
2024-10-13 04:34:26.3350      0,66ms DEBUG    12  ImageController  GetImage                      [42a2e07344767ba678634cf0b63d1e1e Image 'C:\Users\LPA\Documents\Trevliga Spel\Designs\CH_Navigator_Handle.png' fetched from image cache]
2024-10-13 04:34:26.3356      0,60ms DEBUG    12  Tools            GetAdjustedFont               [Font size found size=25, rect.Width=200, AdjustedSizeNew.Width=102,632645]
2024-10-13 04:34:26.3357      0,05ms DEBUG    12  Tools            GetAdjustedFont               [Font size found size=22, rect.Width=100, AdjustedSizeNew.Width=97,59993]
2024-10-13 04:34:26.3357      0,04ms DEBUG    12  Dial_Tools       GetChangedJsonItems           [42a2e07344767ba678634cf0b63d1e1e final result = (isChanged:True) (Json:fader:{"enabled":true,"value":"data:image/png;base64,iVB...}, )
2024-10-13 04:34:26.3358      0,12ms DEBUG    12  DialScript       SaveSettings                  [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:26.3363      0,49ms DEBUG    12  DialScript       SendToPI                      [42a2e07344767ba678634cf0b63d1e1e ]
2024-10-13 04:34:26.3368      0,45ms DEBUG    12  ScriptEngine     DialReleased                  [42a2e07344767ba678634cf0b63d1e1e End]

Values (as defined in the "Fader displayname" xml tag) are still accumulating in the dropdown, as well as the last entry with the "(not found)" mention.

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Sun Oct 13, 2024 8:52 am

Admin wrote: If you find problems with existing scripts, please report them.
I have not seen any problem with my existing scripts.

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Sun Oct 13, 2024 2:04 pm

thx538 wrote:It is only partially resolved...
I think the problem is due to the fact that x'0A' (Value 10) is rejected and g_max_var is set to zero instead.
I have added the math function HEXVALUE(), which handles hex values correctly.

thx538 wrote:Values (as defined in the "Fader displayname" xml tag) are still accumulating in the dropdown, as well as the last entry with the "(not found)" mention.
Interesting. Combining an environment variable and macOS path delimiters in a variable on a Windows system tricked the plugin. I thought I had taken care of that but missed one step in the conversions. It is fixed now.

Version 3.11.0.396
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Mon Oct 14, 2024 6:22 pm

Thank you for this version.
I have not found any issue
I am now able to control Instrument racks and macro variations in Live as I planned to :

Scripted dial alpha - Page 8 Rackva10

All of it with a single scripted dial (Fader), with different views.
Current device in the chain
Scripted dial alpha - Page 8 Image110
Navigating the device chain
Scripted dial alpha - Page 8 Image210
Current variation
Scripted dial alpha - Page 8 Image310
Navigating variations
Scripted dial alpha - Page 8 Image410

The scripting capabilities are really impressive.
Bravo !!!

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by thx538 Mon Oct 14, 2024 6:25 pm

One more thing, I have observed that background scripts in other streamdeck profiles than the current one are still active.
Is it the intended behavior ?

thx538

Posts : 109
Join date : 2023-10-23

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Mon Oct 14, 2024 7:05 pm

thx538 wrote:One more thing, I have observed that background scripts in other streamdeck profiles than the current one are still active.
Is it the intended behavior ?
That's the main reason background scripts exist, so it's definitely intended. Very Happy
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Yesterday at 3:36 pm

version 3.11.0.396

It seems that something happens with generic midi button > scripted v-pot

Use this code:

[(cc:1,39,*) {value:#@e_ccvalue#} {text:#none#}]
[(vpot:*) {cc:1,39,#@e_vpotvalue#} {text:#none#}]
[(cc:1,39,0) {text:MIN}]
[(cc:1,39,127) {text:MAX}]

It seems that [(vpot:*) {cc:1,39,#@e_vpotvalue#}] is not working because pressing the button doesn't move the vpot (rotation speed is not set to zero).

Also a double press doesn't change direction when "both ways" are selected.

Also in the editor there is a label called "Script Syntax" that I don't remember to see it before (no idea what is this).

I have tested single v-pot and lower&upper v-pots and both options have the same problems.


The cc reveiced from the daw works correctly and move the vpot.
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Yesterday at 3:41 pm

The same issue happens with generic midii button > scripted fader

The cocde [(fader:*) {cc:1,39,#@e_fadervalue#}] doesn't work. Pressing the button doesn't move the fader.

There is also an "Script Syntax" label in the editor.

Single fader and lower&upper faders have the same problems.

The cc reveiced from the daw works correctly and moves the scripted fader.
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by jordikt Yesterday at 4:06 pm

The "Script Syntax" label is also shown when "Scripted button" is selected.

Scripted button seems to work well, no issues.
jordikt
jordikt

Posts : 271
Join date : 2024-02-10

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Admin Yesterday at 4:25 pm

Thanks. I'm trying to figure out what has happened.

The "Script Syntax" label is displayed if something is wrong with the script. If no message is present, the label is supposed to be hidden...
Admin
Admin
Admin

Posts : 1210
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Scripted dial alpha - Page 8 Empty Re: Scripted dial alpha

Post by Sponsored content


Sponsored content


Back to top Go down

Page 8 of 9 Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next

Back to top

- Similar topics

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