AbletonComponent
- class pyableton.AbletonComponent.AbletonComponent(root: Element)
AbletonComponent Class
Base class for representing components in an Ableton Live project.
Methods
- __init__(root: ElementTree.Element)
Initializes an AbletonComponent instance.
- init_python_object_from_annotation(
root: ElementTree.Element, annotation_param_name: str, annotation_param_type: type ) Initializes a Python object from an annotation in the XML.
- snake_to_camel(input_string: str)
Converts a snake_case string to camelCase.
- candidate_tags(annotation_param_name: str)
Returns the XML tag names to try for a given annotation, in priority order.
The primary tag is the camelCase form of the annotation name; any entries in the class-level
_aliasesmapping are appended as fallbacks so a single code path can parse multiple Ableton Live schema versions.
- init_python_object_from_annotation(root: Element, annotation_param_name: str, annotation_param_type: type)
Initializes a Python object from an annotation in the XML.
Missing nodes resolve to
None(or[]for list-typed fields) instead of raising, so that a set authored in a different Ableton Live version (with renamed or absent tags) still parses. Only the fields that are actually present are populated; the rest stayNone.Parameters
- rootElementTree.Element
The root element of the XML representation of the Ableton component.
- annotation_param_namestr
The name of the annotation parameter.
- annotation_param_typetype
The type of the annotation parameter.
Returns
The initialized Python object.