Question about queuedIndex, activeSectionIndex and jumpToSection()

Describe your issue here:

Hi, I’m working on a custom jump button using the scripting API, and I have a question about how these indices are intended to work.

From my tests, I observed the following:

When I queue a section:

queuedIndex = (0, 6)
activeSectionIndex = 3

After the jump occurs:

queuedIndex = (-1, -1)
activeSectionIndex = 6

Based on that, I assumed that the second value returned by queuedIndex corresponds to the value later reported by activeSectionIndex.

To test that assumption, I tried sending:

sendOsc(“/setlist/jumpToSection”, 6);

However, instead of jumping to the section whose activeSectionIndex is 6, AbleSet consistently jumps to the previous section.

Am I misunderstanding what these values represent?

  • Is the second value of queuedIndex expected to correspond to activeSectionIndex?

  • Is activeSectionIndex intended to be used with jumpToSection()?

  • If not, what is the correct index or identifier that jumpToSection() expects?

I feel like I’m missing a piece of how these indices relate to each other.

Thanks!

Please fill out these values to make it easier to troubleshoot:

  • Version of AbleSet: 3.0.11
  • Version of Ableton Live: 12

Hey @danielguti,

That’s a good point!

The indexes in OSC values are 0-based, so the first section is 0, the 2nd is 1, etc.

However, the jumpToSection command was introduced in an earlier version and used a 1-based index which at the time I thought would be easier to understand but now makes it more confusing when used in combination with the newer OSC values.

I can’t change this behavior without breaking existing setups, but to convert from the OSC value to the command value, you can just add 1. For example, if queuedIndex is 5, send /setlist/jumpToSection 6 to jump to that section.

I hope this helps! :slight_smile:

Hi @leolabs,

Thanks! That explains it. Adding +1 to the value solved it perfectly. I appreciate the clarification!