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

I can't have sysex to work

2 posters

Go down

I can't have sysex to work  Empty I can't have sysex to work

Post by thx538 Wed Jul 17, 2024 8:09 am

Hello,
I have the following background script :
Code:
[(config){TriggerOnLocalMidiEvents:No}]
[(init){@g_tname:"Init"}{@g_tnupd:1}]
[(sysex: F0 6E 00 XX 00 6E F7){@g_tname:#@e_sysextext#}{@g_tnupd:1}]

and then a "script" button with this code :
Code:
[(@g_tnupd:1){text:#@g_tname#}{@g_tnupd:0}]

The text is properly initialized but the sysex event does nothing.
Looking at the log file there is no trace of the sysex event received.
... and also, using {@g_tname:*} as the trigger does nothing.

I have checked the port In for the background script.
I must be doing something wrong !



Thanks for your support

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by Admin Wed Jul 17, 2024 12:13 pm

Please enable extended logging, send the Sysex command from whatever is sending that, and send me the log file.
Admin
Admin
Admin

Posts : 1128
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by thx538 Wed Jul 17, 2024 2:27 pm

OK, thanks I Will...
When I return from holiday by the end of this month.

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by thx538 Mon Aug 05, 2024 8:36 am

Hello, I'm back from holiday.
For additional testing I have sent two events from the log file with a small delay. This is the log from Bome Midi Translator :

Code:
MIDI OUT [Bome MIDI Translator 5 Virtual Out]: BF 08 3C
MIDI OUT [Bome MIDI Translator 5 Virtual Out]: F0 6E 00 61 62 63 00 6E F7

The first one (CC 8 on CH. 16) appears in the log file and is processed correctly (with another background script wich contains: [(cc:16,8,0-127){@g_n8:#@e_ccvalue#}{@g_nupd:1}])

The second one (SYSEX) does not appear in the log file wich only contains :
Code:
2024-08-05 08:22:36.5319  18655,31ms DEBUG    20  MidiController   MidiIn_ControlChange          [msg(Channel: Channel16, Control: 8, Value: 60)]
2024-08-05 08:22:36.5319      0,02ms DEBUG    20  MidiController   MidiIn_ControlChange          [port:BMT 5, channel=15, ctrl=8, value=60]
2024-08-05 08:22:36.5319      0,01ms DEBUG    20  MidiStateCtrl    SaveMidiState                 [Saving state for ControlChangeMessage, ID:MidiController, MidiIn:BMT 5, MidiOut:, Channel:15, Control,:8, Value:60, time=05/08/2024 08:22:36]
2024-08-05 08:22:36.5321      0,13ms DEBUG    20  ScriptEngine     RunActionList                 [BackgroundScript1  CC:15,8,0-127]
2024-08-05 08:22:36.5322      0,10ms DEBUG    20  ScriptEngine     SetVariable                   [BackgroundScript1  Setting variable 'g_n8'='60']
2024-08-05 08:22:36.5322      0,04ms DEBUG    20  ScriptEngine     SetVariable                   [BackgroundScript1  Setting variable 'g_nupd'='1']
2024-08-05 08:22:44.3808   7848,58ms DEBUG    22  BackgroundScript OnSendToPlugin                [7e83196e013e7bff737be5496ccc11d6

Plugin version: 3.10.0.376
Thanks for your support.

Edit: I also tried to increase the Number of plugin-internal ports from 0 to 1 with no effect. Indeed it was always set to 0 and variables update (from my other background script) are communicated properly across scripts despite the value 0. Is it normal?

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by Admin Mon Aug 05, 2024 11:16 am

Thanks.

The sysex matching routine had a bug where it couldn't handle that the sysex string in the script command started with a space character. Embarassed

If you change...

[(sysex: F0 6E 00 XX 00 6E F7){@g_tname:#@e_sysextext#}{@g_tnupd:1}]

to...

[(sysex:F0 6E 00 XX 00 6E F7){@g_tname:#@e_sysextext#}{@g_tnupd:1}]

it should work.

This bug is fixed in the latest beta version in the beta thread.

The plugin-internal ports are Midi ports and have nothing to do with script variables.
Admin
Admin
Admin

Posts : 1128
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by thx538 Mon Aug 05, 2024 2:30 pm

Thank you,
I've not tested the new beta but it works with your suggested correction.
I have now another issue :
  • at initialization the initial string is centered
  • when i received the sysex and execute ](@g_tname:*){text:#@g_tname#}], the text is not centered and there is a strange character in front of the received string (@g_tname="Lead 2" in my example)




See image below, any idea ?


I can't have sysex to work  Lead_211

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by Admin Mon Aug 05, 2024 3:14 pm

thx538 wrote:See image below, any idea ?

If I can see what the sysex command looks like, I may have an idea.
Admin
Admin
Admin

Posts : 1128
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by thx538 Mon Aug 05, 2024 5:22 pm

Ooops, sorry the "strange" character was a mistake from my side (Forgot to filter one digit).
This is what I have at the moment in the background script :
Code:
[(init){@g_tname:"Blank"}]
[(sysex:F0 6E 00 XX F7){@g_tname:#RIGHT(@e_sysextext,8)#}]

and in the receiving scripted button:

Code:
[(@g_tname:*){text:#@g_tname#}]


Now remains the difference between initialization (Text is centered, @g_tname="Blank") and refresh via Sysex (Text is not centered, @g_tname="Lead 2" in this example).

I can't have sysex to work  Blank10
I can't have sysex to work  Lead_212

Thank you for your patience.

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by Admin Mon Aug 05, 2024 9:41 pm

The text isn't "Lead 2", the text is "Lead 2 ".

You extract 8 characters in your background script, and the displayed text is those 8 characters, centered.

You can try this to remove excess whitespace:

[(@g_tname:*){text:#TRIM(@g_tname)#}]
Admin
Admin
Admin

Posts : 1128
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

I can't have sysex to work  Empty Re: I can't have sysex to work

Post by thx538 Tue Aug 06, 2024 7:14 am

oooh .... stupid me ! I can't have sysex to work  1f62c 
Thanks for your support.

thx538

Posts : 54
Join date : 2023-10-23

Back to top Go down

Back to top

- Similar topics

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