Idea possible? --> Jump to prev/next Group Track

(tL One) #1

Hey gang.

I work with a lot of groups (like a lot of you probably do as well)
and usually, I need to jump often to the groups (Ignoring the tracks in between,
which are often collapsed anyway at that stage)

So the idea is to have commands that jump just to the group-tracks.
(something like “jump to prev/next group track”)

Should be simple? Not sure. I have just recently started to look at LUA and this is still quite over my head.

Any ideas on this?


(joule) #2

Yes, here is a function that should cycle to next group. Maybe you can wrap your head around it and make the slightly trickier jump_to_prev_group() ?

(Also, I’m not sure if you want to tweak it to jump to the next group even when the selected track is part of a group.)

function jump_to_next_group()

  local song =
  local tracks_count = song.sequencer_track_count

  -- iterate thru all non-send/master tracks
  for i = 1, tracks_count - 1 do
    local start_track
    -- if send/master track is selected, start searching from first track
    if song.selected_track_index > tracks_count then
      start_track = 1
      start_track = song.selected_track_index
    -- define what track index to check. modulo is used to make it cycle
    -- and behave like the normal next/prev shortcuts around boundaries.
    -- -1/+1 operation is needed since renoise indices start at 1, while
    -- modulo cycles via 0.
    local track_index = ((start_track + i - 1) % tracks_count) + 1
    -- goto track if it's a group track
    if (song:track(track_index).type == renoise.Track.TRACK_TYPE_GROUP) then
      song.selected_track_index = track_index
      return -- stop iteration by exiting function

(tL One) #3

Aah, thanks a lot man.

I’ll see what I can do with this.
Looks actually now already pretty clear to me.

Good point, probably not… I think I need to test both behaviors.
(The most logical behavior in that case probably would be that the group of the current selected
track gets selected?)

(joule) #4

I agree. That’s intuitive to how things usually work.


Along a similar line to this thread, I tried to write a couple of keybindings that skip over prev/next collapsed tracks/groups.
com.4tey.SkipCollapse.xrnx (1.1 KB)