Basic concepts

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Basic concepts

GPScript is a programming language designed specifically for use with Gig Performer. Rather than integrating an existing language such as Lua, Python or ChaiScript and living with some compromises, we felt it worthwhile to have an essentially seamless environment that would immediately make sense. The clean syntax reflects that integration. GPScript is influenced more by Algol/Pascal. While we will assume for now that the reader has at least some basic understanding of programming there will be plenty of samples to help users to get up to speed quickly.

As previously mentioned, GPScript is a strongly typed language; every variable must be declared along with a type. However, along with the usual types such as integers, strings, doubles and so forth, GPScript has built-in types that represent plugins, widgets, various kinds of LFOs and some special purpose types such as NoteTracker and ChordDictionary.

So as easily as you can write:

var i : integer

 
to represent an integer value and perform operations such as addition and subtraction, you can write:

var A800 : MidiInBlock

 
which represents a named MIDI In block, presumably associated with an A800 MIDI keyboard controller. Now you can do operations such as manipulate incoming MIDI messages before sending them on to whatever audio plugin is connected to it.

GPScript includes the usual looping and conditional statements and of course you can define your own functions. There is also an extensive collection of efficient built-in functions you can leverage.

The latest list of built-in functions is best viewed online at:
https://gigperformer.com/downloads/GPScript/SystemFunctionList.html

Scripts belong to rackspaces, meaning that you can have a completely separate script running in each of your rackspaces.

Tip: the top of the GPScript IDE has two buttons that provide you with templates to help you get started as well as system function code completion:

GPScript-IDE

 
More in this chapter:
cicon9 Statements
cicon9 Function calls
cicon9 Operators