Send Receive between patches - timing issues

Learn about building and using Max for Live devices.
Post Reply
123Thomas
Posts: 6
Joined: Fri Jun 10, 2011 10:11 pm

Send Receive between patches - timing issues

Post by 123Thomas » Fri Jun 10, 2011 10:22 pm

My question

I am sending a batch of messages (about 20) at a time from a main patch into Ableton to control the behaviour of tracks (launching clips or devices). This all seems to work fine when using a mouse click as a trigger, but not when triggered by a bang from metro or :!: via osc from my Lemur.

I have seen comments which suggest that Send and Receive between devices, and between Max and Live is subject to some kind of randomisation of timing, and even of message order :!: !!! can this be true! Surely send and receive from max to a Maxforlive Device should work in the same way as between one max patch and another. Send and Receive are fundamental for the architecture of any system I have made.

An apparent cure for the problem seemed to be to switch 'Overdrive' off in the Max scheduler options. Is this the official answer, or do further problems await down the line.

I would be very very grateful if someone could point me in the right direction, or to posts which deal with this kind of problem (and its solution).

Best wishes
Thomas

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Send Receive between patches - timing issues

Post by broc » Sat Jun 11, 2011 12:03 am

There is an official answer on the reference page:
Note: Communication between Max for Live devices using send and receive is supported, but there may be some latency involved when sending data between devices.
In my experience, latency depends on the audio buffer size of Live, eg. ~12 ms at 512 samples.
I'm not aware of specific problems with message order.

Re Overdrive: I think in M4L it's is on by default and can't be switched off.

123Thomas
Posts: 6
Joined: Fri Jun 10, 2011 10:11 pm

Re: Send Receive between patches - timing issues

Post by 123Thomas » Sat Jun 11, 2011 12:49 am

Dear Broc

Thanks very much for your comments - most appreciated.
However, its not latency in itself that is the problem - I think there is another kind of problem, in that if the messages are triggered by a metro object (however slow) then the various liveAPI functions occur in a confused order, whilst if they are triggered by a click (however fast) they are all in the correct order.

Why should there be this difference?

I have re-written the patches so that they are all in the same device. This seemed to be the idea behind an earlier post about Send Receive coming from an IRCAM post. Since all send receives are now in the same Ableton device (or subpatch of it) I thought that should sort things, but it hasnt. Same difference exists.
Will keep trying

Best
Thomas

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Send Receive between patches - timing issues

Post by broc » Sat Jun 11, 2011 1:04 am

123Thomas wrote:However, its not latency in itself that is the problem - I think there is another kind of problem, in that if the messages are triggered by a metro object (however slow) then the various liveAPI functions occur in a confused order, whilst if they are triggered by a click (however fast) they are all in the correct order.
The problem seems related to event priorities. It can usually be cured with [deferlow] or something similar.

See this article for detailed explanations.

http://cycling74.com/2004/09/09/event-p ... -vs-queue/

pid
Posts: 354
Joined: Thu Nov 05, 2009 9:51 am

Re: Send Receive between patches - timing issues

Post by pid » Sat Jun 11, 2011 9:31 am

123Thomas wrote: I have re-written the patches so that they are all in the same device. This seemed to be the idea behind an earlier post about Send Receive coming from an IRCAM post. Since all send receives are now in the same Ableton device (or subpatch of it) I thought that should sort things, but it hasnt. Same difference exists.
... are you SURE you are using the unique m4l device identifiers on your send/receive pairs here? "---". if not, same issue will be happening sure.

other than that, i second everything broc said about deferlow etc.
3dot... wrote: in short.. we live in disappointing times..

123Thomas
Posts: 6
Joined: Fri Jun 10, 2011 10:11 pm

Re: Send Receive between patches - timing issues

Post by 123Thomas » Sat Jun 11, 2011 8:59 pm

This is incredibly helpful - many thanks for your comments.
I now pin my hopes on deferlow and will investigate the document you suggested thoroughly.

I shall report on the results should anything conclusive emerge,

My emerging thought is that it would be great if Ableton had a channel (such as the Master channel) which allowed a more seamless communication with the wider Max environment, allowing shared Multichannel audio as well as more closely integrated sends and receives.

Many thanks
Thomas

123Thomas
Posts: 6
Joined: Fri Jun 10, 2011 10:11 pm

Re: Send Receive between patches - timing issues

Post by 123Thomas » Mon Jun 13, 2011 10:24 pm

Dear Broc and Pid

Wonderful, thank you so much for the deferlow suggestion - it has cured everything.
I would never have thought of it.
I am full of gratitude respect and admiration.

Best wishes
Thomas

PS the project it has helped with is documented here http://www.automaticwritingcircle.co.uk/

Post Reply