Skip to content

Tracks Module: Dictionary Registry + Most Methods and Properties#186

Open
PhotonicVelocity wants to merge 17 commits intoideoforms:masterfrom
PhotonicVelocity:feat/tracks_refactor
Open

Tracks Module: Dictionary Registry + Most Methods and Properties#186
PhotonicVelocity wants to merge 17 commits intoideoforms:masterfrom
PhotonicVelocity:feat/tracks_refactor

Conversation

@PhotonicVelocity
Copy link
Copy Markdown

Track Module Updates

Summary

Builds on the dictionary-based refactor from PR-182 (this PR should be reviewed/compared against PR-182 as the base). It expands the Track module surface area (track + mixer + routing + view), and updates tests for the new endpoints. This PR implements and supersedes the work previously proposed in PR-172 and PR-168.

Key Changes

  • Converted track.py to the dict-based registry (same pattern as PR-182) so method/property behavior is explicit per endpoint.
  • Expanded Track endpoints: create audio/midi clips, delete clip/arrangement clip, duplicate to arrangement, and verb-style aliases (back-compat retained).
  • Added routing surface: available/current input/output routing names plus routing and sub‑routing lists with get/set support.
  • Expanded mixer surface via mixer_device (params + props): track_activator, crossfade_assign, panning_mode, left_split_stereo, right_split_stereo (keeps existing volume, panning, send).
  • Added TrackViewHandler with get/set for device_insert_mode and is_collapsed.
  • Removed invalid listeners on track properties that do not support listen in the Live API.

Endpoints Added / Updated

Methods

  • New Methods: create/audio_clip, create/midi_clip, delete/arrangement_clip, delete/clip, delete/device, duplicate/clip_to_arrangement, duplicate/clip_slot, stop/all_clips, jump_in_running_session_clip
  • Kept for Back-compat: delete_clip, delete_device, stop_all_clips, duplicate_clip_to_arrangement

Properties

  • Track: back_to_arranger, can_be_frozen, can_show_chains, implicit_arm, input_meter_left, input_meter_level, input_meter_right, is_frozen, is_part_of_selection, is_showing_chains, muted_via_solo, performance_impact
  • Routing: current_input_routing, current_input_sub_routing, current_output_routing, current_output_sub_routing, input_routings, input_sub_routings, output_routings, output_sub_routings
  • Track View: device_insert_mode, is_collapsed
  • Mixer: crossfade_assign, left_split_stereo, right_split_stereo, panning_mode, track_activator
  • Removed Invalid Listeners: can_be_armed, fold_state, is_foldable, is_grouped, is_visible

Tests

Updated tests/test_track.py to cover:

  • Track get/set properties and mixer params (parameterized).
  • Routing list and current routing endpoints.
  • Duplicate clip slot.
  • Jump in running session clip.
  • Track view properties (get device_insert_mode, toggle is_collapsed).
  • Clip list properties for MIDI + audio clips.
  • Arrangement clip create/delete + duplicate to arrangement.

Notes / Known Exclusions

  • Track view listeners are not enabled (get/set only for view props).
  • select_instrument is not implemented yet.
  • get_data / set_data remain out of scope for now.

Checklist

  • The title is descriptive and summarises the new changes
  • The code and any comments are consistent with the current code style
  • For any new or modified API endpoints, I have added appropriate documentation to README.md
  • For any new or modified API endpoints, I have added unit tests covering the new functionality
  • I have verified that all unit tests pass (see CONTRIBUTING.md for guidance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants