Scripts needing (re)compiling

Why do some scripts randomly need to be re-compiled? Occasionally I notice something isn’t working like its supposed (via scripting) so I just open the script editor, hit “compile” and voila, it works again! I’ve experienced this in rackspace script, as well as scriptlets. For example, I use the plugin persist scriptlet and sometimes I notice that a plugin that I have turned off (bypassed) via a widget (linked to plugin persist scriptlet) is still active or visa versa. The toggle widget isn’t working. So I open the scriptlet editor and compile again and it always works after that. So why do some scripts and scriptlets need to be “refreshed” every once in a while?

The only time I’ve encountered that is if something goes wrong in the script - I think if it’s not a crash, then GP can disable the script (not sure)? Did anything show up in the script logger when this happened?

Were you editing panels/rackspaces at the time? e.g. the script might have been referencing a widget/plugin that was removed?

No, no error messages pop up. I just randomly notice that that plugin (lets say) is not being bypassed.
No editing of the scripts themselves. I might have edited a rackspace visually, or added a widget, but nothing that required editing of the script(s).

I’ve noticed that in the Plug-in Persist too. I’ve never tried the re-compile though. Usually I notice it if I’ve modified the rack space slightly. It will work flawlessly for a while and then suddenly one particular switch won’t reset.

Do you have a reproducible example of scripts stopping working? This is the first time I’ve ever heard of this problem

It seems random and rare (thank God LOL) or at least I haven’t figured out what causes it or notice a pattern of when it does it, thus can’t really tell you how to reproduce it. I’ll try to keep an eye out for a pattern…

It MIGHT be related to saving custom states of rackspaces is in setlist view (or editing rackspaces in general). At least that’s what I was doing just now as well as loading and playing files in the midi file player and it just did it. The plug-in persist script that needed to be recompiled.

I think I just figured my problem out too. I had three rackspaces using Plugin Persist…the original with three 70s Pianos, another I had added Blue 3 and also two more variations combining two pianos, and another with B-3X (with a separate MIDI In transposed up 12) and the two additional variations.

The first two rackspaces always worked perfectly. But the third would change the switch widget to the first plugin but not the green LED. I finally discovered that somehow (in the scriplets) the plugin bypass-CC numbers had gotten changed. Probably I had moved one at some point and moved it to 127 (not understanding the full scriplet).
Anyway, I adjusted the three CC numbers to their correct setting and all is well. Thanks for reminding me of this problem. I had quit using it because I didn’t trust it anymore. I knew it was something I did…just couldn’t figure it out.

To avoid this mistake, I actually changed the code in each occurrence to the correct value needed for that particular plugin. In other words instead of using the slider. That way if i recompile, it always goes back to the correct one. :slight_smile:

1 Like

As far as I remember what I did, the Plugin Persist uses the Local GP Port to inject MIDI messages. What would happen if at loading time the Local GP Port is not ready? I think if a Midi Device is missing while a script needs it, this would stop the script from working.

1 Like

I would like to see Scriptlet evolving to be able to map a plugin parameter to a Scriptlet parameter (I think this as to be discussed later and is not the point of this topic). But, as it is not possible I had to find a workaround using the Local GP Port (same trick for the X-Fader Scriptlet). But if for any reason, the Scriptlet is recompiled, the CC used would be reset to the Scriptlet initialization value (probably 127). So, when using the Plugin Persist Scriptlet I modify the CC value used in the Scriptlet code itself (despite @dhj told me there are no reason why a Scriptlet should be recompiled… it seems there are exceptions :grimacing:)

1 Like

Exactly what I also do. :+1: But, I regret it as Scriptlet are supposed to be used by users without programming skills.

1 Like