Working with TouchOSC and Gig Performer [guest article]

Working with TouchOSC and Gig Performer [guest article]

In this guest blog article learn how our community member Thomas Lisi (@NanoMalefico) is working with TouchOSC and Gig Performer.

TouchOSC Template for Gig Performer, VST host

TouchOSC next generation, with the integration of scripts inside it, for me won the best place on the podium among the competitors. Now I can create some awesome templates with advanced functions for Gig Performer.

Inspired by David’s Lemur template I started my study to get the same functionality with TouchOSC. I also saw the great template for TouchOSC created by community member @rank13 and I said to myself – OK I want it, but I want to try to add an expandable and scrollable Songs List. So I continued to deepen the study.

The TouchOSC file and the gig file are attached at the end of this article and I will guide you through what you can do with them.

All unneeded controls will be hidden

.
This is one of some interesting features present in the David’s Lemur template. Take a look at the screenshots below:

TouchOSC template for Gig Performer, audio plugin host

Gig Performer VST host Setlist View and TouchOSC preparation

As you can see from the screenshots, this mechanism allows us to view only the controls assigned to the widgets that have OSC addresses. Other widgets do not show up.

The Show / Hide function will only be executed on controls that are assigned the ‘Tag‘ described below. So, all untagged controls like faders, knobs, labels will not be hidden.

Song and song parts in TouchOSC

.
Only the songs and song parts present will be displayed and the selected songs and song parts will be highlighted:

Gig Performer songs in the TouchOSC template

Grid adjustments in TouchOSC

.
We can resize the grid containing the list of songs, and scroll it through the side fader:

Touch OSC template grid adjustments

Change these parameters to resize the grid:
Control → H (grid height)
Grid → X (Columns) and Y (Rows) (X*Y = max number of songs that can be displayed, so be careful not to use too low values)

How to set and rename Tag, Controls, Widgets to TouchOSC and Gig Performer

.
This is how TouchOSC and Gig Performer are set:

TouchOSC configuration

Notes:

* The Label ‘Widget Name’ shows the caption of the widget
** The Label ‘Value’ shows the values of the parameter assigned to the Label Widget in Gig Performer.
If you don’t want to display it (the value of the parameter assigned to the Label Widget in Gig Performer, e.g. mixer volume -8.7dB) but only values from 0 to 127 see in the template how to set it on the ‘Slider2’ control and on its ‘Label’ value.
*** In the Address setup click ‘+’ → ‘Property’ → ’Name’. It will insert the name of the control (If you follow these steps and click ‘Name’, you can automatically see the name of the control in the OSC message).

When we add a control, the TAG is optional. We can use it to group different controls. Let’s take an example. We add a fader and name it Slider1, a label named Slider1Name and one named F_Val1Name. For all 3 objects we write F1 in the TAG box. Now for example we could use any function for all the controls associated with the F1 TAG without repeating it for each control. In our specific case we will use the TAG on the controls we want to use with the show / hide function.

Gig Performer configuration part needed for TouchOSC

Notes:

* You can use the default caption or customize it
** In the Label widget, set the caption to Custom caption and rename it to [value]
– ‘n’ is an ID Number

This is what you can do without modifying the script

  • Remove, Add (limitless), Move (anywhere) all controls associated with widgets. You can create your own template by replacing controls, adding pages and groups with controls inside it. NB: just remember to set the tag if you want to use the show / hide function on the desired control.
  • Move (anywhere) but don’t remove groups containing song parts and songs list, songs count label and current song label
  • All other controls not mentioned yet can be removed.

Note: if you move a control to another page or group it will be renamed. So you will need to rename it back to its old name.

The script

.
The primary purpose of this article is to help users like me, who have little experience in programming, think it’s too difficult, but would like to try it anyway. Each line of code is commented to help understand how to use its functions and those of LUA.

Parent & Children – how and when to use them

We can think of parent as a container and children as its content.

TouchOSC, parents and children explanation

Referring to the image above we can see our current position highlighted. Now suppose we want to visualize the value of the fader1 on the label1 present in the root. We can do it by sending this value to the label1 by the ‘notify’ function. (the ‘notify’ function is explained further in the article). There are several ways to do this and we can see them in the image below (Script in fader 1):

LUA script for TouchOSC

Instead, if we want pass a value by radial1 to label2 we can do this as follows:

TouchOSC parent and child configuration

Here’s the script in radial 1:

LUA script for TouchOSC radial1

Gig Performer template

.
Here are code screenshots (check out the comments, as well).

The script in the root

The Script in the root

