This element is a wrapper to a parameter object. It can animate this parameter over time, based on the wrapper value changes. It is an easy way to create animations in a user interface: the wrapper continuously forwards the changes made to its value with a delay that can be specified.
The PARAM_ANIMATOR wrapper has the exact same characteristics (type, min/max/default values, unit...) as the parameter object that it wraps, and they cannot be modified.
See Attributes Common to All Elements.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
param_id |
parameter identifier |
Empty. |
Parameter to wrap for animation. |
|
1.7 |
1.7 |
duration_ms |
Any positive integer value |
250 |
Duration of the animation. |
|
1.7 |
1.7 |
refresh_time_ms |
Any positive integer value |
50 |
interval between two updates in the animation. |
You should increase this value if you are concerned with display performance issues, and decrease it for smoother animations. |
1.7 |
1.7 |
enabled |
false |
enable or disable the animation. |
When animation is disabled, there is no more delay between wrapper and destination paramter changes: the animation is cancelled but value changes are forwarded to the wrapped parameter. |
1.7 |
1.7 | |
persistent |
false |
makes the value of the animator persistent. |
When a parameter is animated, you usually want to make the animator persistent instead of the parameter itself. This way all undo/redo operations are animated as well, and there is no risk of overriding the saved value because an animation is being triggered while loading. |
1.7 |
No | |
Events | ||||||
value_changed |
the event is triggered anytime the value of the object has changed. |
2.0 |
The following example creates a simple skin with a button that controls the fade in/fade out animation of a text element:
<?xml version="1.0" encoding="utf-8" ?> <SKIN author="Blue Cat Audio" name="Default" background_color="#000000" repeat="true" text_color="#ffffff" font_size="28" font_face="Arial"> <COLUMN> <TEXT id="dummy_text" width="200" value="Hello World"/> <PARAM_ANIMATOR id="visibility" persistent="true" param_id="dummy_text.opacity"/> <IMAGE_PARAM_BUTTON image="button.bmp" param_id="visibility"/> </COLUMN> </SKIN>