Idea: "selected" Tracks To New Group

Hi, so here is the problem:

You have 100 tracks (these are just completely useless examples, but to illustrate a point).
You wish to move 80 of those tracks to a group. (the track has no groups).
You go and, by hand, rename all 80 tracks to name “H”
you run a script which detects tracks[x].name==“H” and moves said track to group, and continues until each track is in the one group.

bonus idea:
move all tracks in song to a group.

possible? yes. doable? maybe. did i try to do it? yep, but kept encountering crashes and groups-within-groups-within-groups, gui glitches and mess.

but one of you knows how to use these:

renoise.song():insert_group_at(int index)
renoise.song():add_track_to_group(int track_index, int group_index)
renoise.song():swap_tracks_at(index1, index2)

cos i sure as hell don’t. i could show a bit of code, which will crash a song, if the song has 5 tracks which all have notes, and you run the script, but that’s useless! (fixed for B4, apparently)

either way, since we don’t get these things natively ( :panic: ), one has to muck around and hope that this can be run within a scrip.

I’m coding “group selected tracks” right now actually. The selection is being made in the pattern matrix though.

well, as long as it works. godspeed!

Np. The “difficult” part is to filter some things when it is supposed to group a group.

Exactly how I was going to suggest would be a more suitable way. Easy to make quick selections across many patterns and you can even miss tracks and have broken selections quite easily.

You are correct, I think. It should also be intelligent, grouping the selected tracks to the “closest common parent”. That’s what I’m working on right now…

Far left, far right, where you right-click - three obvious alternatives (not sure if you can do the click position with the API.P

You might have to be careful with signal followers, as they can only control tracks to the right of them. If they are controlling another track and you create a group and either move the signal follower to the right of, or the track being controlled by a signal follower in a track not going into the group to the left of the paired track then you are going to break its functionality.

Where can I find this tool?

woo!

Here you go slowpokes ;D