Functions Provided By SCE Wave
Function
|
Description
|
void SetBpm(int bpm)
|
Sets the speed of the effect in BPM. Valid values range from 0 to 9999 BPM.
|
int GetBpm()
|
Returns the current effect speed in BPM.
|
void SetColor(color col)
|
Sets the color for the effect.
|
color GetColor()
|
Returns the current effect color.
|
void SetDirection(int dir)
|
Sets the direction for the effect. Allowed are all DIR_ values described in the table of constants, except DIR_NONE.
|
int GetDirection()
|
Returns the current effect direction.
|
void SetPixelLength(int len)
|
Sets the wave length in pixels. Valid values range from 2 to 150.
|
int GetPixelLength()
|
Returns the wave length in pixels.
|
void SetVectorLength(float len)
|
Sets the wave length relative to the current matrix size and effect direction. See below for further details.
|
float GetVectorLength()
|
Returns the current wave length relative to the current matrix size and effect direction. See below for further details.
|
void SetEffectMode(int mode)
|
Sets the wave mode. See below for further details and valid values for mode.
|
int GetEffectMode()
|
Returns the current wave mode. See below for further details.
|
void SetPeak(int peak)
|
Sets the peak value in triangle mode. Valid values range from 0 to 100.
|
int GetPeak()
|
Returs the value set for the peak in triangle mode.
|
This Effect uses the Color Picker. Learn more about Using Colors.
Deprecated Functions
Deprecated functions are outdated functions and should not be used anymore.
Function
|
Description
|
void SetSpeed(int speed)
|
Sets the effect speed. Valid values range from 0 to 166 FPS. Please note: This function is deprecated and may be removed in one of the next releases. Use SetBpm instead.
|
int GetSpeed()
|
Returns the current effect speed in frames per second. Please note: This function is deprecated and may be removed in one of the next releases. Use GetBpm instead.
|
Using Relative Values For The Length
The relative values SetVectorLength uses relate to the actual direction and matrix size. Vertical and horizontal scroll directions are simple to understand. For horizontal (left, right) movements, the value relates to the matrix width. And for vertical movements (up, down), the value relates to the matrix height.
For diagonal movements, e.g. to the upper left corner, the value relates to the greater value of either matrix width or height. For example, the matrix has a width of 40 pixels and a height of 55 pixes. Then, the given value relates to the height of 55 pixels. This is due to the fact that it fits better than using the extent of the matrix diagonal.
Wave Modes
The wave effect provides different algorithms to calculate a wave, such as a sin curve or a sawtooth wave. Using the SetEffectMode it is possible to set them. The following table provides the possible parameters of this function:
Value
|
Description
|
EFFECT_ABS_SINE
|
Uses absolute values of a sin wave to describe a wave.
|
EFFECT_SINE_WAVE
|
Uses a sin wave.
|
EFFECT_SAWTOOTH_UP
|
Uses an upward sawtooth wave to describe the wave.
|
EFFECT_SAWTOOTH_DOWN
|
Uses a downward sawtooth wave to describe the wave.
|
EFFECT_TRIANGLE
|
Uses a triangle curve as to describe the wave.
|
|