I want to have a button that always jumps back to the beginning of the actual song. If I am right in the middle - go back to start. if I am already at start - do nothing.
However, I struggled to puzzle that from the OSC manual.
/setlist/jumpBySongs [steps] jumps by given number of songs
-
/setlist/jumpBySongs 1 jumps to the next song, /setlist/jumpBySongs -1 jumps to the previous one or to the beginning of the current song when the playhead isn’t at the start of the song
-
Adding a force=true parameter when jumping back a song (e.g./setlist/jumpBySongs -1 force=true) ignores the playhead’s current position inside the song and always jumps to the previous song
Hey @Sebastian,
This should give you exactly the behavior you’re looking for.
You can paste this either in a MIDI Mapping (script) or in a Canvas Button (script):
const start = osc("/setlist/activeSongStart"); // beats
const pos = osc("/global/beatsPosition"); // beats (floored while playing)
// pequeño umbral para evitar jitter/redondeos
const eps = 0.5;
if (pos > start + eps) {
sendOsc("/setlist/jumpToTime", start);
}
Hope that helps!
1 Like
Since this is a pretty common use case, I’ve made a change that will be released in the next beta. To jump to the beginning of the current song, you’ll be able to use /setlist/jumpBySongs 0 force=true.
2 Likes
Excellent! Happy to see that implemented as a standard! 