▪The MADRIX user interface provides several possibilities to change the speed of effects, such as Speed Master Left/Right, Speed Pitch, and BPM.
▪In MADRIX Script, additional functions are provided that allow for much more control.
Normally, MADRIX Effects are synchronized to the Main Mixing Frame Rate, which is set to 50 Hz by default. But for the »MAS Script Effect there is the option to control the render frequency independently.
▪void SetAsync(int value)
Valid values for value are 0 (Off) or 1 (On). If asynchronous rendering is activated, the render frequency directly corresponds to the BPM value set by the slider or the macro. For example, a BPM value of 1200 causes a render frequency of 20 Hz. In other words, the effect renders 20 frames per second. Thus, you can decrease the render frequency in order to save performance by slowing down the effect. However, there is an upper limit for the render frequency, which is 50 Hz by default according to the Main Mixing.
There is another scenario to use asynchronous rendering in the MAS Script Effect: Imagine, you want to draw a line step by step, one pixel per frame. Straight forwardly, you can set one pixel after another with each call of »RenderEffect. In order to control the speed of drawing with the BPM slider, it would be smart to activate asynchronous rendering. That way, RenderEffect is called more or less often, depending on the BPM value. Yet another example would be to write a speed-sensitive counter which draws sequential numbers according to the BPM value.
▪During execution of an MAS Script Effect script, you can use the BPM slider.
▪If Async is deactivated (Sync is activated), the script runs with the Main Mixing frequency. The render frequency is fixed. The BPM slider controls the Frame ID / Frame Step.
▪If Async is activated, the MAS Script Effect calculates its render frequency according to the BPM slider (60 BPM = 1 FPS; 1200 BPM = 20 FPS; 3000 BPM = 50 FPS; etc.). The render frequency is variable. The maximum render frequency is still set up by the Main Mixing frequency.
▪When Async is activated, use the following formulas to calculate the speed or render frequency:
BPM = FPS * 60
FPS = BPM / 60
Normally, the effects use floating-point frames which is represented by the rational return values of the functions GetFrameId and GetFrameSteps. That way, the effects are able to render very precisely and smooth. However, sometimes it is desired to let the effects "step" pixel by pixel. This option is only available for some effects, for example »SCE Color Scroll and »MAS Script
▪void SetStep(int value)
Valid values for value are 0 (Off) or 1 (On). If stepped rendering is activated, effects like SCE Color Scroll look hard-stepping. In the MAS Script effect, stepped rendering causes GetFrameId() and GetFrameSteps() to return only integer values.
▪If stepped rendering is deactivated, Frame IDs will be returned as float values.
▪If stepped rendering is activated, Frame IDs will be returned as integer values.
▪GetFrameSteps() - Defines the number of steps between Frames / Frame IDs.
Frame Steps * Main Mixer FPS * 60 = BPM
Note: The script of the MAS Script effect itself is able to control the Frame ID and the Frame Count. Setting the Frame ID within both locations, a script and an additional macro, may result in undesired behavior.
|MADRIX Version: 5.6 | Script Version: 3.18|
|[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%|
Enable automatic translation | Activer la traduction automatique |