Abstract class for MKtl controller elements and groups. It provides the common interface that individual MKtlElements (which represent single sliders, buttons, etc) and MKtlElementGroups share.
(Theoretically, one could use MAbstractElement like an MKtlElement without specs.)
create a new instance, with a name, and the MKtl it will belong to.
the MKtl the element belongs to.
the element's name
the type of the element, e.g. \button, \slider, \knob
. See MKtl_description_files for a more detailed list.
Get and set the element's value. with MKtlElementGroup, value is the collected values of its element. Note that value_ does not evaluate any action.
newval |
the new value |
the previous value
Set value and evaluate the associated action.
newval |
the new value |
Evaluate the associated action (without changing the value)
Get and set the action to evaluate when element is activated.
add an action to potentially already present actions
remove an action the present list of actions
reset element action to nil, i.e. without any actions.
returns the parent group of the element in the MKtl
elements hierarchical structure.
if the element is inside one or more groups, and those groups have an action assigned, they will be returned here.
Groups are instances of MKtlElementGroup.
returns the index (Number) of this
inside its parent group
returns an array of indices that points to this
from the top level of the MKtl
elements hierarchy. These values correspond with MKtl: elAt
returns the key (Symbol) of this
inside its parent group
returns an array of keys that points to this
from the top level of the MKtl
elements hierarchy. These values correspond with MKtl: elAtkeys and indices can be mixed, see MKtlElementGroup.
Use the value directly on the server (on a bus).
server |
optional argument that you only have to set once, and only if the server for the bus is not Server: -default. |
an In: -kr holding the current value of this element. Reflects changes of the value.
initialize the bus on the server.
server |
The server the bus should be instantiated on. Default value is Server: -default. |
frees the bus.
A Bus that holds the element's value.
Normally, you should just reference to this bus via the -kr which will also take care of creating the bus when needed.
Tagging allows adding tags to controller elements. The tagging system is flat, i.e. only elements have tags, MKtlElementGroup (and its derivatives) do not - it forwards tagging requests to its children.
all tags of this element.
list of Symbols
If this
is an MKtlElementGroup, it returns a combined list of all tags of its child elements.
add tags to the element
... newTags |
list of Symbols |
If this
is an MKtlElementGroup, it forwards this call to its child elements.
remove tags from the element
... newTags |
list of Symbols |
If this
is an MKtlElementGroup, it forwards this call to its child elements.
searches for specific tag
... tag |
list of Symbols |
true, if all tags specified in the argument are found, otherwise false.
If this
is an MKtlElementGroup, it forwards this call to its child elements.
wipes all tags from the element
If this
is an MKtlElementGroup, it forwards this call to its child elements.