Invoking GP Script functions from Timeline Actions

Invoking GP Script functions from Timeline Actions

Gig Performer 4.7, released recently, includes a new Streaming Audio File Player that supports timelines and actions. That means that you can play a backing track and have “things” (aka actions) happen automatically as a song plays. Typical actions include the ability to switch rackspaces or songs, send out program changes or arbitrary MIDI messages, and change widget values. More information about the timeline and supported actions can be found in the online user manual.

OSC Actions

.
One of the actions supported by the new timeline is the ability to send out OSC messages with arguments. For example, this action

might be used to send a message to some application controlling lights and set the intensity of a red light to 50%. OSC messages could also be used to control tablet apps such as TouchOSC or Lemur.

GP Script

.
GP Script is Gig Performer’s proprietary programming language intended for both novices and experienced developers to implement functionality that is not already built into Gig Performer itself. The GP Script language supports an easy to use callback mechanism allowing it to respond to such things as incoming MIDI messages, widget value changes and plugin parameter changes.

GP Script can also respond to incoming OSC messages. Consider the following callback defined in the Global Rackspace script.

On OSCMessageReceived(m : OSCMessage) Matching /AddNumbers
Var
   first, second : integer

   If m.OSC_ArgCount() == 2 // Make sure there are two parameters
      Then 
         first = m.OSC_GetArgAsInteger(0) // Get the first value
         second = m.OSC_GetArgAsInteger(1) // Get the second value
       
         // Now add them together and display the result
         DisplayTemporaryMessage("The sum is " + (first + second))
   End         
End

This OSC callback will be triggered if an OSC message with the address /AddNumbers is received. It will then check to see that there are two arguments and if so it will retrieve them, add them together and display the result in Gig Performer’s display area at the top of the main window.

Now take a look at this action:

This action sends out an OSC message with the address /AddNumbers and two integer arguments. When the action is triggered, the GP Script callback will be invoked and the result of the calculation will be displayed in Gig Performer

Conclusion

.
Apart from creating your own user functions, GP Script has a system library with several hundred library functions that not only allow considerable control over Gig Performer and even other applications through the shell system functions.

OSC actions can therefore cause GP Script with essentially arbitrary commands create almost arbitrary functionality with GP Script.

If you have any questions or feedback, share them with us in this community thread.



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.