Dynamic composition of a SysEx message with variable content and length

Can you paste your Script?
Did you give the midi out plugin the gpscript handle KeyLab_mkII_49?

i had a typo now it seems correct it is compiling but β€œsays”
Plugin β€˜KeyLab_mkII_49’ not found in rackspace β€˜emu/jup/modular’…it is not recognising it
do i ha to use the whole β€œcaption” of keylabs midi out? that would be:
MIDI Out (KeyLab mkII 49)

var
KeyLab_mkII_49 : MidiOutBlock;
SysEx : SysexManager;
KeyLab_mkII_49_LCD_PRE : String;
KeyLab_mkII_49_LCD_SEP : String;
KeyLab_mkII_49_LCD_END : String;
ASCII_STRING : String;
ASCII_HEX_STRING : String array;

Initialization
ASCII_STRING = " !"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[Y]^_`abcdefghijklmnopqrstuvwxyz{|}><";
ASCII_HEX_STRING = [β€œ20”,β€œ21”,β€œ22”,β€œ23”,β€œ24”,β€œ25”,β€œ26”,β€œ27”,β€œ28”,β€œ29”,β€œ2A”,β€œ2B”,β€œ2C”,β€œ2D”,β€œ2E”,β€œ2F”,β€œ30”,β€œ31”,β€œ32”,β€œ33”,β€œ34”,β€œ35”,β€œ36”,β€œ37”,β€œ38”,β€œ39”,β€œ3A”,β€œ3B”,β€œ3C”,β€œ3D”,β€œ3E”,β€œ3F”,β€œ40”,β€œ41”,β€œ42”,β€œ43”,β€œ44”,β€œ45”,β€œ46”,β€œ47”,β€œ48”,β€œ49”,β€œ4A”,β€œ4B”,β€œ4C”,β€œ4D”,β€œ4E”,β€œ4F”,β€œ50”,β€œ51”,β€œ52”,β€œ53”,β€œ54”,β€œ55”,β€œ56”,β€œ57”,β€œ58”,β€œ59”,β€œ5A”,β€œ5B”,β€œ5C”,β€œ5D”,β€œ5E”,β€œ5F”,β€œ60”,β€œ61”,β€œ62”,β€œ63”,β€œ64”,β€œ65”,β€œ66”,β€œ67”,β€œ68”,β€œ69”,β€œ6A”,β€œ6B”,β€œ6C”,β€œ6D”,β€œ6E”,β€œ6F”,β€œ70”,β€œ71”,β€œ72”,β€œ73”,β€œ74”,β€œ75”,β€œ76”,β€œ77”,β€œ78”,β€œ79”,β€œ7A”,β€œ7B”,β€œ7C”,β€œ7D”,β€œ7E”,β€œ7F”];
KeyLab_mkII_49_LCD_PRE = "# F0 00 20 6B 7F 42 04 00 60 01 ";
KeyLab_mkII_49_LCD_SEP = " 00 02 β€œ;
KeyLab_mkII_49_LCD_END = " 00 F7”;
End

Function StringToHexString(str : String) Returns String
var i : Integer
result = β€œβ€;

For i=0; i<Length(str) ; i=i+1 Do
result = result + ASCII_HEX_STRING[IndexOfSubstring(ASCII_STRING, CopySubstring(str,i,1), True)];
End
End

Function KeyLab_mkII_49_LCD(line0 : String, line1 : String)
If Length(line0) > 16
Then
line0 = CopySubstring(line0, 0, 16);
End
line0 = StringToHexString(line0);

If Length(line1) > 16
Then
    line1 = CopySubstring(line1, 0, 16);
End
line1 = StringToHexString(line1);


SM_CreateSysexFromString(SysEx, KeyLab_mkII_49_LCD_PRE + line0 + KeyLab_mkII_49_LCD_SEP + line1 + KeyLab_mkII_49_LCD_END); 
SM_SendMidiOut(SysEx, KeyLab_mkII_49);

End

On Activate
var s : String;
s = β€œRackspace:”;
KeyLab_mkII_49_LCD(s, GetRackspaceName());
End

You have to give the gpscript handle.
Available via the popup menu you get when your right click with the mouse on the midi out plugin.

1 Like

thank you sir,inow i can continue

1 Like

hmm still does not display anything-gotta dig deeper

On activate is executed when you switch to that rackspace,
Did you do that?

here comes the anfΓ€nger : where do i do that?

Just create an additional rackspace and then navigate back to your rackspace

i do have two, both with the arturia midi out and the script enabled

Now when you switch between them, what happens?

change of preset works like before,but the dispaly (in whatever mode) does not β€œsee It”
i am supposed to be in user mode if ia m correct

ok i have to be in analog lab mode/preset it does show the second one but not the first one
wich has exactly the same script

replaced the first with a copy of the second one now it works!

1 Like

Strange you had to copy…
Maybe the script was not compiled.

maybe, egal it works,now i have to find out how prevent the keyboard from changing display change everytime i push a button on it, therefore on a gig, the keyboarder sees the rack he is on-thats all the info he needs live…
he wants to use 8 of the pads (top left there are 16) to change presets (8 is far enough for him) but everytime i push one, the display shows the value ,there is no need for it,i jist want a change if the rack gets changed on the display

Does he have an iPad?
with Catalina you could use an IPad like an external monitor or you use duet - a special software.
I think this would be much easier than program the Arturia display.

Or use TouchOSC on an iPhone or Android.
It would be trivial to show the rackspace name on a mobile device.

that is probably the way to go, he has a ipad - noten - thanks a lot anyway

Is it the standard display even if you don’t connect it to the computer or is it a feedback from the computer ? Does it still happen if you open the Arturia ports with GP again ?

There is also the solution to display your custom message again using a timer…

There is also the solution to display your custom message again using a timer…

this is what i need - basically when i recall a rack / variation on the computer it displays correctly the rackname on the keylab
now of course i send from the keylab (pads set to send programm change) to change variations(rack)
the instance i hit a pad, the display switches and shows the values i just send…

What type of MIDI messages are sent by the KeyLab controls? Could we consider that note messages are only sent when you play on the keyboard ? Or do we also have notes sent when you play on the keypad ? If they do, is there a way to differentiate from the keyboard notes (range of played notes, MIDI channel used… usw :wink:)

The idea would be to restart a display timer when any MIDI control message (any MIDI message different from keyboard played MIDI notes) is sent and to adjust the waiting time such that the display is refreshed at the right moment.

the keypads are β€œclean” only send control change
you`re german i presume usw