Thanks to @simon, we now have a much improved manual for people interested in using GP Script.
The documentation can be found here
Thanks to @simon, we now have a much improved manual for people interested in using GP Script.
The documentation can be found here
Wow, this is amazing! Good work team!
It looks good and is well-organized. Thanks for the effort in collating all the info.
Definitely need to put a lot more real-world usage examples in there, though. Terms and descriptions only go so farâŚ
What kinds of things are you looking for? This manual is intended to be a reference document to the language and its system library. Itâs not trying to be a cookbook though clearly such a thing would be very nice to have.
How about a section featuring examples that users have previously submitted on the forum?
Thatâs actually already in the works
I have a big collection, from the forum
A minor documentation note -
On this page: File extensions used in Gig Performer
gpscript does not appear
I am A novice keyboard player. But Iâve been programming since 1975 - Fortran, C, C++, Basic, C# and others. I found this document to be very informative on syntax.
However, I didnât really find anything helpful for getting started. In fact, I found the community mostly discouraging in that it includes many remarks to those also trying to get started that âsome programming experience is requiredâ.
I think I significantly exceed that requirement. I just needed a simple scriptlet, not a full script. The code in this documentâs introduction appeared to be a good starting template. It was very discouraging to get the message that a variable type was not supported in this context with no guidance for a solution. A new scriptlet user needs to understand that, because the scriptlet is embedded in in a position where MIDI devices can be directly wired to the scriptlet, there is no need to declare a midi in block.
The next thing a new user probably need to understand is that any expectations that gpScript is object oriented should be put out of mind. You do not get the volume of a note by adding .volume to the end of the variable name. You must find a function that returns volume and requires a parameter that you can provide, such as a note object.
Obviously, this is not really a reflection on the syntax documentation. It is more a reflection on the availability of documentation that provides an understanding of the differences between scripts and scriptlets and what is required to gain a knowledge of the specific requirements of this language that might be different from what programmers in other environments might expect. Possibly some if this type information should be included in the introduction.
I hope this helps others get started. I think someone with modest programming experience can handle this language if the learning curve to get started wasnât so fraught with roadblocks. I am sure that, now that I have gotten past the start up curve, I will find this document very useful.
Thanks for the feedback. We appreciate your taking the time to write this.
I agree that we should be clearer about the SendNow as used by scripts vs. by scriptlets and itâs worth updating the language manual on this topic for a future release.
Well, we explain what it is, not what it isnât. For example, we note quite early that the GP Script language paradigm is âevent drivenâ. Iâm not quite sure why we are obliged to explicitly point out that GPScript is not OO since we never claim that it is. Should we also be obliged to point out that the GPScript language is not functional, declarative, data flow, constraint-based, nor any of the other possible language paradigms out there?
The basic language manual has a whole section defining the basic concepts (see image) and nowhere does it refer to objects.
You canât do that in C++ either, for example. Indeed important OO languages such as Smalltalk or Objective-C, for example) only let you do this by using messages
"Smalltalk: Return the volume attribute of an object"
SomeObject volume
// Objective C: Return the volume attribute of an object
volume = [SomeObject getVolume]
I think perhaps the point missed here is that âexperience with programmingâ doesnât just mean knowing the keywords of a language and/or what is a variable, etc. It also means that the programmer knows how to read âbetween the linesâ, knows how to search for information that is not explicitly documented. Clearly you were able to do this yourself since you figured out that SendNow (for example) has slightly different parameters depending on whether itâs used in a script or a scriptlet.
I donât think there exists perfect documentation for any programming language out there. If there did, there would be absolutely no need for forums, books and other guides to help users with programming. That said, documenting experiences in this community, as you did, absolutely benefits others and so itâs terrific that you mentioned these difficulties.
I hope my comments were not taken as implying that your document should solve all of the worldâs problems. Itâs a great document. I was just relaying my experience which is likely shadowed by the fact that I have been working exclusively in .NET for the last decade. Maybe what I needed was a quick start type guide that provided a âhello worldâ type example specifically targeting scriptlets.
Not at all - I seriously appreciated what you had to say and in fact have already updated the documentation to explain that difference between SendNow for scripts vs. for Scriptlets. It was a good point.
Iâm not saying youâve an obligation to do or do not something and indeed the documentation nowhere makes an explicit statement gpscript being oo, but there are some constructs that might be mistaken/interpreted as object oriented: <widget>.GetWidgetValue()
for example. I personally interpret this just as syntactic sugar, but I can see why someone would think that maybe gpscript is object oriented. I think in the end assumptions are rather dependent on the context someone is in: if youâre doing oo programming all day, you might be tempted to expect another language is also oo.
âTo someone with only a hammer, everything looks like a nailâ
Just my 2 cents.
Iâm not seeing âExamplesâ in my menu. But there are scriplets that can be inserted. Those should be helpful. thanks.
Are you using the correct menu, I can see it.
The âExamplesâ donât exist in the Scriptlet script editor. Iâm assuming that is what @_wo1f is refrerring to.