Skip to content

ableton.v2.control_surface.elements.button (runtime)

Live 11 — Live Object Model & framework reference (descriptions and signatures).

Module constants

  • MIDI_CC_TYPE = 1

Functions

const(value)

has_event(obj, event_name)

in_range(value, lower_bound, upper_open_bound)

listens(event_path, *a, **k)

old_hasattr(obj, attr)

Classes

class BooleanContext

Properties

  • value

Methods

Manager(managed=None, update_value=None, *a, **k)
__call__(self, update_value=None)

Call self as a function.

__init__(self, default_value=None, *a, **k)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • default_value = False - bool(x) -> bool

class ButtonElement(InputControlElement, ButtonElementMixin)

Properties

  • _last_sent_value
  • is_feedback_enabled
  • mapping_sensitivity
  • resource
  • script_forwarding
  • send_depends_on_forwarding
  • suppress_script_forwarding

Methods

Colors()
ProxiedInterface(outer=None, *a, **k)
__init__(self, is_momentary, msg_type, channel, identifier, is_rgb=False, skin=<ableton.v2.control_surface.skin.Skin object at 0x16311f550>, undo_step_handler=<ableton.v2.control_surface.elements.button.DummyUndoStepHandler object at 0x16311f940>, send_should_depend_on_forwarding=False, *a, **k)

Initialize self. See help(type(self)) for accurate signature.

_disconnect_color_listener(self)
_do_draw(self, color)
_do_send_value(self, value, channel=None)
_mapping_feedback_values(self)
_on_resource_lost(self, client)
_on_resource_received(self, client, *a, **k)
_report_value(self, value, is_input)
_resource_type(on_received_callback=None, on_lost_callback=None, *a, **k)
_send_delayed_messages(self)
_set_skin_light(self, value)
_status_byte(self, channel)
_verify_value(self, value)
add_value_listener(self, slot, identify_sender=False, *a, **k)
begin_gesture(self)
clear_send_cache(self)
connect_to(self, parameter)
disconnect(self)
disconnect_disconnectable(self, slot)
end_gesture(self)
find_disconnectable(self, predicate)
force_next_send(self)
has_disconnectable(self, slot)
identifier_bytes(self)
install_connections(self, install_translation, install_mapping, install_forwarding)
is_momentary(self)
is_pressed(self)
mapped_parameter(self)
max_value(self)
message_channel(self)
message_identifier(self)
message_map_mode(self)
message_sysex_identifier(self)
message_type(self)
needs_takeover(self)
notify_ownership_change(self, client, grabbed, element_ownership_handler=None)
notify_value(self, *a, **k)
original_channel(self)
original_identifier(self)
receive_chunk(self, chunk)
receive_value(self, value)
register_disconnectable(self, slot)
register_disconnectables(self, disconnectables)
register_slot(self, *a, **k)
release_parameter(self)
remove_value_listener(self, slot)
reset(self)
reset_state(self)
script_wants_forwarding(self)
send_midi(self, message)
send_value(self, value, force=False, channel=None)
set_channel(self, channel)
set_feedback_delay(self, delay)
set_identifier(self, identifier)
set_light(self, value)
set_needs_takeover(self, needs_takeover)
set_report_values(self, report_input, report_output)
unregister_disconnectable(self, slot)
use_default_message(self)
value_has_listener(self, slot)
value_listener_count(self)

Attributes

  • _ButtonElement__on_midi_value_changed = None
  • _has_resource = False - bool(x) -> bool
  • _has_task_group = False - bool(x) -> bool
  • _input_signal_listener_count = 0 - int([x]) -> integer
  • _resource = <ableton.v2.base.util.lazy_attribute object at 0x11b312780>
  • _tasks = <ableton.v2.base.util.lazy_attribute object at 0x1630c8898>
  • allow_receiving_chunks = False - bool(x) -> bool
  • canonical_parent = None
  • name = '' - str(object='') -> str
  • num_delayed_messages = 2 - int([x]) -> integer
  • optimized_send_midi = True - bool(x) -> bool
  • proxied_interface = <ableton.v2.base.util.lazy_attribute object at 0x11df40710>

class ButtonElementMixin

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

set_light(self, value)

class Color

Methods

__init__(self, midi_value=None, *a, **k)

Initialize self. See help(type(self)) for accurate signature.

draw(self, interface)

Attributes

  • midi_value = 0 - int([x]) -> integer

class DummyUndoStepHandler

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

begin_undo_step(self)
end_undo_step(self)

class InputControlElement(NotifyingControlElement)

Properties

  • _last_sent_value
  • is_feedback_enabled
  • mapping_sensitivity
  • resource
  • script_forwarding
  • send_depends_on_forwarding
  • suppress_script_forwarding

