is there anyway to use m4l or remote script to move certain track into a group?

Xiaofei Zheng's icon

Hey folks, I’m trying to build a small workflow tool for Live 12.

The idea is simple: I want to press a shortcut and move the currently selected track into a predefined Group Track, for example Cmd+Shift+1 sends the selected track into GuitarBuss. If the group does not exist, ideally it would create it too.

So far I tried a custom MIDI Remote Script:

  • The shortcut works and the Remote Script receives the MIDI note correctly.

  • I can get song.view.selected_track.

  • I can find the target group track by name in song.tracks.

  • I can read track.group_track, track.is_grouped, and track.is_foldable.

  • Existing child tracks correctly report group_track == GuitarBuss.

  • But trying to set track.group_track = target_group fails because group_track seems to be read-only.

  • I also could not find song.move_track or song.group_tracks in the exposed Python API.

  • I tried routing-related properties like output_routing_type, but that only changes audio routing and does not make the track visually/group-structurally part of the Group Track.

I also looked briefly at the M4L LOM side, and it seems to expose the same kind of properties: group_track, is_grouped, is_foldable, etc., but I didn’t find a callable method to actually move/re-parent a track into a group.

So my question is:
Is there any supported or semi-hidden way, from Max for Live or MIDI Remote Scripts, to move an existing track into an existing Group Track?

Any pointers would be super appreciated.