Functions (Macros For Effects)

   Print  Previous  Next

Specific Resources

Functions called by MADRIX
Macros for Effects: Available Functions
Setting and Getting the Current Speed
Using the Frame ID
SCE - Static Light Effects
S2L - Sound2Light Effects
M2L - Music2Light

 

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

Standard Functions

It is useful to consult the List of Functions (Alphabetical Order) for non-specific functions.

Please note: The functions GetSpeed and SetSpeed are not available for every single effect.

 

Effect-Specific Functions Depending On The Effect

In addition to the standard functions of MADRIX Script, there are other functions available that are special to each effect.

Because of the quantity of different types of effects in MADRIX, each one has its own settings. Therefore, for each effect there are special commands available. Those commands are not working in other effects and a macro which uses such commands cannot be compiled in another effect. An example is the function SetText for the SCE Ticker effect. This function specifies the text of the Ticker. Since no other effect shows text, the function is not available for other effects.

The functions available for the each different effect and their meaning is described in the chapters below. There is one chapter for each effect (SCE Static Color Effects, S2L Sound2Light Effects, M2L Music2Light Effects).

 

Setting And Getting The Current Speed Of An Effect

Several effects allow to set their speed using the BPM slider. Examples for such effects include SCE Plasma or the S2L EQ effect. Until version 2.5 of MADRIX those effects had a speed-slider working with Hz and a range between 1 to 50 Hz. Since version 2.5 of MADRIX those effects have a BPM slider setting the speed of an effect using beats per minute with a range from 0 to 9999 BPM.

The macros of those effects, which support setting the speed, now have two additional functions:

void SetBpm(int bpm) 
int GetBpm()

 

Setting BPM to 0 means that the effect will be stopped immediately. Furthermore, values of the function SetSpeed now range from 0 to 166, which represents a range of 0 to almost 9999 BPM.

 

Using The Frame ID

There are a lot of effects which use an internal frame ID to have more control. For example, the SCE Color Scroll effect uses the frame ID to control the speed of scrolling. This does not make sense for all effects. However, for each effect it is possible to set and get the current frame ID and frame count. The frame count identifies the maximal frame ID used by the effect. This may be utilized to speed up the effect. For example, the following source code increases the speed of an effect that is controlled by the frame ID.

void PreRenderEffect()

{

    SetFrameId(GetFrameId() + 2);

}

 

However, it is not possible to set the frame count by a macro; except for a macro of the MAS Script effect.

 

Applying Filter Effects (FX)

You may quickly change the visual outcome of Effects using Filters (also called Filter Effects, FX).

void SetFilter(int filter)
int GetFilter()

 

Valid values for filter are the global variables »Filters . You can also find further explanations about the various filter types in this chapter.

 

Setting Blind Mode Or Solo Mode

void SetSolo(int)
int GetSolo()
void SetBlind(int)
int GetBlind()

 

Blind mode and solo mode are two options available for each layer. Blind mode will deactivate the current layer, while solo mode will only show this layer while disabling all other layers.
Valid values for int are 0 (Off) or 1 (On).