Skip to content

Live.DeviceParameter (runtime)

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

Classes

class AutomationState(enum)

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.

as_integer_ratio(self, /)

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

(10).as_integer_ratio() (10, 1) (-10).as_integer_ratio() (-10, 1) (0).as_integer_ratio() (0, 1)

bit_count(self, /)

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

bin(13) '0b1101' (13).bit_count() 3

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='big', *, 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. Default is to use 'big'. signed Indicates whether two's complement is used to represent the integer.

to_bytes(self, /, length=1, byteorder='big', *, 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. Default is length 1. 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. Default is to use 'big'. 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
  • name = <member 'name' of 'Boost.Python.enum' objects>
  • names = {'none': DeviceParameter.AutomationState.none, 'playing': DeviceParameter.AutomationState.playing, 'overridden': DeviceParameter.AutomationState.overridden} - dict() -> new empty dictionary
  • none = DeviceParameter.AutomationState.none
  • numerator = <attribute 'numerator' of 'int' objects> - the numerator of a rational number in lowest terms
  • overridden = DeviceParameter.AutomationState.overridden
  • playing = DeviceParameter.AutomationState.playing
  • real = <attribute 'real' of 'int' objects> - the real part of a complex number
  • values = {0: DeviceParameter.AutomationState.none, 1: DeviceParameter.AutomationState.playing, 2: DeviceParameter.AutomationState.overridden} - dict() -> new empty dictionary

class DeviceParameter(LomObject)

This class represents a (automatable) parameter within a MIDI or Audio DSP-Device.

Properties

  • _live_ptr
  • automation_state - Returns state of type AutomationState.
  • canonical_parent - Get the canonical parent of the device parameter.
  • default_value - Return the default value for this parameter. A Default value is only
  • display_value - Get/Set the current value (as visible in the GUI) this parameter.
  • is_enabled - Returns false if the parameter has been macro mapped or disabled by Max.
  • is_quantized - Returns True, if this value is a boolean or integer like switch.
  • max - Returns const access to the upper value of the allowed range for
  • min - Returns const access to the lower value of the allowed range for
  • name - Returns const access the name of this parameter, as visible in Lives
  • original_name - Returns const access the original name of this parameter, unaffected of
  • short_value_items - Return the list of possible values for this parameter. Like value_items, but prefers short value names if available. Raises an error if 'is_quantized' is False.
  • state - Returns the state of the parameter:
  • value - Get/Set the current internal value of this parameter.
  • value_items - Return the list of possible values for this parameter. Raises an error if 'is_quantized' is False.

Methods

__init__(...)

Raises an exception This class cannot be instantiated from Python

add_automation_state_listener(...)

add_automation_state_listener( (DeviceParameter)arg1, (object)arg2) -> None : Add a listener function or method, which will be called as soon as the property "automation_state" has changed.

C++ signature :
    void add_automation_state_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
add_display_value_listener(...)

add_display_value_listener( (DeviceParameter)arg1, (object)arg2) -> None : Add a listener function or method, which will be called as soon as the property "display_value" has changed.

C++ signature :
    void add_display_value_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
add_name_listener(...)

add_name_listener( (DeviceParameter)arg1, (object)arg2) -> None : Add a listener function or method, which will be called as soon as the property "name" has changed.

C++ signature :
    void add_name_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
add_state_listener(...)

add_state_listener( (DeviceParameter)arg1, (object)arg2) -> None : Add a listener function or method, which will be called as soon as the property "state" has changed.

C++ signature :
    void add_state_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
add_value_listener(...)

add_value_listener( (DeviceParameter)arg1, (object)arg2) -> None : Add a listener function or method, which will be called as soon as the property "value" has changed.

C++ signature :
    void add_value_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
automation_state_has_listener(...)

automation_state_has_listener( (DeviceParameter)arg1, (object)arg2) -> bool : Returns true, if the given listener function or method is connected to the property "automation_state".

C++ signature :
    bool automation_state_has_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
begin_gesture(...)

begin_gesture( (DeviceParameter)arg1) -> None : Notify the begin of a modification of the parameter, when a sequence of modifications have to be consider a consistent group -- for Sexample, when recording automation.

C++ signature :
    void begin_gesture(TPyHandle<ATimeableValue>)
display_value_has_listener(...)

display_value_has_listener( (DeviceParameter)arg1, (object)arg2) -> bool : Returns true, if the given listener function or method is connected to the property "display_value".

C++ signature :
    bool display_value_has_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
end_gesture(...)

end_gesture( (DeviceParameter)arg1) -> None : Notify the end of a modification of the parameter. See begin_gesture.

C++ signature :
    void end_gesture(TPyHandle<ATimeableValue>)
name_has_listener(...)

name_has_listener( (DeviceParameter)arg1, (object)arg2) -> bool : Returns true, if the given listener function or method is connected to the property "name".

C++ signature :
    bool name_has_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
re_enable_automation(...)

re_enable_automation( (DeviceParameter)arg1) -> None : Reenable automation for this parameter.

C++ signature :
    void re_enable_automation(TPyHandle<ATimeableValue>)
remove_automation_state_listener(...)

remove_automation_state_listener( (DeviceParameter)arg1, (object)arg2) -> None : Remove a previously set listener function or method from property "automation_state".

C++ signature :
    void remove_automation_state_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
remove_display_value_listener(...)

remove_display_value_listener( (DeviceParameter)arg1, (object)arg2) -> None : Remove a previously set listener function or method from property "display_value".

C++ signature :
    void remove_display_value_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
remove_name_listener(...)

remove_name_listener( (DeviceParameter)arg1, (object)arg2) -> None : Remove a previously set listener function or method from property "name".

C++ signature :
    void remove_name_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
remove_state_listener(...)

remove_state_listener( (DeviceParameter)arg1, (object)arg2) -> None : Remove a previously set listener function or method from property "state".

C++ signature :
    void remove_state_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
remove_value_listener(...)

remove_value_listener( (DeviceParameter)arg1, (object)arg2) -> None : Remove a previously set listener function or method from property "value".

C++ signature :
    void remove_value_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
state_has_listener(...)

state_has_listener( (DeviceParameter)arg1, (object)arg2) -> bool : Returns true, if the given listener function or method is connected to the property "state".

C++ signature :
    bool state_has_listener(TPyHandle<ATimeableValue>,boost::python::api::object)
str_for_value(...)

str_for_value( (DeviceParameter)arg1, (float)arg2) -> str : Return a string representation of the given value. To be used for display purposes only. This value can include characters like 'db' or 'hz', depending on the type of the parameter.

C++ signature :
    TString str_for_value(TPyHandle<ATimeableValue>,float)
value_has_listener(...)

value_has_listener( (DeviceParameter)arg1, (object)arg2) -> bool : Returns true, if the given listener function or method is connected to the property "value".

C++ signature :
    bool value_has_listener(TPyHandle<ATimeableValue>,boost::python::api::object)

class ParameterState(enum)

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.

as_integer_ratio(self, /)

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

(10).as_integer_ratio() (10, 1) (-10).as_integer_ratio() (-10, 1) (0).as_integer_ratio() (0, 1)

bit_count(self, /)

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

bin(13) '0b1101' (13).bit_count() 3

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='big', *, 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. Default is to use 'big'. signed Indicates whether two's complement is used to represent the integer.

to_bytes(self, /, length=1, byteorder='big', *, 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. Default is length 1. 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. Default is to use 'big'. 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
  • disabled = DeviceParameter.ParameterState.disabled
  • enabled = DeviceParameter.ParameterState.enabled
  • imag = <attribute 'imag' of 'int' objects> - the imaginary part of a complex number
  • irrelevant = DeviceParameter.ParameterState.irrelevant
  • name = <member 'name' of 'Boost.Python.enum' objects>
  • names = {'enabled': DeviceParameter.ParameterState.enabled, 'irrelevant': DeviceParameter.ParameterState.irrelevant, 'disabled': DeviceParameter.ParameterState.disabled... - dict() -> new empty dictionary
  • 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
  • values = {0: DeviceParameter.ParameterState.enabled, 1: DeviceParameter.ParameterState.irrelevant, 2: DeviceParameter.ParameterState.disabled} - dict() -> new empty dictionary