Scope of variables and Functions

Can I

  1. Call a Rackspace function from within a Scriptlet?
  2. Call a Gig Function within a Rackspace or Scriptlet?
  3. Access Rackspace variables within a Scriptle?
  4. Access Gig (Global?) variables with n a Rackspace or Scriptlet?

Right now previously you showed my how to iterate parameters of a Plugin within a rackspace.
I’d like to access those variables within my Scriptlet.

Other than function scope, I cant see about referencing different rackspace, scriptlets or gig scope?

Been reading for a while before posting. Certainly not urgent, just learning.


They are all basically independent. There is an example of being able to refer to a widget on a different rackspace, but things like functions are independent. The exception for functions is that you can manage code in an external GPScript file and use an “Include” statement at the top of the script - allowing you to reference it from multiple scripts.

Otherwise I’ve done things like use OSC sent to the Local Port as a way to pass data between scripts.

And finally, there is the new External API which allows some more flexibility in certain areas, depending on what you’re trying to achieve.

Which variables?

Well I saved my list of parameter names with my Rackspace scripts into an array.
Now I want to see if I can do something with them within my Scriptlet. I don’t have a specific plan for using them. I’m just trying to learn my way around the scripting language right now. I anticipate as I find my way around, eventually I will be able to do interesting things. That is why I said none of this is urgent.


With a few very careful exceptions, a scriptlet doesn’t really know anything about rackspaces. Don’t be confused just because scriptlets and rackspace scripts use the same programming language.

A scriptlet is a VST plugin, similar to any other plugin, in that it communicates with the host using the standard VST API as defined by Steinberg. A widget in a rackspace, for example, communicates with a scriptlet parameter exactly the same way it communicates with a parameter of any other kind of plugin.

While we have extended that API slightly so that, for example, scriptlets know when they become active, for the most part they are completely independent entities. They don’t know about other plugins in the rackspace just like a typical 3rd party plugin doesn’t know what other plugins are running.

1 Like

Got it. Thanks!


I think this is a mistake if you really want to learn the spirit of GPScript in general and of Scriptlets in particular. GPScript is not a multipurpose language, but a language which makes it easy to control things in GP for musicians. You won’t be able to do everything with GPScript, because it simply doesn’t make sense. If you don’t try to solve musician problems trying to understand the GP spirit, if you don’t project yourself into musician use cases, then you will try to address things that you will never be faced too and for which GPScript is not made.
Well, this is only my own point of view, and I also often try things that are not really in the manual. Have fun… :stuck_out_tongue_winking_eye:


Yes, learning the scripting language is only part of what I’m doing. Having fun with other things too. Thanks!