Overview (Global Macro) |
Previous Next |
Introduction▪Global macros can be used to manipulate the final output of MADRIX. This also includes global features, such as the Cue List, Master, and Audio Input Level among others. ▪Global macros are stored together with a MADRIX Setup file. ▪It is possible to save macros as separate files. The file extension of a macro is *.mms. The extension of a compiled macro is *.mcm.
Editor - Controls the corresponding Macro Editor.
Functions Called By MADRIXOverviewThere are several functions called by MADRIX in order to let the macro react to different events: ▪void InitEffect() ▪void PreRenderEffect() ▪void PostRenderEffect() ▪void MatrixSizeChanged()
If a function is not needed by a macro, it is not necessary to implement it. Regarding InitEffect, PreRenderEffect, and PostRenderEffect a message is printed out if one of them is missing. This is not an error, but only information for the developer of the script.
InitEffect(Automatically included in a new macro) InitEffect is called by MADRIX whenever the macro needs to be initialized. This is the case after compiling and starting a new macro or when the user pressed the Start button of the »Script Editor. A macro can assume that any global variable is initialized with 0 and that any global array is empty as long as it has not been initialized with a value. This function is the right place to initialize global variables, reset any arrays, set the speed of an effect, or whatever is necessary to (re)start the macro.
PreRenderEffect(Automatically included in a new macro) PreRenderEffect is called before the Main Output is going to be rendered. Changes done here affect the current frame, but may be overwritten by the Main Output itself.
PostRenderEffect(Automatically included in a new macro) This function is called after the Main Output has been rendered. Here, the result of the Main Output can be manipulated. You could use a filter on it, for example. void InitEffect()
This example uses the function PostRenderEffect to fill the matrix after initializing a random color for this task. Note: The matrix, which the macro manipulates, is the same matrix that the Main Output uses to calculate itself. The Main Output may rely on the output being the input for the next frame with undefined behavior.
MartrixSizeChanged(Automatically included in a new macro) MatrixSizeChanged is called after the size of the matrix has been changed. This may be due to a change to the matrix settings.
Standard OutlineWhen you open the Global Macro Editor, the empty standard macro will look like this: @scriptname=""; |
MADRIX Version: 5.7 | Script Version: 3.23 |
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100% |
Previous
Next
|
Enable automatic translation | Activer la traduction automatique | |