Await jump and loop

Describe your issue here:

in a script I want to indicate to wait for the song to jump to the indicated section and then enable loop…

I have it scripted like:

     await waitForOscChange sendOsc("/setlist/jumpToSection", foundRaw);
sendOsc("/loop/enable");
      // other alternatives i have tried...
//alternative: sendOsc("/setlist/jumpToSection", foundIndex);
  //sendOsc("/setlist/jumpToSection", foundIndex);
  //sendOsc("//awaitJump","/loop/enable");
  

right now it just set the section to jump but inmediatly enables the loop… if i remove the looping promp then the song set the section to jump and then jump but nothing else…(obviously)

Hey @Gerson_Benjamin_Sobe,

To await a change in an OSC value, you can use the following script:

// Send the jump command
sendOsc("/setlist/jumpToSection", foundIndex);
// Wait for the active section to change
// You could also use "/setlist/activeSectionStart" instead
await waitForOscChange("/setlist/activeSectionIndex");
// Enable the loop
sendOsc("/loop/enable");

Let me know if this works for you :slight_smile:

Thank you! this worked fine!