The GPScript Programming Language

The GPScript Programming Language

Gig Performer ships with a built-in programming language GPScript that can be used to develop very sophisticated behavior for live performance. GPScript gives Gig Performer some “open endedness”, providing the ability to add features that are not already built in to the product. A full description of GPScript will require its own manual and we can do nothing more here than give a very slight taste of what is possible. In what follows, we assume the reader is familiar with basic programming concepts.

For example, anyone familiar with traditional subtractive synthesizers will be familiar with a feature known as “keyboard follow” or “keyboard tracking”. This is a mechanism where the filter cutoff frequency is adjusted automatically based on what key is being pressed and is generally used to make a sound brighter as higher notes are played. But suppose you have an LFO controlling the filter cutoff frequency and you’d like the LFO rate to increase as you play higher notes.

Here’s an image of an audio plugin called “The Legend”, which is (in my personal opinion) a great Minimoog emulator. If you’re familiar with this kind of synth you’ll see that filter modulation is turned on (“CONTROLS” section), the modulation wheel (MW) is half-way up and that Oscillator 3 is in its low frequency mode and not tracking the keyboard (KTRK is off). You might also notice that under the Oscillator 3 section, the SEMI (semitones) knob has been touched with the mouse, which is why there’s a tooltip above it showing a value.  Also note that at the very top right there’s a label that says “Param#: 24“. Remember that, we’ll come back to this later.

The Legend plugin, great Minimoog emulator, Gig Performer

Here’s a sound sample:

Now let’s take a look at the Wiring view in Gig Performer.

The Legend plugin, great Minimoog emulator, Gig Performer connections view

(An aside, yes, we’re using the wonderful Melda MRecorder plugin to record these sound samples. While it’s free, you can pay them a few dollars and get some really nice extra functionality)

You’ll note that the plugin block with caption, “The Legend” also has the word “Legend” above it. That’s its GPScript name and with that name you can manipulate that plugin from GPScript. The MIDI In block also has a GPScript name, KB1.

Here’s the script.

GPScript, Script Editor in Gig Performer, Keyboard follow