Methods

ProxiedInterface(outer=None, *a, **k)
__init__(self, msg_type=None, channel=None, identifier=None, sysex_identifier=None, request_rebuild_midi_map=None, send_should_depend_on_forwarding=True, is_feedback_enabled=True, *a, **k)

Initialize self. See help(type(self)) for accurate signature.

_do_send_value(self, value, channel=None)
_mapping_feedback_values(self)
_on_resource_lost(self, client)
_on_resource_received(self, client, *a, **k)
_report_value(self, value, is_input)
_resource_type(on_received_callback=None, on_lost_callback=None, *a, **k)
_send_delayed_messages(self)
_status_byte(self, channel)
_verify_value(self, value)
add_value_listener(self, slot, identify_sender=False, *a, **k)
begin_gesture(self)
clear_send_cache(self)
connect_to(self, parameter)
disconnect(self)
disconnect_disconnectable(self, slot)
end_gesture(self)
find_disconnectable(self, predicate)
force_next_send(self)
has_disconnectable(self, slot)
identifier_bytes(self)
install_connections(self, install_translation, install_mapping, install_forwarding)
mapped_parameter(self)
max_value(self)
message_channel(self)
message_identifier(self)
message_map_mode(self)
message_sysex_identifier(self)
message_type(self)
needs_takeover(self)
notify_ownership_change(self, client, grabbed, element_ownership_handler=None)
notify_value(self, *a, **k)
original_channel(self)
original_identifier(self)
receive_chunk(self, chunk)
receive_value(self, value)
register_disconnectable(self, slot)
register_disconnectables(self, disconnectables)
register_slot(self, *a, **k)
release_parameter(self)
remove_value_listener(self, slot)
reset(self)
reset_state(self)
script_wants_forwarding(self)
send_midi(self, message)
send_value(self, value, force=False, channel=None)
set_channel(self, channel)
set_feedback_delay(self, delay)
set_identifier(self, identifier)
set_needs_takeover(self, needs_takeover)
set_report_values(self, report_input, report_output)
unregister_disconnectable(self, slot)
use_default_message(self)
value_has_listener(self, slot)
value_listener_count(self)

Attributes

  • _has_resource = False - bool(x) -> bool
  • _has_task_group = False - bool(x) -> bool
  • _input_signal_listener_count = 0 - int([x]) -> integer
  • _resource = <ableton.v2.base.util.lazy_attribute object at 0x11b312780>
  • _tasks = <ableton.v2.base.util.lazy_attribute object at 0x1630c8898>
  • allow_receiving_chunks = False - bool(x) -> bool
  • canonical_parent = None
  • name = '' - str(object='') -> str
  • num_delayed_messages = 1 - int([x]) -> integer
  • optimized_send_midi = True - bool(x) -> bool
  • proxied_interface = <ableton.v2.base.util.lazy_attribute object at 0x11df40710>

class Skin(EventObject)

Methods

__init__(self, colors=None, song=None, *a, **k)

Initialize self. See help(type(self)) for accurate signature.

_create_dynamic_color(self, color_factory, song)
_fill_colors(self, colors, pathname='', song=None)
_get_dynamic_color(self, color_factory, song)
disconnect(self)
disconnect_disconnectable(self, slot)
find_disconnectable(self, predicate)
has_disconnectable(self, slot)
items(self)
register_disconnectable(self, slot)
register_disconnectables(self, disconnectables)
register_slot(self, *a, **k)
unregister_disconnectable(self, slot)

class long

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

bit_length(self, /)

Number of bits necessary to represent self in binary.

bin(37) '0b100101' (37).bit_length() 6

conjugate(...)

Returns self, the complex conjugate of any int.

from_bytes(bytes, byteorder, *, signed=False)

Return the integer represented by the given array of bytes.

bytes Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol. byteorder The byte order used to represent the integer. If byteorder is 'big', the most significant byte is at the beginning of the byte array. If byteorder is 'little', the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder' as the byte order value. signed Indicates whether two's complement is used to represent the integer.

to_bytes(self, /, length, byteorder, *, signed=False)

Return an array of bytes representing an integer.

length Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. byteorder The byte order used to represent the integer. If byteorder is 'big', the most significant byte is at the beginning of the byte array. If byteorder is 'little', the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder' as the byte order value. signed Determines whether two's complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

Attributes

  • denominator = <attribute 'denominator' of 'int' objects> - the denominator of a rational number in lowest terms
  • imag = <attribute 'imag' of 'int' objects> - the imaginary part of a complex number
  • numerator = <attribute 'numerator' of 'int' objects> - the numerator of a rational number in lowest terms
  • real = <attribute 'real' of 'int' objects> - the real part of a complex number