T-Bar and Light pipe Script

6 posts / 0 new
Last post
Offline

Location

Detroit,
United States
Joined: 09/01/2017
Posts: 2
T-Bar and Light pipe Script

Hi,

I finding it difficult to find a working T-bar script. I also need the availability to combine lets say camera source and preview button that will triggered a light pipe response from the button above. If possible to have the preview buttons trigger a bluelight and blue light  pipe response and program button trigger red light and red light pipe response.

Any suggestions how to combine the command on one button while triggering the light pipe button above?

I thank you in advance for your help

Keefe,

 

 

Offline

Location

Burlington,
United States
Joined: 11/07/2013
Posts: 78
Hey Kmarzell,  I'm not sure

Hey Kmarzell,  I'm not sure about the tbar.  

 

On the light pipes you need to run a monitor script.  If a certain situation is true (like cam1 is live on the ATEM, then turn on the red light on button 120.  You basically make a script with all of the possiblities and make it run on startup.

John.Behningston has a number of examples of monitor scripts is you do some searching here.

Offline

Location

Burlington,
United States
Joined: 11/07/2013
Posts: 78
Hey Kmarzell,.  I got a

Hey Kmarzell,.  I got a chance this morning to write a sample monitor script for you.  Monitor scripts constantly run as long as the triggering environmental variable is TRUE.  This will turn on light pipes to red and blue like you requested for program and preview.  It assumes that input 1 lightpipe is at xkeys location 8, 2 at 16, 3 at 24, and 4 at 32.  Those likely aren't going to be where you have them or want them so you'll want to add the proper locations.  Also, you can add more inputs by adding lines to the code.  

Please note - I have not tested this code.  I just wrote it in text editor and posted it here.  It may or may not work exactly as written.  Either way it should serve as a good start for your project.

Also note - This code can be "cleaned up" if someone wanted to do so.   It's quick and ugly but will work.

 
-- Stop the monitor if its already running
if EnviroRead("xkeysLightMonitorStatus") == "TRUE" then
    VSLog( "xKeys Light monitor already running .... Stopping....")
    EnviroWrite("xkeysLightMonitorStatus", "FALSE");
    Sleep(150);
end;
 
-- Start the monitor
EnviroWrite("xkeysLightMonitorStatus", "TRUE");
VSLog("xKeys Light monitor initializing......")
 
-- Run the monitor while its enabled
while EnviroRead("xkeysLightMonitorStatus") == "TRUE" do
 
-- Get the program status of the ATEM SWITHER at 1, 1 and set it to var ATEMCurrentProgramStatus
EnviroWrite("ATEMCurrentProgramStatus",ATEMMixerMEGetProgramInput( 1, 1))
 
-- Get the preview status of the ATEM SWITCHER at 1, 1 and set it to var ATEMCurrentPreviewStatus
EnviroWrite("ATEMCurrentPreviewStatus",ATEMMixerMEGetPreviewInput( 1, 1))
 
    Sleep(100);
    
    
 
------------------------
-- Test Against Program and set lights
------------------------
 
 
if EnviroRead("ATEMCurrentProgramStatus") == "1" then
-- Set lightpipe RED LED on panel 1, location 8 to true and turn 16, 24, 32 off.
        XKeysSetButtonRedLEDState( 1 , 8, "TRUE" )
        XKeysSetButtonRedLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 32, "FALSE" )
      
elseif EnviroRead("ATEMCurrentProgramStatus") == "2" then
-- Set lightpipe RED LED on panel 1, location 16 to true and turn 8, 24, 32 off.
        XKeysSetButtonRedLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 16, "TRUE" )
        XKeysSetButtonRedLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 32, "FALSE" )
 
elseif EnviroRead("ATEMCurrentProgramStatus") == "3" then
-- Set lightpipe RED LED on panel 1, location 24 to true and turn 8, 16, 32 off.
        XKeysSetButtonRedLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 24, "TRUE" )
        XKeysSetButtonRedLEDState( 1 , 32, "FALSE" )
 
elseif EnviroRead("ATEMCurrentProgramStatus") == "4" then
-- Set lightpipe RED LED on panel 1, location 32 to true and turn 8, 16, 24 off.
        XKeysSetButtonRedLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonRedLEDState( 1 , 32, "TRUE" )
end;
 
 
------------------------
-- Test Against Preview and set lights
------------------------
 
if EnviroRead("ATEMCurrentPreviewStatus") == "1" then
-- Set lightpipe BLUE LED on panel 1, location 8 to true and turn 16, 24, 32 off.
        XKeysSetButtonBlueLEDState( 1 , 8, "TRUE" )
        XKeysSetButtonBlueLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 32, "FALSE" )
      
elseif EnviroRead("ATEMCurrentPreviewStatus") == "2" then
-- Set lightpipe BLUE LED on panel 1, location 16 to true and turn 8, 24, 32 off.
        XKeysSetButtonBlueLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 16, "TRUE" )
        XKeysSetButtonBlueLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 32, "FALSE" )
 
elseif EnviroRead("ATEMCurrentPreviewStatus") == "3" then
-- Set lightpipe BLUE LED on panel 1, location 24 to true and turn 8, 16, 32 off.
        XKeysSetButtonBlueLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 24, "TRUE" )
        XKeysSetButtonBlueLEDState( 1 , 32, "FALSE" )
 
elseif EnviroRead("ATEMCurrentPreviewStatus") == "4" then
-- Set lightpipe BLUE LED on panel 1, location 32 to true and turn 8, 16, 24 off.
        XKeysSetButtonBlueLEDState( 1 , 8, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 16, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 24, "FALSE" )
        XKeysSetButtonBlueLEDState( 1 , 32, "TRUE" )
    end;
end;
 
 

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2120
Nice one for posting that Jon

Nice one for posting that Jon

Offline

Location

Detroit,
United States
Joined: 09/01/2017
Posts: 2
WOW

WOW...tHIS IS FANTASTIC!!!!!

 

Thank you Jon, Ive been on this site everyday searching how to make my Xkeys 128 work with Atem 2M/E. It never dawn on me until now to check my post.

This is probably one of the greatest forums out there. You folk are GREAT!

Hopefully with your help and info I'm finding that John Bengston has on this site I will soon have a fully funtioning Xkeys. Those folk at PI Engeering and Just Macros God bless them for Xkeys128 and Just Macros. Saving us 14k not having to spend it on the Highly expensive panel form Blackmagic

Thanks again

 

Marzell,

 

Offline

Location

Burlington,
United States
Joined: 11/07/2013
Posts: 78
Glad to help. My suggestion

Glad to help. My suggestion would to be to read the startup things John has released.  JM has a steep learning curve and can be daunting when starting out.  However for those who manage they will save tens of thousands of dollars.  Once you get more into it you can literally do anything you want with some basic scripting. Start somehwere and just keep going!