We declare a couple of variables that represent the two plugins that we want to be able to control. Following that we define a special function known as a callback and which will be run every time a MIDI note event is produced, typically by playing a keyboard. We extract the note number, make sure it is in the desired range and then we set the LFO frequency (remember SEMI and Param#24) by scaling the note number.

Take a listen.

We can of course enhance this in many ways. For example, suppose you’d also like your keyboard’s aftertouch to control the depth of that LFO rate, i.e.,  use aftertouch to control the Modwheel (displayed as a slider in the Legend). Well, all you have to do is add another callback that responds to aftertouch and map it to the Modwheel parameter, which on the Legend is Param# 0.

Here’s the extra piece of code which we just insert into the existing script. When an aftertouch message is received, we just get its value and map it directly from MIDI to parameter value, i.e, 0-127 goes to 0.0 to 1.0

GPScript, Script Editor in Gig Performer, Aftertouch message

And here’s another sound clip demonstrating this addition. (NB we’ll get around to making video demos of this stuff as soon as we can)

GPScript has callbacks for all the basic MIDI events as well as callbacks that respond to widget movements and when you change a parameter value in a plugin. Combining these callbacks with a large collection of functions to manipulate the messages, you have the ability to develop special purpose scripts to manipulate and control your performance with Gig Performer in all sorts of ways.

We will be setting up a special section of our forums to help users interested in creating scripts for Gig Performer. Watch this space.

.

Related topics:
What is a Scriptlet?
The most flexible MIDI processing
Gig and Rackspace files with: scripts and Scriptlets



Scaling Curves


Scaling curves allow you to control the shape of the output of a widget or convert an incoming note velocity to a new velocity. Various predefined curves are available and they can be tweaked as necessary. You can also just draw your own curve as well to achieve the effect you require.

 

MIDI File Player Plugin


You can load up to 128 MIDI song files in a single plugin instance. Switch from one song to another, mute tracks and/or change their channel numbers. Tempo can be controlled by individual songs or you can use the global tempo and tap tempo to control the BPM interactively.

 

Favorites and Presets


Create a sound by placing and interconnecting your desired plugins, such as a synth, some effects and perhaps a mixer. Select them all and then save the selection as a named favorite. The favorite will subsequently show up in all plugin insert menus, making it easy for you to recreate that configuration whenever you need it again. This feature is also very powerful for creating your needed sounds on your studio computer and then transferring them to your touring laptop.

 

Probabilistic Sound Designer


Parameters you select in an open plugin are captured into the Probabilistic Sound Designer dialog window. When you click Randomize, you're only adjusting those selected parameters. Each entry in the PSD dialog has a curve but unlike widgets where the curve controls scaling, in the PSD the curves are used to define the probability of particular values being selected. Make sure the filter cutoff never gets too slow so as to block all sound. Perhaps adjust the max range of the VCA attack parameter so that the sound doesn't have too much delay. Constrain the octave ranges of the oscillators, perhaps ensuring that 1/3rd of the time we select 8' and 2/3rds of the time we select 4'. The possibilities are endless.

 

More Widgets


Numerous new widgets are included in Gig Performer - a new sustain pedal, plastic knobs, drum pads and more colored sliders. Shapes can be colored with different borders and fill colors and morphed from rectangular to circular. Your creativity is now the limit to creating fabulous front panels in Gig Performer.

 

MIDI Message Helper


Select MIDI devices by name. Choose the MIDI message type and adjust the appropriate parameters for the specific type

 

  

Layout management


Gig Performer supports arbitrary resizing. Layout your widgets the way you want - resize the main window and the widgets will grow or shrink as necessary to maintain the same interrelationships. No matter what size screen you have, your front panels will still be neat and usable.

 

Undo Support


If you move your widgets around and/or resize them, or even delete them by mistake, the Undo facility will correct your mistake. Minor moves to a widget by mistake will no longer spoil your design

 

Plugin Channel Count


Some plugins support a large number of outputs and they depend on the traditional channel strip to control how many ports should be available.   When you only need a stereo pair, it is convenient not to have a large horizontal block. In Gig Performer, the number of available ports  is controlled by the channel count override, which can be applied to individual plugins and will be remembered when the gigfile is reloaded or if the plugin is saved as a favorite.

 

Input muting and output fading


Rather than a single audio length tail, Gig Performer 4 gives you the ability to control input muting and output fading separately. Input muting controls how much time it takes for audio input to be silenced when you leave the rackspace. Output fading controls how much time will be taken for audio to fade out when you leave the rackspace.

 

Faster Plugin Finder


Instead of searching through menus of perhaps hundreds of plugins (you know who you are!), the Quick Plugin Finder makes it easy to find the plugin you need by simply typing partial strings. For example, as shown here, to find the Modartt Pianoteq 7 plugins, it's enough to type pia mod 7 (in any order, by the way)  to restrict the list of available plugins to those matching your query. The Quick Plugin Finder also knows about manufacturers, presets and favorites.

 

  

Touch Friendly Input


Any entry field can be changed by either dragging your mouse (or finger) up or down, or by using the large popup touchpad where you can just tap on the squares to enter a value. The large popup keypad also does validation so you can't enter an invalid value. You can also just tap the BPM field to pop up a larger view where you can quickly change tempo, tranpose, trigger Tap Tempo and enable Ableton Link, the last allowing you to synchronize Gig Performer with any other application that also supports Ableton Link.

 

New Tuner Display


The tuner view makes it easy for guitarists to quickly check and adjust their tuning. You can toggle into the tuner view from any other view and toggle right back as soon as you're done. All output will be silenced automatically while you're in tuning mode. You can adjust the concert reference pitch from its default of 440 Hz to suit your own needs. The tuner view fills the entire screen so you can easily see it from a distance.