The MAS Script Effect is an effect like any other effect in MADRIX. Therefore it can also be controlled and manipulated by a macro like all the other effects.
Functions called by MADRIX
The macro of a script effect is called by MADRIX due to the standard functions a macro is called. They are described above. There are no special functions a script may implement.
Functions provided by the MAS Script Effect
This effect provides the standard macro functions, like described above. Also there are the following additional functions available.
Function
|
Description
|
void SetBpm(int bpm)
|
Sets the speed of the effect in BPM. Valid values are between inclusive 0 and 9999 BPM.
|
int GetBpm()
|
Returns the speed of the effect in BPM.
|
void SetFrameId(float id)
|
Sets a new frame id. If the given id is lower than 0 it is set to 0.
|
float GetFrameId()
|
Returns the ID of the current frame. See below for further details.
|
float GetFrameSteps()
|
Returns the number of frames which are between this and the last call. See below for further details.
|
void SetFrameCount(float fc)
|
Set the number of frames the effect produces before it gets repeated. See below for further details.
|
float GetFrameCount()
|
Get the number of frames the effect produces before it gets repeated. See below for further details. This is the same value which was set by SetFrameCount. The initial value is 1000.0.
|
void SetFixedFrameRate(int bpm, int enable)
|
Tells the effect that it shall render a fixed framerate which is independet of the speed set by SetBpm or by the slider on the GUI. See below for further details.
bpm tells the effect with how much bpm it should render. Valid values are between inclusive 0 and 3000 which means 0 and 50Hz. If enable is true fixed frame rate rendering will be enabled, otherwise it will be disabled. If enable is false the bpm-value is ignored and the currently set BPM will be set as speed.
See below for further details.
|
void SetUseFloatFrames(int enable)
|
Enables using frames as floating point frames. This enables having GetFramesteps rational values and not only integers. In case of having a fixed frame rate float frames are always enabled and can not be disabled.
|
Set frame count and frame id
Note: The script of the script effect itself is able to control the frame id and the frame count. Setting the frame count or frame id within a macro and a script may result in undesired behaviour.
|