Functions (MAS Script Effect)

   Print  Previous  Next

Specific Resources

Functions called by MADRIX
MAS Script Effect: Available Functions
Deprecated Functions
Controlling the Tempo

 

General Resources

Keyword Search
List Of Functions (Alphabetical Order)
List Of Functions (Grouped)
List Of Global Variables and Constants
List Of Operations
List Of Structures
Table Of Frequencies
Table Of Notes

 

 

Available Functions

It is useful to consult the List of Functions (Alphabetical Order) for non-specific functions.
In addition to that, there are several other functions available which are not available by macros.

 

MAS Script-Specific Functions

Function

Description

void SetBpm(int bpm)

Sets the speed of the effect in BPM. Valid values range from 0 to 9999.

int GetBpm()

Returns the speed of the effect in BPM.

void DoPreRender()

Tells the effect that the script function PreRenderEffect is to be called before the next call of RenderEffect. See above for further details.

void SetFrameId(float id)

Sets a new frame id. If the given id is less than 0, it is set to 0. See below for further details.

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. This is the same value which was set by SetFrameCount. The initial value is 1000.0. See below for further details.

void SetFixedFrameRate(int bpm, int enable)

Tells the effect to use a fixed frame rate which is independet of the speed set by SetBpm or by the slider of the GUI. bpm tells the effect with how much BPM it should render. Valid values range from 0 to 3000, that is between 0Hz 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 current set beats per minute will determine the speed.

void SetUseFloatFrames(int enable)

Enables usage of frames as floating-point frames. This enables rational values for the function GetFrameSteps, instead of integer values only. In case of having a fixed frame rate, float frames are always enabled and cannot be disabled.

 

Deprecated Functions
Deprecated functions are outdated functions and should not be used anymore.

Function

Description

void SetSpeed(float speed)

Sets the speed of the effect in FPS. Valid values are between inclusive 0 and 166.

Please note: This function is deprecated and may be removed in one of the next releases. Use SetBpm instead.

float GetSpeed()

Returns the speed of the effect in FPS.

Please note: This function is deprecated and may be removed in one of the next releases. Use GetBpm instead.

 

Using 'FrameCount' And 'FrameId'

Please note: The script of the MAS Script effect itself is able to control the Frame ID and the frame count. Setting the frame count or Frame ID within both a macro and a script may result in undesired behavior. More information can be found in the chapter Controlling a Script per 'FrameId'.