How to make complex multi-level router takes

Let’s say you have a router with 3 levels, video, audio1 and audio2, and you want to set up a button that can do a complex take where different inputs are routed on different levels. Here’s how you can do this with a little Lua…

First the example – before the take.

media_1381141302796.png

After pressing COMPLEX TAKE

media_1381141337205.png

Now we have input 2 on level V, input 1 on level A1, and input 0 on level A2. So how was that done?

The COMPLEX TAKE button script

media_1381141450669.png

In Lua the TakeRoute command can have an extra 3rd parameter which is the level. Levels are always numbered from zero, and multiple levels can be switched simultaneously by using a text string specifying the level numbers.

helm.exec("DUMMYRTR_1","TakeRoute", 2, 0, "012") ; "012" will switch levels 0, 1 and 2.

Be careful that when using it this way this, you remember the quotes to make it a text string.

helm.exec("DUMMYRTR_1","TakeRoute", 2, 0, 012) ; 012 is treated the same as the number 12, so only levels 1 and 2 will switch

So this way you can set up scripts to make any combination of inputs outputs and levels.

CopyOutput and SwapOutputs also support this parameter in Lua.