play clip exactly at measure X using javascript??

    Aug 14 2019 | 1:48 am
    Hello Max Ppl,
    I would like to automate an arrangement of a song in clip view, using M4L, based on a metronome.
    When a metronome is at position 0, for example, the starting clips should trigger. Drums and Effects. At position 9, other clips may trigger (bass, synth), the rest may continue looping. At 15, the drums cut off, everything else continues looping. In this way, I'd like to automate the sequence of an entire intro of a song, not using scenes, but automating the cutting in and out of clips. On a specific track I specify "arrangement" clip, where I include information about what clips should fire and at what measure:
    function arrangeIterator() { for (i = 0; i < arrangeIteration.length; i++) { if (arrangeIteration[i][2] == (metroCount)) { var liveSet = new LiveAPI('live_set tracks ' + arrangeIteration[i][0]*1 + ' clip_slots ' + arrangeIteration[i][1]*1 + ' clip');'fire'); } } }
    I am using javascript to call fire. However, everything is off. I can't fire a clip at position 0 that will fire the drums, bass, and synth as soon as it's triggered. Rather, what happens is that it'll use the launch behavior, fire the arrangement clip, and then fire the intended clips a measure later.
    I could fire a measure earlier, but that's not my intent. I'd like things to fire exactly at position 0, for example.
    I'm also finding unpredictable latency if I force clip quantization to 0.
    ---->> is there a way to force a clip to fire as soon as a measure hits without specifying 'quantization off', which causes latency issues?

    • Aug 15 2019 | 10:57 am
      Not possible. The Live API introduces latency (by design).
    • Aug 15 2019 | 2:18 pm
      Thank you Broc, I figured as much. My workaround was to place clips onto the arrangement using the API (thanks to your help for showing me the syntax).