All about the tag

All about the tag

Functions clear/show controls

Clear and Show Controls Functions

Callback function on ReceiveOSC

‘Clear/show’ function in action after the callback function

Clear and show function

Similar to the ‘show’ function, here we can only see the first part dedicated to Sliders. Obviously, the same procedure is repeated for Knobs and Buttons.

Get the songs and place them in the song list grid

Get the songs

Current song in the count number and highlighted label

Current song

Grid songs list and the script inside it

Grid songs list

How I did the scrolling feature

The Scrolling Feature

As you can see, the frame of the grid protrudes from the frame of the group it is inside (the frame of the grid of the labels is bigger than the frame of the group in which it is inserted). Therefore, only the part inside the frame of the group will be visible.
Through the fader to its right, we can move the grid position up to view the part outside of the group frame.

The script inside the scroll fader

The script inside the scroll fader

Conclusion

.
After several tests everything seems to work as it should. I tested it from my Android phone and Windows PC program.

Download: TOSC and GIG files

In the attachment, together with our template there is a gig file containing different situations (e.g. with GPScript) to test it thoroughly.

For more information about the LUA language, you can visit:

  • TouchOSC examples and modules LINK. There are some interesting examples to download and try. From those examples, I discovered several really useful features that I included in my Gig Performer template.
  • TouchOSC ManualLINK
  • Gig Performer CommunityLINK. There are very competent and helpful users! By reading several posts on Gig Performer scripts, OSC etc., you can have a really good starting point.

.
Written by Thomas Lisi (@NanoMalefico). If you have any questions, visit this community thread.

Own The Stage® with Gig Performer®

Related topics:
OSC Support in Gig Performer
How to control your guitar or keyboard effects from a Web browser
Use your mobile phone to control your guitar or keyboard effects
Gig Performer as an OSC controller



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.

 

GP Script Enhancements


GP Script adds new language improvements such as multiple initialization sections, initialization with declarations and enhanced callbacks. The WidgetValueChanged callback now supports multiple widgets. Sysex messages are now built-in with numerous supporting functions. String array handling is much faster. Integer bit manipulation is now built-in. A new global GigScript allows incoming MIDI messages to be modified and redirected on the fly. It also allows you to define keyboard macros for your computer keyboard to control Gig Performer itself. For complete information, please review the GP Script Language Manual available through the Help menu.

 

Scriptlets


Scriptlets make creating custom MIDI processors easy. You don't have to be a programmer to use them - you can just download scriptlets from our ever-growing collection on our website and drop them right into your rackspaces to use them. Use scriptlets for simple operations such as turning your single notes into chords, modifying, duplicating or converting one kind of message into another, automatic chord latching (AutoSustain), threshold detection, sysex manipulation... imagination is the limit.

 

Other Improvements


  • System Actions plugin
  • MIDI Out to OSC converter
  • Comment plugin
  • New GUI dialog to define MIDI events to send on song part change
  • MIDI Out blocks can automatically send multiple MIDI events
  • Open/close a plugin editor from a widget
  • Choose default startup view
  • Quick find for plugin parameters
  • Large collection of startup hints
  • OSC Patchbay mode
  • Plugins now default to stereo I/O
  • Dragging presets into the wiring view will automatically create the required plugin
  • Numerous other minor (but nice) usability and workflow enhancements

Numerous other enhancements and optimizations serve to make Gig Performer 4 a superb platform for performing artists.

 

Songs and Setlists


You can organize your rackspaces into songs and your songs into setlists and then just select the setlist you need for a show. Then simply cycle down through the parts, or use your control surface or a MIDI Guitar pedal controller to select individual parts directly.

 

Predictive Loading


Predictive Loading™ is an advanced feature that reduces your RAM and CPU resources by only loading rackspaces (or songs) as needed.

 

 

The Global Rackspace


The Global Rackspace can receive audio from whatever rackspace is currently active. Instead of inserting effects in every rackspace, simply insert them once in the Global Rackspace and all your local rackspaces will have access to them. The Global Rackspace can also send audio to the currently active rackspace. So you can insert a looper that receives audio directly from your guitar (say) and then send the looped audio to different effects in different rackspaces. If a particular instrument such as a piano or organ is needed everywhere (or almost everywhere), put it in the Global Rackspace.

 

   

Zoomable Wiring View


Gig Performer 4 provides a virtual view allowing you to spread out your blocks and connections to make them easier to see and manage, even if you have a very small screen. You can zoom in or out and you can use the Auto-Fit option to position your blocks to fit in the available space.