-
Notifications
You must be signed in to change notification settings - Fork 5
3.5 Set data by Family
All the UI Controls assigned to a specific Family can be translated from their actual position by a given offset.
shift_family(<fam>,<offset_x>,<offset_y>)
The translation is offset-based: all the UI Controls will be moved from their actual position to another according to offset_x
and offset_y
.
This means that any previous translation will be kept and summed to the values in offset_x
and offset_y
.
The constant ALL_FAMILIES
can be used to perform the action over all the UI Controls.
All the UI Controls assigned to a specific Family can be showed or hidden. Value has to be replaced either with VISIBLE
or INVISIBLE
.
set_family_visibility(<fam>,<value>)
The constant ALL_FAMILIES
can be used to perform the action over all the UI Controls.
All the values of the UI Controls assigned to a specific Family can be stored in and retrieved from a given array. You will have to pass only the array name to the function.
Be sure to use a destination array of proper dimensions in order not to lose informations. You will get a Warning from Kontakt in this case.
set_family_values(<fam>,<array>)
get_family_values(<fam>,<array>)
These are “twins” functions. See the example below.
// Save all the values of a Family inside preset_array
on ui_control (save_preset)
get_family_values(FAMILY, preset_array)
end on
// Load all the values of a Family with the values found in preset_array
on ui_control (recall_preset)
set_family_values(FAMILY, preset_array)
end on
In this case, the array used in both the functions is the same. This is the correct way to use these functions in order to recall the values you expect to.
The constant ALL_FAMILIES
can be used to perform the action over all the UI Controls.