MultiTake: implementing router salvos in Helm

Router salvos in Helm can be done in two ways:

1) using the router’s own capabilities to store and recall salvos. This is probably the best approach when it is vital that all takes occur on the same frame.

2) using Helm’s TakeRoute command to perform multiple takes.

Multi-take is an example panel that shows how to use Helm controls to set up a stored sequence of takes and then execute them with one button press.

Let’s see that in action first

Before we look at the inner workings of the panel, let’s see it from the perspective of the operator. Developer Roddy Pratt talks us through.

To follow this how-to using Helm Designer you can download the panel here.

Panel architecture

  1. X-Y panel with arm & take function
  2. Listbox showing pending takes
  3. Router status display

Each time a take is added it appears in the Pending Takes list. Pressing Take All sets all the routes in the list.

X-Y panel Add Take button


The Add Take button’s OnClick script does the work of updating the Pending Takes list with a spot of Lua. Let’s walk through the code:

-- lua

local p = {}   create an empty table

p.src = H.SalvoBus.ArmedInput    set the table item 'src' to the armed input of the SalvoBus (input selector)
p.dest = H.OpSel.RouterOutput    set the table item 'dest' to the selected output on the OutputSelector

H.SalvoBus.ArmedInput = -1    set the armed input to -1 i.e. no source armed
pend[#pend+1] = p    add the take p to the global array of pending takes 'pend'

* note:  pend is initialised to empty in the OnStartup 

if H.LISTBOX_1.Items ~= "" then
  H.LISTBOX_1.Items = H.LISTBOX_1.Items .. "\n" .. p.src .. "->" .. p.dest    append p to the contents of the list box
  H.LISTBOX_1.Items =  p.src .. "->" .. p.dest

H.Take.Enabled = true    enable the Take All button

Take All button


The Take All button does the work of actually sending the take commands to the router – again all doen with a few lines of Lua script. Let’s take a look.


for k,route in pairs(pend) do go through the list 'pend' item by item and
 H.RTR.TakeRoute(route.src, route.dest) for each item do the TakeRoute( source, destination) command

H.Take.Enabled = false disable the Take All button

H.LISTBOX_1.Items = "" clear the pending takes list

As you can see the Lua code for this operation is remarkably elegant. To get more information on the Lua for command see the Lua Manual.