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.

Privacy Preference Center

Essential

These cookies are required for technical reasons in order for this website to work, for example in order to login as a registered user and to speed up load times.

gdpr,__cfduid,wf_loginalerted_,wfwaf-authcookie-,wordpress_logged_in_,wordpress_sec_

Performance

These cookies enable us to track and monitor the interests of visitors to our website. We use this information to better understand how our website is being used and improve the user experience.

_gat1,_ga,_gid

External content

When you visit some pages that contain videos hosted on external sites these sites will set temporary cookies to provide this content.

ASP.NET_SessionId