Override to Set Timecode Source to None

Post Reply
HedgeHog
Posts: 2
Joined: Sun Dec 13, 2020 4:18 pm

Override to Set Timecode Source to None

Post by HedgeHog »

Hi, I am semi new to Madrix 5 and would like some advice on how to program a cue list override. I have determined that the best way to disable the cue list whilst still allowing programmer functionality is to set the timecode source to "None". So far the only way I have been able to do this is for the Global macro to check to see if S255P255 is in use then time code to None, if S255P254 the set timecode source to system time. While this does work in part it does require the check to be performed 25 times a second and did make my instance of Madrix quite unstable.

Is there anyway to have a Effect script interact with the global script or to force the effect scripts to use Global Functions?

(A little background on my installation)
This is designed as a installation on a building and the building manager has requested overrides. The interface that we have chosen is Stream Deck being configured by Companion (by Bitfocus) to send HTTP commands back to Madrix. This has made for a rather elegant solution and I would like to invite any feedback or suggestions

Thankyou for your time,

Regards,
Michael
Schulze
Support
Support
Posts: 304
Joined: Fri Mar 22, 2019 4:21 pm
Contact:

Re: Override to Set Timecode Source to None

Post by Schulze »

Hi Michael,

This is a great idea to achieve the wanted bahavior, unfortunately there is no "easier" way to achieve it. With your post we noticed that we might need to expand the HTTP remote commands, allowing for example to change the used time code source. Thank you!

Could you please further elaborate why the used macro renders MADRIX to be unstable? Sorry but I wasn't able to reproduce that such a macro has any critical influence on the performance of the MADRIX software.

I guess the used macro looks something like this:

Code: Select all

@scriptname="";
@author="";
@version="";
@description="";

void InitEffect()
{

}

void PreRenderEffect()
{
	int s = GetStorage(LEFT);
	int p = GetStoragePlace(LEFT);
	if(s == 255)
	{
		if(p == 255)
			CuelistSetTimecodeSource(TIMECODE_SOURCE_NONE);
			
		if(p == 254)
			CuelistSetTimecodeSource(TIMECODE_SOURCE_SYSTEM_TIME);
	}
}

void PostRenderEffect()
{

}

void MatrixSizeChanged()
{
	InitEffect();
}
Is there anyway to have a Effect script interact with the global script or to force the effect scripts to use Global Functions?
- Unfortunately this is not possible, sorry! Could you please give us some further information why you need this functionality?
HedgeHog
Posts: 2
Joined: Sun Dec 13, 2020 4:18 pm

Re: Override to Set Timecode Source to None

Post by HedgeHog »

Hi Schulze

Thank you for your response, the problem has been solved. I just failed a little bit with my scripting and putting logic in there that didn't belong. (I am also semi new to coding)

Please see below a copy of what I have done for reference.

Code: Select all

@scriptname="Verde Global";
@author="Michael H";
@version="V1.3";
@description="";

void InitEffect()
{

}

void PreRenderEffect()
{
	time currentTime=GetTime();
	if (CuelistGetTimecodeSource() != TIMECODE_SOURCE_SYSTEM_TIME) {
		if (currentTime.hour == 0 && currentTime.min == 0 && currentTime.sec == 0) {
			SetMasterFader(255);
			CuelistSetTimecodeSource(TIMECODE_SOURCE_SYSTEM_TIME);
		}
	}
 	
 //	Disbale Timecode
	if (CuelistGetTimecodeSource() != TIMECODE_SOURCE_NONE) {
		if ((GetStorage(RIGHT)== 255 && GetStoragePlace(RIGHT)==255) || (GetStorage(LEFT)== 255 && GetStoragePlace(LEFT)==255)){
			CuelistSetTimecodeSource(TIMECODE_SOURCE_NONE);
		}
	}

// Reinstate Timecode System Time
 	if (CuelistGetTimecodeSource() != TIMECODE_SOURCE_SYSTEM_TIME) {
		if ((GetStorage(RIGHT)== 255 && GetStoragePlace(RIGHT)==254) || (GetStorage(LEFT)== 255 && GetStoragePlace(LEFT)==254)){
			CuelistSetTimecodeSource(TIMECODE_SOURCE_SYSTEM_TIME);
		}
	}
}

void PostRenderEffect ()
{}
void MatrixSizeChanged()
{}
So far I have found the HTTP commands excellent when creating an external interface. An expansion of this would be very much appreciated.

Thank you for your help
Michael
Schulze
Support
Support
Posts: 304
Joined: Fri Mar 22, 2019 4:21 pm
Contact:

Re: Override to Set Timecode Source to None

Post by Schulze »

Hi Michael,

I'm happy to announce, that with the release of MADRIX 5.4a it is now possible to set and retrieve the "Time Code Source" via HTTP Remote.

Here you will find the new functions in the HTTP Remote documentation:
http://help.madrix.com/m5/httpremote/Ht ... ntrol.html

Here you can download MADRIX 5.4a:
https://www.madrix.com/download/MADRIX_Full_Install.exe
Post Reply