Page 1 of 1

Latency of API calls

Posted: Fri May 21, 2021 9:40 am
by chapelier fou
I'm hitting a brick wall realizing how big and unpredictable API calls via M4L are.
Can we hope (massive) improvements in the future ?
Meanwhile, is this latency documented somewhere ?
Thanks.

Re: Latency of API calls

Posted: Fri May 21, 2021 2:17 pm
by [jur]
Could it be related to some specific objects you use to move the data? Like (udp)send/receive?
Events in Max are limited to one buffer size, can you use signals instead?
What kind of API calls are you doing in instance?

Re: Latency of API calls

Posted: Fri May 21, 2021 2:39 pm
by chapelier fou
I made a simple test :
a device that listens for a midi note. If it receives a note, it just fires a clip (no launch quant) that contains one note at the very beginning.
Then I placed a few notes in the triggering clip, recorded the result of the "called" clip in a third track and compared the two clips.
So, in my experience, firing a clip has a random latency, from like 5ms to 100ms.

Re: Latency of API calls

Posted: Fri May 21, 2021 3:07 pm
by [jur]
I see. Unfortunately it's not possible to get sample accurate here.
I myself spent a lot of time and questions around, years ago, to do something like what you're describing and the hard reality is that it's not possible to do this accurately... and as you've noticed, you don't just get inaccuracy but randomness too!
I convinced myself that this should be seen and accepted just like "the beauty of analog imperfection" right there in our digital world :lol:

Another report to support@ableton.com wouldn't hurt, though :wink:
If it can't be sample accurate, at least the latency should be fixed and predictable.

Re: Latency of API calls

Posted: Sat May 22, 2021 12:41 pm
by chapelier fou
[jur] wrote:
Fri May 21, 2021 3:07 pm

I convinced myself that this should be seen and accepted just like "the beauty of analog imperfection" right there in our digital world :lol:
Except that clocking in the analog domain is the tightest thing in the world.

Re: Latency of API calls

Posted: Sat May 22, 2021 2:10 pm
by [jur]
You're right! :wink:
That doesn't solve our problem, though...