Function
|
Description
|
MAS Script
|
Macros for Effects
|
Storage Place Macro
|
Main Output Macro
|
float abs(float x)
|
Returns the absolute value of x.
|
+
|
+
|
+
|
+
|
void AddPixelTransposeEntry(int srcX, int srcY, int destX, int destY)
|
Adds one entry to the pixel transpose table and resizes the table if necessary. srcX and srcY are the x and y coordinates of the source. destX and destY are the destination coordinates. »Description
|
+
|
+
|
+
|
+
|
float arccos(float a)
float arccosDeg(float a)
|
Returns the arc cosine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float arcsin(float a)
float arcsinDeg(float a)
|
Returns the arc sine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float arctan(float a)
float arctanDeg(float a)
|
Returns the arc tangent of the angle a in radian measure or degrees, respectively
|
+
|
+
|
+
|
+
|
float ceil(float f)
|
Rounds up the given value to the next integer value. E.g. ceil(2.00001) = 3.0
|
+
|
+
|
+
|
+
|
void ChangeBrightness(color col)
|
Adds the values of the specified color to the current color of each pixel in the matrix. »Example
|
+
|
+
|
+
|
+
|
int CheckScriptEngineVersion(int major, int minor)
|
Checks the Script engine version in use and returns 1 if the version is equal or higher to the version specified with major and minor. Or else 0 is returned. The current Script Engine Version is 1.43. A useful function to check if the minimum requirements of your script are met. »Example
|
+
|
+
|
+
|
+
|
int CheckSoftwareVersion(int major, int minor, int subminor, int subsubminor)
|
Checks the MADRIX software version in use and returns 1 if the version is equal or higher to the version specified with major, minor, subminor, and subsubminor. Or else 0 is returned. The current MADRIX version is 2.14.8.0. You can check which version you are using by opening the Logfile in MADRIX (at the beginning of the file) or check the MADRIX.exe (perform a right-click->Properties->Version). A useful function to check if the minimum requirements of your script are met. »Example
|
+
|
+
|
+
|
+
|
void Clear()
void Clear(color col)
|
Fills the whole matrix with the given color. The default color (no color parameter) is black.
|
+
|
+
|
+
|
+
|
void ClearAlpha(int alpha)
|
Sets the alpha value of each pixel in the matrix to alpha.
|
+
|
+
|
+
|
+
|
void ClearColor(color col)
|
Fills the whole matrix with the given color without changing the alpha value.
|
+
|
+
|
+
|
+
|
void ColorReplace(color oldCol, color newCol)
|
Replaces the given color oldCol with a new one (newCol).
|
+
|
+
|
+
|
+
|
float cos(float a)
float cosDeg(float a)
|
Returns the cosine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float cosH(float a)
float cosHDeg(float a)
|
Returns the hyperbolic cosine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
void CreatePixelTransposeTable(int size, int growsize)
|
Creates the pixel transpose table with the given size and growsize. »Description
|
+
|
+
|
+
|
+
|
float deg2rad(float a)
|
Converts the angle a from degrees to radian measure.
|
+
|
+
|
+
|
+
|
void Dim(float value)
|
Reduces the brightness of the complete virtual matrix. Valid values for value range from 0.0 to 1.0.
|
+
|
+
|
+
|
+
|
void DimPixel(float value, int x, int y)
|
Reduces the brightness of an individual pixel. x and y are the coordinates of the pixel. Valid values for value range from 0.0 to 1.0.
|
+
|
+
|
+
|
+
|
void DimPixelArea(float value, int x, int y, int width, int height)
|
Reduces the brightness of a certain area of the virtual matrix. x and y are the coordinates of the area (upper left corner). width and height specify the width and height of the area. Valid values for value range from 0.0 to 1.0.
|
+
|
+
|
+
|
+
|
void DrawPixelArea(color matrix[][], int xDst, int yDst, int w, int h,
int xSrc, int ySrc, color filter)
|
Copies data from a 2-dimensional field of colors and renders it to the matrix. »Description
|
+
|
+
|
+
|
+
|
void DrawPixelCircle(color col, int x, int y, int rw, int rh)
|
Draws a circle at the center of a specified rectangle with the specified color. The rectangle is defined by the pixel coordinates (x, y) and the absolute width rw and height rh.
|
+
|
+
|
+
|
+
|
void DrawPixelCross(color col, int x, int y, int w, int h)
|
Draws a cross onto the matrix with the given width w and height h at the given position. Position and size are given as absolute pixel values.
|
+
|
+
|
+
|
+
|
void DrawPixelDiamond(color col, int x, int y, int w, int h)
|
Draws a diamond shape starting with pixel (x, y) with the absolute width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawPixelEllipse(color col, int mx, int my, int w, int h)
|
Draws an ellipse with the absolute midpoint position (mx,my) and the absolute width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawPixelLine(color col, int x1, int y1, int x2, int y2)
|
Draws a line from pixel (x1, y1) to (x2, y2) with the specified color. »Example
|
+
|
+
|
+
|
+
|
void DrawPixelRect(color col, int x, int y, int w, int h)
|
Draws a rectangle from pixel (x, y) with the absolute width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawPixelStar(color col, int x, int y, int w, int h)
|
Draws a star onto the matrix with the given width and height at the given position. Position and size are given as absolute pixel values.
|
+
|
+
|
+
|
+
|
void DrawPixelText(color c, font f, string t, int x, int y, int rotation)
|
Draws a text across the main output. color c and font f are structures. Valid values for rotation are ROTATION_TEXT_NONE, ROTATION_TEXT_90, ROTATION_TEXT_180, ROTATION_TEXT_270. »Example 1 »Example 2 »Example 3 »Example 4
|
+
|
+
|
+
|
+
|
void DrawVectorCircle(color col, float x, float y, float rw, float rh)
|
Draws a circle at the center of a specified rectangle with the specified color. The rectangle is defined by the relative position (x, y) and the relative width rw and height rh.
|
+
|
+
|
+
|
+
|
void DrawVectorCross(color col, float x, float y, float w, float h)
|
Draws a cross onto the matrix with the given width and height at the given position. Both, position and size are given as relative values between 0.0 and 1.0.
|
+
|
+
|
+
|
+
|
void DrawVectorDiamond(color col, float x, float y, float w, float h)
|
Draws a diamond shape from the relative position (x,y) with the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawVectorEllipse(color col, float mx, float my, float w, float h)
|
Draws an ellipse with the relative midpoint position (mx,my) and the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawVectorLine(color col, float x1, float y1, float x2, float y2)
|
Draws a line from the relative position (x1, y1) to (x2, y2) with the specified color.
|
+
|
+
|
+
|
+
|
void DrawVectorRect(color col, float x, float y, float w, float h)
|
Draws a rectangle from the relative position (x,y) with the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void DrawVectorStar(color col, float x, float y, float w, float h)
|
Draws a star onto the matrix with the given width and height at the given position. Both, position and size are given as relative values between 0.0 and 1.0.
|
+
|
+
|
+
|
+
|
void DrawVectorText(color c, font f, string t, float x, float y, int rotation)
|
Draws a vector text across the main output. color c and font f are structures. Valid values for rotation are ROTATION_TEXT_NONE, ROTATION_TEXT_90, ROTATION_TEXT_180, ROTATION_TEXT_270. Example: DrawPixelText(RED,f,"Hello",0,1,0);
|
+
|
+
|
+
|
+
|
void EnableFrameFade(int enable)
|
Enables or disables frame fade for the effect. If the value enable is set to false or 0, frame fade will be disabled. Otherwise, it will be enabled.
|
+
|
+
|
|
|
int endswith(string text, string substring)
|
This function checks if the string text ends with the given substring. If text ends with the specified substring, true is returned, otherwise false. »Description
|
+
|
+
|
+
|
+
|
void ExecutePixelTranspose(int clear)
|
Executes the pixel transposition by using the pixel transpose table. Using the value clear will erase/overwrite all pixels that are not defined as destination with the the color black. Otherwise, NOCLEAR will keep all pixels that are not defined as original destination. »Description
|
+
|
+
|
+
|
+
|
float exp(float x)
|
Returns the result of e (2.7182...) to the power of x.
|
+
|
+
|
+
|
+
|
void FillPixelCircle(color col, int x, int y, int rw, int rh)
|
Fills a circle with the specified color at the center of the specified rectangle. The rectangle is defined by the starting pixel (x,y) and the absolute width rw and height rh.
|
+
|
+
|
+
|
+
|
void FillPixelDiamond(color col, int x, int y, int w, int h)
|
Fills a diamond starting from pixel (x,y) with the absolute width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void FillPixelEllipse(color col, int mx, int my, int w, int h)
|
Fills an ellipse with the absolute midpoint position (mx,my) and the absolute width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void FillPixelRect(color col, int x, int y, int w, int h)
|
Fills a rectangle starting from pixel (x,y) with the absolute width w and height h with the specified color. »Example
|
+
|
+
|
+
|
+
|
void FillVectorCircle(color col, float x, float y, float rw, float rh)
|
Fills a circle at the center of a specified rectangle in the specified color. The rectangle is defined by the relative position (x,y) and the relative width rw and height rh.
|
+
|
+
|
+
|
+
|
void FillVectorDiamond(color col, float x, float y, float w, float h)
|
Fills a diamond starting from the relative position (x,y) with the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void FillVectorEllipse(color col, float mx, float my, float w, float h)
|
Fills an ellipse with the relative midpoint position (mx,my) and the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void FillVectorRect(color col, float x, float y, float w, float h)
|
Fills a rectangle starting from the relative position (x,y) with the relative width w and height h with the specified color.
|
+
|
+
|
+
|
+
|
void Filter(int filter)
|
Renders a filter over the matrix. »Valid parameters (Filters) »Description
|
+
|
+
|
+
|
+
|
int findstring(int startIndex, string text, string substring)
|
Searches for the substring within text starting at startIndex. The function returns an index that describes the position at which the substring begins. »Description
Example: substring(0, "Hallo Welt", "Welt") returns 6. If the substring is not found within text, -1 is returned.
|
+
|
+
|
+
|
+
|
float fmax(float x, float y)
|
Returns the maximum value of the floating point numbers x and y.
|
+
|
+
|
+
|
+
|
float fmin(float x, float y)
|
Returns the minimum value of x and y.
|
+
|
+
|
+
|
+
|
float fmod(float denominator, float divisor)
|
Calculates the remainder of the float division.
|
+
|
+
|
+
|
+
|
float frandom()
|
Returns a random number within the the range of 0 to 1.
|
+
|
+
|
+
|
+
|
void GetAllIntervals(int buf[])
|
Fills the fiel buf with the occurrences of each interval (buf[0] ... buf[10]). buf[index] is true, if the specified interval was analyzed. »Example
|
+
|
+
|
|
|
void GetAllNoteValues(int buf[])
|
Fills the field buf with the sound level values for each note (buf[0] ... buf[127]). buf[index] can differ from 0 to 127.
|
+
|
+
|
|
|
string GetApplicationPath()
|
Locates the MADRIX.exe on your harddisk and returns the path as a string. »Example
|
+
|
+
|
+
|
+
|
int GetBassTone()
|
Returns a value, ranging from 0 to 127, representing the lowest tone (0 = C, 1 = C#, 2 = D, ...). The return value is -1, if the lowest tone could not be determined.
|
+
|
+
|
|
|
int GetBassType()
|
Returns a value, ranging from 0 to 11, representing the bass type (0 = base bass, 1,2 = small/large second bass, 3,4 = small/large third bass, ... , 10, 11 = small/large seventh bass). The return value is -1 if the bass type could not be determined.
|
+
|
+
|
|
|
int GetBassValue()
|
Returns a value, ranging from 0 to 127, representing the sound level of the bass tone.
|
+
|
+
|
|
|
int GetColorDepth()
|
Returns the color depth of the fixture.
|
+
|
+
|
+
|
+
|
string GetComputerName()
|
Retrieves the name of the computer in use as defined in the Windows® operating system.
|
+
|
+
|
+
|
+
|
date GetDate()
|
Returns a date structure with the current date. »Example
|
+
|
+
|
+
|
+
|
int GetDegreeMapRotation()
|
Returns the current rotation value in degrees.
|
+
|
+
|
|
|
void GetDmxIn(int DmxValues[], int startchannel, int channels, int universe)
|
Stores the DMX-IN status of several DMX channels in an array (DmxValues[]). To use the function, choose a DMX start channel and specify the number of channels that should be scanned. Valid values for startchannel range from 0 to 511. Valid values for channels range from 0 to 511. Please note that a maximum of 512 channels can be scanned. This means that the sum of startchannel + channels must be less or equal to 512. In addition, specify the universe that should be scanned. Valid values for universe range from 0 to 255. The default universe is 0, i.e. DMX Universe 1.
|
+
|
+
|
+
|
+
|
int GetDmxInChannel(int channel, int universe)
|
Returns the status of the DMX-IN functionality of a specified DMX channel (channel). Valid values for channel range from 0 to 511. In addition, specify the universe that should be scanned. Valid values for universe range from 0 to 255. The default value of universe is 0, i.e. DMX Universe 1.
|
+
|
+
|
+
|
+
|
int GetFilter()
|
Returns which Filter Effect (FX) is applied to the matrix.
|
+
|
+
|
+
|
|
float GetFrameCount()
|
Retrieves 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.
|
+
|
+
|
|
|
float GetFrameId()
|
Returns the ID of the current frame. »Description
|
+
|
+
|
|
|
float GetFrameSteps()
|
Returns the number of frames which are between this and the last call. »Description
|
+
|
+
|
|
|
int GetLink()
|
Returns 1 (i.e. true) if the option to link effect layers is enabled, otherwise 0 (false).
|
+
|
+
|
|
|
int GetMapModeMirror()
|
Returns the current mirror mode. »Description
|
+
|
+
|
|
|
int GetMapModeTile()
|
Returns the current tile mode. »Description
|
+
|
+
|
|
|
int GetMapPixel(int map[])
|
Retrieves the current mapping of the effect. The coordinates and matrix dimension are returned in the given field using absolute pixel coordinates. The function returns true, if the effect matrix is mapped. false is returned if the effect is full-sized onto the matrix. »Description
|
+
|
+
|
|
|
int GetMapTileEffectPixel(int map[])
|
Retrieves the current map tile settings of the effect. Returns true if mapping is active, otherwise false. map retrieves the settings as follows:
• | map[0] = x - start coordinate |
• | map[1] = y - start coordinate |
• | map[2] = w - width of the tile |
• | map[3] = h - height of the tile |
»Description
|
+
|
+
|
|
|
int GetMapTileEffectVector(float map[])
|
Retrieves the current map tile settings of the effect. Returns true if mapping is active, otherwise false. map retrieves the settings as followed:
• | map[0] = x - start coordinate |
• | map[1] = y - start coordinate |
• | map[2] = w - width of the tile |
• | map[3] = h - height of the tile |
»Description
|
+
|
+
|
|
|
int GetMapVector(float map[])
|
Retrieves the current mapping of the effect. The coordinates and matrix dimension are returned in the given field using relative values between 0.0 and 1.0. But negative values are also possible. The function returns true, if the effect matrix is mapped. false is returned if the effect is full-sized onto the matrix. »Description
|
+
|
+
|
|
|
int GetMatrixHeight()
|
Returns the vertical pixel count of the matrix.
|
+
|
+
|
+
|
+
|
int GetMatrixWidth()
|
Returns the horizontal pixel count of the matrix.
|
+
|
+
|
+
|
+
|
void GetMidiInControl(int midivalues[], int startcontrol, int controlcount, int midichannel, int device)
|
Stores the MIDI values for multiple controls in an array (midivalues[]). To use the function, choose a start control (startcontrol) and the number of controls (controlcount), as well as the MIDI channel (midichannel) and the device. The default value of startnote, midichannel, and device is 0, i.e. the first control, channel, and device. The default and maximum value of controlcount is 128. (Please note: In MADRIX, the index for channels and devices starts with 1, while the index for MIDI notes starts with 0). »Example
|
+
|
+
|
+
|
+
|
int GetMidiInControlValue(int midicontrol, int midichannel, int device)
|
Returns the MIDI control value of the specified MIDI control change (midicontrol) and midichannel for the specified device. The default value of control, midichannel, and device is 0, i.e. the first control, channel, and device. (Please note: In MADRIX, the index for channels and devices starts with 1, while the index for MIDI notes starts with 0). »Example
|
+
|
+
|
+
|
+
|
void GetMidiInNote(int midivalues[], int startnote, int notecount, int midichannel, int device)
|
Stores the MIDI values for multiple notes in an array (midivalues[]). To use the function, choose a start note (startnote) and the number of notes (notecount), as well as the MIDI channel (midichannel) and the device. The default value of startnote, midichannel, and device is 0, i.e. the first control, channel, and device. The default and maximum value of notecount is 128. (Please note: In MADRIX, the index for channels and devices starts with 1, while the index for MIDI notes starts with 0). »Example
|
+
|
+
|
+
|
+
|
int GetMidiInNoteValue(int midinote, int midichannel, int device)
|
Returns the MIDI note value of the specified MIDI note (midinote) and midichannel for the specified device. The default value of note, midichannel, and device is 0, i.e. the first note, channel, and device. (Please note: In MADRIX, the index for channels and devices starts with 1, while the index for MIDI notes starts with 0). »Example
|
+
|
+
|
+
|
+
|
int GetMixMode()
|
Returns the currently set mix mode. »Valid parameters (Mix modes) »Description
|
+
|
+
|
|
|
int GetNoteValue(int note)
|
Returns a value, ranging from 0 to 127, representing the sound level of the specified note: 0 = C = 8.25 Hz, ..., 127 = G = 12.67 kHz. »Example
|
+
|
+
|
|
|
int GetOpacity()
|
Returns the currently set opacity value of the effect. The value ranges from 0 to 255.
|
+
|
+
|
|
|
color GetPixel(int x, int y)
|
Returns the color of the pixel at position (x,y).
|
+
|
+
|
+
|
+
|
void GetPixelArea(color matrix[][], int xSrc, int ySrc, int w, int h,
int xDst, int yDst)
|
Retrieves data from the matrix and stores it into a 2-dimensional field of colors. »Description
|
+
|
+
|
+
|
+
|
string GetScriptEngineVersion()
|
Returns the script engine version and returns the value as a string. »Example
|
+
|
+
|
+
|
+
|
string GetSoftwareVersion()
|
Returns the MADRIX software version and returns the value as a string. »Example
|
+
|
+
|
+
|
+
|
int GetSoundLevel(int channel)
|
Returns a value, ranging from 0 to 255, representing the sound level of the stereo channel: 0 = left channel, 1 = right channel. »Example
|
+
|
+
|
|
|
int GetSubMaster()
|
Returns the currently set submaster value of the effect. The value ranges from 0 to 255.
|
+
|
+
|
|
|
time GetTime()
|
Returns a time structure with the current time. »Example
|
+
|
+
|
+
|
+
|
time GetTimeCode()
|
Returns a time structure with the currently used Time Code. »Example
|
+
|
+
|
+
|
+
|
int GetTonality()
|
Returns a value, ranging from 0 to 11, representing the tonality (0 = C, 1 = C#, 2 = D ...). The return value is -1, if the tonality could not be determined. »Example
|
+
|
+
|
|
|
int GetToneScale()
|
Returns a value, ranging from 0 to 2, representing the tone scale (0 = undetermined, 1 = major, 2 = minor). »Example
|
+
|
+
|
|
|
string GetUserName()
|
Retrieves the name of the current user as defined in the Windows® operating system.
|
+
|
+
|
+
|
+
|
string GetUserProfileDirectory()
|
Locates the directory of the current user profile on the harddisk and returns the path as a string. »Example
|
+
|
+
|
+
|
+
|
float GetVectorMapRotation()
|
Returns the current rotation value.
|
+
|
+
|
|
|
color GetVectorPixel(float x,float y)
|
Returns the color of the pixel drawn at vector coordinates x and y.
|
+
|
+
|
+
|
+
|
void Greyscale()
|
Converts the whole matrix to grey scaled values.
|
+
|
+
|
+
|
+
|
float hypot(float x, float y)
|
Calculates the length of the hypotenuse of an orthogonal triangle with x and y as the cathetus' lengths.
|
+
|
+
|
+
|
+
|
void InvertColor()
|
Inverts the color of the entire matrix.
|
+
|
+
|
+
|
+
|
void InvertMatrix()
|
Inverts the whole matrix. The top left pixel will be moved to the bottom right and the bottom left pixel to the top right.
|
+
|
+
|
+
|
+
|
int isalnum(string text)
|
Returns true if the given string text contains only characters and figures and if its length is greater then 0. Otherwise, false is returned. »Description
|
+
|
+
|
+
|
+
|
int isalpha(string text)
|
Returns true if the given string contains only characters and if its length is greater than 0. Otherwise, false is returned. »Description
|
+
|
+
|
+
|
+
|
int IsDmxInEnabled()
|
Retrieves if DMX-IN is activated (1) or not (0).
|
+
|
+
|
+
|
+
|
int IsFrameFadeEnabled()
|
Returns true if frame fade is currently enabled, or false if not.
|
+
|
+
|
|
|
int IsInterval(int index)
|
Returns true if the specified interval (at the index position, ranging from 0 to 10) was analyzed.
|
+
|
+
|
|
|
int IsMapped()
|
Returns true if the current effect is mapped, otherwise false.
|
+
|
+
|
|
|
int IsMapRotation()
|
Returns the status of the map rotation. 0 means the rotation value is absolute (no animation) and 1 means the rotation value is relative (animation).
|
+
|
+
|
|
|
int IsMidiInEnabled()
|
Retrieves if MIDI-IN is activated (1) or not (0).
|
+
|
+
|
+
|
+
|
int IsNote(int note)
|
Returns true if the specified note was analyzed. (0 = C = 8.25 Hz, ..., 127 = G = 12.67 kHz)
|
+
|
+
|
|
|
int isnum(string text)
|
Returns true if the given text represents a number. This may be an integer value or a floating point number, like 1.3. Otherwise it returns false. »Description
|
+
|
+
|
+
|
+
|
int IsTonality()
|
Returns true if the tonality could be determined.
|
+
|
+
|
|
|
float ln(float x)
|
Returns the result of the natural logarithm of x.
|
+
|
+
|
+
|
+
|
float log10(float x)
|
Returns the result of the common logarithm of x.
|
+
|
+
|
+
|
+
|
void MapEffectPixel(int x, int y, int w, int h)
|
Sets the mapping coordinates for the current effect. Using this method the effect may be mapped to different positions of the matrix. x and y are the start coordinates using absolute pixel values. Negative values are also possible in order to move the effect matrix beyond the real matrix. w and h are the new width and height of the mapped matrix. »Description
Please note: If the size of the virtual effect matrix is changed by this function, the effect will be restarted and InitEffect is called.
|
+
|
+
|
|
|
void MapEffectVector(float x, float y, float w, float h)
|
Sets the mapping coordinates for the current effect. Using this method the effect may be mapped to different positions of the matrix. x and y are the start coordinates using relative values between 0.0 and 1.0. Negative values are also possible. w and h are the new width and height of the mapped matrix. »Description
Please note: If the size of the virtual effect matrix is changed by this function, the effect will be restarted and InitEffect is called.
|
+
|
+
|
|
|
void MapTileEffectPixel(int x, int y, int w, int h)
|
Sets the tile coordinates for the current effect using absolute values. x and y are the start coordinates of the tile. w and h are the width and the height.
|
+
|
+
|
|
|
void MapTileEffectVector(float x, float y, float w, float h)
|
Sets the tile coordinates for the current effect using relative values. x and y are the start coordinates of the tile. w and h are the width and the height.
|
+
|
+
|
|
|
int max(int x, int y)
|
Returns the maximum value of the integer numbers x and y.
|
+
|
+
|
+
|
+
|
int min(int x, int y)
|
Returns the minimum value of x and y.
|
+
|
+
|
+
|
+
|
void PixelFloodFill(color col, int x, int y)
|
Fills an single-colored area with the specified color col, starting at the given position x and y.
|
+
|
+
|
+
|
+
|
float pow(float x, float y)
|
Returns the result of the calculation of x to the power of y.
|
+
|
+
|
+
|
+
|
float rad2deg(float a)
|
Converts the angle a from radian measure to degrees.
|
+
|
+
|
+
|
+
|
int random(int min, int max)
|
Returns a random integer number in the value range of min to max.
|
+
|
+
|
+
|
+
|
int ReadAsync(string file, string txt)
|
Reads content as text from a file into the string txt. »Description & Examples
|
+
|
+
|
+
|
+
|
void replace(string src, string old, string new)
|
Replaces any appearances of old within src with new. »Description
|
+
|
+
|
+
|
+
|
int rfindstring(int startIndex, string text, string substring)
|
This function looks for the substring in the given text from its ending to the beginning. The search starts at the given startIndex, while the last charachter has the index 0. The function returns the index where the substring occurs for the first time after the specified startIndex. If the substring was not found, -1 is returned. »Description
|
+
|
+
|
+
|
+
|
float round(float f)
|
Rounds the given value to its next integer value. The value is rounded correctly, either up or down.
|
+
|
+
|
+
|
+
|
void SetDegreeMapRotation(int degree, int anim)
|
Sets the rotation value and animation status of the effect using absolute values. degree describes the degrees/angle. Valid values range from -720 to 720. Valid values for anim are MAP_ANIM_OFF und MAP_ANIM_ON.
|
+
|
+
|
|
|
void SetFilter(int filter)
|
Applies a Filter Effect (FX) to the matrix. Valid values for filter are »Filters »Description
|
+
|
+
|
+
|
|
void SetFrameId(float id)
|
Sets a new frame ID. If the given id is lower than 0, it is set to 0. »Description
|
+
|
+
|
|
|
void SetInvalid()
|
Use this function to set an already rendered frame/effect as invalid. This means that the frame will be re-rendered, which is the normal case. This can be useful with dynamic effects since the content of the effect does change all the time. Re-rendering is the normal case as effects and output data are rendered with several frames per second (FPS). See also »SetValid
|
+
|
+
|
|
|
void SetLink(int enable)
|
Enables or disables the option to link effect layers. Valid values range are 0 (false) or 1 (true).
|
+
|
+
|
|
|
void SetMapModeMirror(mirrorMode)
|
Sets the mirror mode for effect tiling. For mirrorMode one of the MAP_MIRROR_ values must be used. »Description
|
+
|
+
|
|
|
void SetMapModeTile(tileMode)
|
Sets the tile mode for effect tiling. For tileMode one of the MAP_TILE_ values must be used. »Description
|
+
|
+
|
|
|
void SetMixMode(int mode)
|
Sets the mix mode of the effect. mode may be one of the values defined in Mix modes. If mode is invalid, nothing happens and a message is displayed in the Script output of the Script Editor. »Description
|
+
|
+
|
|
|
void SetOpacity(int value)
|
Sets the opacity value of the effect. Valid values range from 0 to 255.
|
+
|
+
|
|
|
void SetPixel(color col, int x, int y)
|
Sets the pixel at position (x,y) to the specified color. »Description & Examples
|
+
|
+
|
+
|
+
|
void SetPixelGreyscale(int x, int y)
|
Renders the selected pixel at position (x,y) in greyscale. »Description
|
+
|
+
|
+
|
+
|
void SetPixelTransposeEntry(int idx, int srcX, int srcY, int destX, int destY)
|
Adds one pixel transpose table entry defined by idx. srcX and srcY are the x and y coordinates of the source. destX and destY are the destination coordinates. »Description
|
+
|
+
|
+
|
+
|
int SetReadAsyncInterval(string file, int interval)
|
Sets the reading interval for a certain file. To be used in combination with ReadAsync. »Description & Examples
|
+
|
+
|
+
|
+
|
void SetSubMaster(int value)
|
Sets the submaster value of the effect. Valid values range from 0 to 255.
|
+
|
+
|
|
|
void SetValid()
|
Use this function to set an already rendered frame/effect as valid. This means that the frame will not be re-rendered. This can be useful with static effects since the content of the effect does not change over time. Re-rendering would be the normal case as effects and output data are rendered with several frames per second (FPS). See also »SetInvalid
|
+
|
+
|
|
|
void SetVectorMapRotation(float value, int anim)
|
Sets the rotation value and animation status of the effect using relative values. degree describes the degrees/angle. Valid values range from -200.0 to 200.0. Valid values for anim are MAP_ANIM_OFF und MAP_ANIM_ON.
|
+
|
+
|
|
|
void SetVectorPixel(color, float x, float y)
|
Draws one pixel at the given variable vector coordinates. In addition to the coordinates, a color must be specified.
|
+
|
+
|
+
|
+
|
void ShiftPixelMatrix(int x, int y, int w, int h, int dir, int step)
|
Moves the area of the matrix (defined by x, y, w, and h) step pixel into the given direction. Exemplary values for dir are SHIFT_UP, SHIFT_DOWN, or SHIFT_UL. »List of Global Constants.
Please note that after shifting the pixels, the data is lost. It is not possible to undo a shifting operation. x, y, w, h describe the rectangle that should be shifted. x and y describe the upper left corner. w and h are the width and height of the rectangle. The chapter about the function provides more details.
|
+
|
+
|
+
|
+
|
void ShiftVectorMatrix(float x, float y, float w, float h, int dir, float step)
|
Moves the area of the matrix (defined by x, y, w, and h) step pixel into the given direction. Exemplary values for dir are SHIFT_UP, SHIFT_DOWN, or SHIFT_UL. »List of Global Constants.
Please note that after shifting the pixels, the data is lost. It is not possible to undo a shifting operation. x, y, w, h describe the rectangle that should be shifted. x and y describe the upper left corner. w and h are the width and height of the rectangle. The chapter about the function provides more details.
|
+
|
+
|
+
|
+
|
float sin(float a)
float sinDeg(float a)
|
Returns the sine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float sinH(float a)
float sinHDeg(float a)
|
Returns the hyperbolic sine of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float sqrt(float x)
|
Returns the square root of x.
|
+
|
+
|
+
|
+
|
int startswith(string text, string substring)
|
This function checks if the text string starts with the given substring. If text starts with substring,true is returned. Otherwise false is returned. »Description
|
+
|
+
|
+
|
+
|
int strcmp(string str1, string str2)
|
Compares the two given strings each other. If they are equal, 0 is returned. A value of -1 is returned if str1 is less than str2. A value of 1 is returned if str1 is greater than str2. »Description
|
+
|
+
|
+
|
+
|
void strip(string text)
|
Removes leading and ending white spaces, such as space, tabulator, line feeds, etc., from the given string text. »Description
|
+
|
+
|
+
|
+
|
string substring(string text, int start, int count)
|
Extracts a certain number of characters (count) beginning with start from the given text. »Description
Example: substring("Hello", 0, 2) returns "He".
|
+
|
+
|
+
|
+
|
float tan(float a)
float tanDeg(float a)
|
Returns the tangent of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
float tanH(float a)
float tanHDeg(float a)
|
Returns the hyperbolic tangent of the angle a in radian measure or degrees, respectively.
|
+
|
+
|
+
|
+
|
void tokenize(string src, string delimiter, string reslist[])
|
Strips the string src into smaller pieces delimited by characters within delemiter. The result is returned in reslist. »Description
|
+
|
+
|
+
|
+
|
void tolower(string text)
|
Converts each character of the given string text into a lowercase character. »Description
|
+
|
+
|
+
|
+
|
void toupper(string text)
|
Converts each character of the given string text into a uppercase characters. »Description
|
+
|
+
|
+
|
+
|
void TRACE(variable)
|
Writes the value of the specified variable into the Script output window. Fulfills the same function as WriteText.
|
+
|
+
|
+
|
+
|
float trunc(float f)
|
Truncates/cuts off the decimals from a floating point value.
|
+
|
+
|
+
|
+
|
void VectorFloodFill(color col, float x, float y)
|
Fills an single-colored area with the given color col, starting at the given position x and y. In contrast to PixelFloodFill, the coordinates are given as floating point values ranging from 0.0 to 1.0.
|
+
|
+
|
+
|
+
|
void WriteText(string s)
|
Writes the specified message into the Script output window. »Example
|
+
|
+
|
+
|
+
|