ableton.v2.control_surface.mode (runtime)¶
Live 12 — Live Object Model & framework reference (descriptions and signatures).
Functions¶
depends(**dependencies)¶
generator_mode(function)¶
infinite_context_manager(generator)¶
is_contextmanager(value)¶
is_iterable(value)¶
listens(event_path, *a, **k)¶
make_mode_button_control(modes_component, mode_name, behaviour, **k)¶
old_hasattr(obj, attr)¶
pop_last_mode(component, mode)¶
to_camel_case_name(mode_name, separator='')¶
tomode(thing)¶
Classes¶
class AddLayerMode(LayerModeBase)¶
Methods¶
__init__(self, component=None, layer=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_get_component(self)¶
enter_mode(self)¶
leave_mode(self)¶
class ButtonControl(ButtonControlBase)¶
Properties¶
double_clickedpressedpressed_delayedreleasedreleased_delayedreleased_immediatelyvalue
Methods¶
State(color='DefaultButton.On', *a, **k)¶
__init__(self, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_clear_state(self, manager)¶
_get_state(self, manager, state_factory=None)¶
_make_control_state(self, manager)¶
Attributes¶
DELAY_TIME=0.3- Convert a string or number to a floating point number, if possible.DOUBLE_CLICK_TIME=0.5- Convert a string or number to a floating point number, if possible.REPEAT_RATE=0.1- Convert a string or number to a floating point number, if possible._extra_args=[]- Built-in mutable sequence._extra_kws={}- dict() -> new empty dictionary
class ButtonControlBase(InputControl)¶
Properties¶
double_clickedpressedpressed_delayedreleasedreleased_delayedreleased_immediatelyvalue
Methods¶
State(pressed_color=None, disabled_color=None, repeat=False, enabled=True, double_click_context=None, delay_time=None, *a, **k)¶
__init__(self, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_clear_state(self, manager)¶
_get_state(self, manager, state_factory=None)¶
_make_control_state(self, manager)¶
Attributes¶
DELAY_TIME=0.3- Convert a string or number to a floating point number, if possible.DOUBLE_CLICK_TIME=0.5- Convert a string or number to a floating point number, if possible.REPEAT_RATE=0.1- Convert a string or number to a floating point number, if possible._extra_args=[]- Built-in mutable sequence._extra_kws={}- dict() -> new empty dictionary
class Component(ControlManager)¶
Properties¶
applicationis_rootlayerparentsong
Methods¶
__init__(self, name='', parent=None, register_component=None, song=None, layer=None, is_enabled=True, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_add_child(self, component)¶
_get_layer_iterable(self)¶
_grab_all_layers(self)¶
_internal_on_enabled_changed(self)¶
_release_all_layers(self)¶
_set_enabled_recursive(self, enable)¶
_tasks(self, parent_task_group=None)¶
_update_is_enabled(self)¶
add_children(self, *a)¶
add_control(self, name, control)¶
add_enabled_listener(self, slot, identify_sender=False, *a, **k)¶
control_notifications_enabled(self)¶
disconnect(self)¶
disconnect_disconnectable(self, slot)¶
enabled_has_listener(self, slot)¶
enabled_listener_count(self)¶
find_disconnectable(self, predicate)¶
has_disconnectable(self, slot)¶
is_enabled(self, explicit=False)¶
notify_enabled(self, *a, **k)¶
on_enabled_changed(self)¶
register_disconnectable(self, slot)¶
register_disconnectables(self, disconnectables)¶
register_slot(self, *a, **k)¶
remove_enabled_listener(self, slot)¶
set_enabled(self, enable)¶
unregister_disconnectable(self, slot)¶
update(self)¶
Attributes¶
_has_task_group=False- bool(x) -> bool_layer=Nonecanonical_parent=Noneis_private=False- bool(x) -> boolname=''- str(object='') -> str
class CompoundLayer(CompoundResource)¶
Properties¶
firstownerprioritysecond
Methods¶
__init__(self, first_resource=None, second_resource=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
get_owner(self)¶
grab(self, client, *a, **k)¶
release(self, client)¶
class CompoundMode(Mode)¶
Methods¶
__init__(self, *modes, **k)¶
Initialize self. See help(type(self)) for accurate signature.
enter_mode(self)¶
leave_mode(self)¶
class ContextManagerMode(Mode)¶
Methods¶
__init__(self, context_manager=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
enter_mode(self)¶
leave_mode(self)¶
class DelayMode(Mode)¶
Methods¶
__init__(self, mode=None, delay=None, parent_task_group=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_enter_mode_delayed(self)¶
enter_mode(self)¶
leave_mode(self)¶
class EnablingMode(Mode)¶
Methods¶
__init__(self, enableable=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
enter_mode(self)¶
leave_mode(self)¶
class EnablingModesComponent(ModesComponent)¶
Properties¶
active_modesapplicationis_rootlayermodesparentselected_groupsselected_modesong
Methods¶
__init__(self, component=None, enabled_color='DefaultButton.On', disabled_color='DefaultButton.Off', *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_add_child(self, component)¶
_do_enter_mode(self, name)¶
_do_leave_mode(self, name)¶
_get_layer_iterable(self)¶
_get_mode_behaviour(self, name)¶
_grab_all_layers(self)¶
_internal_on_enabled_changed(self)¶
_release_all_layers(self)¶
_set_enabled_recursive(self, enable)¶
_tasks(self, parent_task_group=None)¶
_update_cycle_mode_button(self, selected)¶
_update_is_enabled(self)¶
_update_mode_buttons(self, selected)¶
add_children(self, *a)¶
add_control(self, name, control)¶
add_enabled_listener(self, slot, identify_sender=False, *a, **k)¶
add_mode(self, name, mode_or_component, cycle_mode_button_color=None, groups=set(), behaviour=None)¶
add_mode_button_control(self, mode_name, behaviour)¶
add_selected_mode_listener(self, slot, identify_sender=False, *a, **k)¶
control_notifications_enabled(self)¶
cycle_mode(self, delta=1)¶
disconnect(self)¶
disconnect_disconnectable(self, slot)¶
enabled_has_listener(self, slot)¶
enabled_listener_count(self)¶
find_disconnectable(self, predicate)¶
get_mode(self, name)¶
get_mode_button(self, name)¶
get_mode_groups(self, name)¶
has_disconnectable(self, slot)¶
is_enabled(self, explicit=False)¶
notify_enabled(self, *a, **k)¶
notify_selected_mode(self, *a, **k)¶
on_enabled_changed(self)¶
pop_groups(self, groups)¶
pop_mode(self, mode)¶
pop_unselected_modes(self)¶
push_mode(self, mode)¶
register_disconnectable(self, slot)¶
register_disconnectables(self, disconnectables)¶
register_slot(self, *a, **k)¶
remove_enabled_listener(self, slot)¶
remove_selected_mode_listener(self, slot)¶
selected_mode_has_listener(self, slot)¶
selected_mode_listener_count(self)¶
set_enabled(self, enable)¶
unregister_disconnectable(self, slot)¶
update(self)¶
Attributes¶
_has_task_group=False- bool(x) -> bool_layer=Nonecanonical_parent=Nonecycle_mode_button=<ableton.v2.control_surface.control.button.ButtonControl object at 0x13c38d910>default_behaviour=<ableton.v2.control_surface.mode.LatchingBehaviour object at 0x13c38d9d0>is_private=False- bool(x) -> boolname=''- str(object='') -> str
class ImmediateBehaviour(ModeButtonBehaviour)¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
press_delayed(self, component, mode)¶
press_immediate(self, component, mode)¶
release_delayed(self, component, mode)¶
release_immediate(self, component, mode)¶
update_button(self, component, mode, selected_mode)¶
class LatchingBehaviour(ImmediateBehaviour)¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
press_delayed(self, component, mode)¶
press_immediate(self, component, mode)¶
release_delayed(self, component, mode)¶
release_immediate(self, component, mode)¶
update_button(self, component, mode, selected_mode)¶
class Layer(LayerBase)¶
Properties¶
ownerpriority
Methods¶
__init__(self, priority=None, **elements)¶
Initialize self. See help(type(self)) for accurate signature.
_get_control_client(self, client)¶
get_owner(self)¶
grab(self, client, *a, **k)¶
on_lost(self, client)¶
on_received(self, client, *a, **k)¶
release(self, client)¶
class LayerMode(LayerModeBase)¶
Methods¶
__init__(self, component=None, layer=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_get_component(self)¶
enter_mode(self)¶
leave_mode(self)¶
class LayerModeBase(Mode)¶
Methods¶
__init__(self, component=None, layer=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_get_component(self)¶
enter_mode(self)¶
leave_mode(self)¶
class LazyEnablingMode(Mode)¶
Methods¶
__init__(self, factory=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
enableable(self)¶
enter_mode(self)¶
leave_mode(self)¶
class Mode¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
enter_mode(self)¶
leave_mode(self)¶
class ModeButtonBehaviour¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
press_delayed(self, component, mode)¶
press_immediate(self, component, mode)¶
release_delayed(self, component, mode)¶
release_immediate(self, component, mode)¶
update_button(self, component, mode, selected_mode)¶
class ModeButtonControl(ButtonControlBase)¶
Properties¶
double_clickedpressedpressed_delayedreleasedreleased_delayedreleased_immediatelyvalue
Methods¶
State(modes_component=None, mode_name=None, mode_selected_color=None, mode_unselected_color=None, mode_group_active_color=None, *a, **k)¶
__init__(self, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_clear_state(self, manager)¶
_get_state(self, manager, state_factory=None)¶
_make_control_state(self, manager)¶
Attributes¶
DELAY_TIME=0.3- Convert a string or number to a floating point number, if possible.DOUBLE_CLICK_TIME=0.5- Convert a string or number to a floating point number, if possible.REPEAT_RATE=0.1- Convert a string or number to a floating point number, if possible._extra_args=[]- Built-in mutable sequence._extra_kws={}- dict() -> new empty dictionary
class ModesComponent(Component)¶
Properties¶
active_modesapplicationis_rootlayermodesparentselected_groupsselected_modesong
Methods¶
__init__(self, enable_skinning=False, support_momentary_mode_cycling=True, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_add_child(self, component)¶
_do_enter_mode(self, name)¶
_do_leave_mode(self, name)¶
_get_layer_iterable(self)¶
_get_mode_behaviour(self, name)¶
_grab_all_layers(self)¶
_internal_on_enabled_changed(self)¶
_release_all_layers(self)¶
_set_enabled_recursive(self, enable)¶
_tasks(self, parent_task_group=None)¶
_update_cycle_mode_button(self, selected)¶
_update_is_enabled(self)¶
_update_mode_buttons(self, selected)¶
add_children(self, *a)¶
add_control(self, name, control)¶
add_enabled_listener(self, slot, identify_sender=False, *a, **k)¶
add_mode(self, name, mode_or_component, cycle_mode_button_color=None, groups=set(), behaviour=None)¶
add_mode_button_control(self, mode_name, behaviour)¶
add_selected_mode_listener(self, slot, identify_sender=False, *a, **k)¶
control_notifications_enabled(self)¶
cycle_mode(self, delta=1)¶
disconnect(self)¶
disconnect_disconnectable(self, slot)¶
enabled_has_listener(self, slot)¶
enabled_listener_count(self)¶
find_disconnectable(self, predicate)¶
get_mode(self, name)¶
get_mode_button(self, name)¶
get_mode_groups(self, name)¶
has_disconnectable(self, slot)¶
is_enabled(self, explicit=False)¶
notify_enabled(self, *a, **k)¶
notify_selected_mode(self, *a, **k)¶
on_enabled_changed(self)¶
pop_groups(self, groups)¶
pop_mode(self, mode)¶
pop_unselected_modes(self)¶
push_mode(self, mode)¶
register_disconnectable(self, slot)¶
register_disconnectables(self, disconnectables)¶
register_slot(self, *a, **k)¶
remove_enabled_listener(self, slot)¶
remove_selected_mode_listener(self, slot)¶
selected_mode_has_listener(self, slot)¶
selected_mode_listener_count(self)¶
set_enabled(self, enable)¶
unregister_disconnectable(self, slot)¶
update(self)¶
Attributes¶
_has_task_group=False- bool(x) -> bool_layer=Nonecanonical_parent=Nonecycle_mode_button=<ableton.v2.control_surface.control.button.ButtonControl object at 0x13c38d910>default_behaviour=<ableton.v2.control_surface.mode.LatchingBehaviour object at 0x13c38d9d0>is_private=False- bool(x) -> boolname=''- str(object='') -> str
class MomentaryBehaviour(ImmediateBehaviour)¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
press_delayed(self, component, mode)¶
press_immediate(self, component, mode)¶
release_delayed(self, component, mode)¶
release_immediate(self, component, mode)¶
update_button(self, component, mode, selected_mode)¶
class NamedTuple¶
Methods¶
__init__(self, *others, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_eq_dict(self)¶
class NullModes¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
Attributes¶
selected_mode=None
class ReenterBehaviour(LatchingBehaviour)¶
Methods¶
__init__(self, on_reenter=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
on_reenter(self)¶
press_delayed(self, component, mode)¶
press_immediate(self, component, mode)¶
release_delayed(self, component, mode)¶
release_immediate(self, component, mode)¶
update_button(self, component, mode, selected_mode)¶
class SetAttributeMode(Mode)¶
Methods¶
__init__(self, obj=None, attribute=None, value=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_get_object(self)¶
enter_mode(self)¶
leave_mode(self)¶
class StackingResource(Resource)¶
Properties¶
clientsmax_priorityownerownersstack_size
Methods¶
__init__(self, on_received_callback=None, on_lost_callback=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
_actual_owners(self)¶
_add_client(self, client, priority)¶
_on_lost_set(self, clients)¶
_on_received_set(self, clients)¶
_remove_client(self, client)¶
get_owner(self)¶
grab(self, client, priority=None)¶
on_lost(self, client)¶
on_received(self, client)¶
release(self, client)¶
release_all(self)¶
release_stacked(self)¶
class control_color¶
Methods¶
__init__(self, default_color, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
class lazy_attribute¶
Methods¶
__call__(self)¶
Call self as a function.
__init__(self, func, name=None)¶
Initialize self. See help(type(self)) for accurate signature.
class listenable_property(listenable_property_base, property)¶
Property attribute.
fget function to be used for getting an attribute value fset function to be used for setting an attribute value fdel function to be used for del'ing an attribute doc docstring
Typical use is to define a managed attribute x:
class C(object): def getx(self): return self._x def setx(self, value): self._x = value def delx(self): del self._x x = property(getx, setx, delx, "I'm the 'x' property.")
Decorators make defining new properties or modifying existing ones easy:
class C(object): @property def x(self): "I am the 'x' property." return self._x @x.setter def x(self, value): self._x = value @x.deleter def x(self): del self._x
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
deleter(...)¶
Descriptor to obtain a copy of the property with a different deleter.
getter(...)¶
Descriptor to obtain a copy of the property with a different getter.
managed(default_value)¶
set_property_name(self, name)¶
setter(...)¶
Descriptor to obtain a copy of the property with a different setter.
Attributes¶
fdel=<member 'fdel' of 'property' objects>fget=<member 'fget' of 'property' objects>fset=<member 'fset' of 'property' objects>