M4L start recording on first MIDI note played

brunal2496's icon

Hi all,

I'm working on a M4L interface to be able to control Ableton Live with a dualo du-touch (https://dualo.org).
I want to be able to start recording a MIDI clip only when I hit the first MIDI note of my loop, while the others clips are running.
I have managed to do almost everything, but I have a problem: when I hit the first note, it starts recording but I always have the first beats of my loop cut . Foe example, if I play a 1 bar loop (fire function called with a 1 bar argument in javascript Live API), I have a one bar loop, but which starts let say 2 beat after I hit my MIDI key.
Do you have any idea of something that I should take care of ?
I've found this M4L device which seems to have solve the problem, but I can't see how it works: https://cycling74.com/tools/loopo/#.WNPmuBLhCV4

Many thanks.