JustMacros playing Groups

Hi!
I’m able to load/play pretty much anything via JM, but I cannot find any information how to trigger groups. I have specific group order to with ATEM Commands and videos. Is it possible play groups with JM?

Thank you very much

AFAIK a group on the client just send a lot of commands to the server.
My suggestion is to trigger the group on the client, grab the messages on the server and use the CasparSendRaw( ) function to reproduce everything on JM :slight_smile:

Thank you for your response, the only problem is that with raw commands it does not obey set delays.

This function is a workaround if there is no native solution/API:
local clock = os.clock
local function sleep(n)
local t0 = clock()
while clock() - t0 <= n do end
end

local function play_test()
CasparSendRaw( 1, “PLAY 1-10 IN CUT 1 Linear RIGHT\r\n” )
sleep(2)
CasparSendRaw( 1, “PLAY 1-10 AMB CUT 1 Linear RIGHT\r\n” )
sleep(1)
CasparSendRaw( 1, “PLAY 1-10 OUT CUT 1 Linear RIGHT\r\n” )
end

play_test()

Is there any native solution for this delay? (Just asking it’s not a problem I work with LUA anyway)

Once again thank you!

Hey sorry for the delay.

The main Sleep from Just Macros doesn’t work for you?

17 ago 07:48:14.088: -----------------------------------------------------------------------------------
17 ago 07:48:14.088: Sleep( pvMilliseconds : Integer )
17 ago 07:48:14.088: -------------------------------------------------------------------------------
17 ago 07:48:14.088: usage: Call This Function to delay
17 ago 07:48:14.088: * Parameter 1 should be an integer value specifying the length of time
17 ago 07:48:14.088: the Lua Script should delay for
17 ago 07:48:14.088: -----------------------------------------------------------------------------------

If i’m not wrong the delay generated by the client is software based, so I don’t believe there’s any other solution than using the Sleep() or the sleep() function you’ve made.

Best regards!

oh was not aware it has built in Sleep function,thank you.
Just one more question if you know so I do not have to open another thread. Cannot find any information anywhere regarding OSC:

RawCommsNetworkSendOSCMessage( pvUniqueID : String, pvPath : String );

I assume server need to be set somewhere. The only info I’ve found was on official site GenericComms_Samples:

lvHandle = RawCommsNetAddConnection( “SELF”, 8000, “TCPs”, “GEN_COMMS_IP_Events”, “ClientConnected”, “ClientDisconnected” );
RawCommsNetSetEnabled( lvHandle, “TRUE” );
RawCommsNetSvrAssignMsgHandler( lvHandle, “GEN_COMMS_IP_Events”, “ProcessClientMessage” )

EnviroWrite(“GEN_COMMS_TCP_IP_SERVER_HANDLE”, lvHandle );

VSLog( "New Connection with ID: " … lvHandle );

Not sure how OSC/TCP syntax works.

Thank you very much for your help!

After much of trial and error I got OSC working:

Set autoexec to open up server communication

lvHandle = RawCommsNetAddConnection( “127.0.0.1”, 7250, “UDP”, “GEN_COMMS_IP_Events”, “ClientConnected”, “ClientDisconnected” );
RawCommsNetSetEnabled( lvHandle, “TRUE” );
RawCommsNetSvrAssignMsgHandler( lvHandle, “GEN_COMMS_IP_Events”, “ProcessClientUDPMessage” )

EnviroWrite(“GEN_COMMS_UDP_IP_SERVER_HANDLE”, lvHandle );

then in main script:

local OSC_UID= RawCommsNetGetUniqueID(1)
RawCommsNetSendOSCMessage(OSC_UID,"/track/1/mute",1)

Works beautifully!

2 Likes

Wow, that’s OSC script will be pretty useful!

Thanks for sharing! :smiley:

I’m not working
RawCommsNetSendOSCMessage (OSC_UID, “/ control/UIDNAME/PLAY”, 1)

Wow, Working ^^