sync standalone to host (ableton live) or vice versa

benniy's icon

hello,

i'm looking for a decent way of getting a high-resolution clock from
my host (ableton live) into a standalone max application.
the resolution of the clock should ideally be close to the ticks
of a [plugsync~] object (which unfortunately/obviously only works when it's within a M4L device.)

is there any way to do so?

alternatively, i'd also be happy with the vice versa scenario:decently syncing ableton live / host to the clock of a max standalone patch.

thanks guys & gals - i'd be gracious for any help.

LSka's icon

I would say Rewire, or Midi Beat Clock.

benniy's icon

thanks lska,

can you hint me on the rewire-thing? i somehow can't get it set up...
i'm using the hostsync~ object, but when i start the live transport nothing appears to be arriving in max.

thanks!

Andro's icon

Try the transport object (example) in M4L and send that straight to Max.

benniy's icon

thanks andro, but what do you mean with "send that straight to max"?
send the ticks? via udp? send/receive (which i think doesn't work from m4l to standalone).
sorry, don't get it (:

Florent Ghys's icon

check out the section about "using rewire in Max" in the Max Documentation
you won't be able to do both directions at the same time with rewire. Either Max = client and Live = mixer, or Max = mixer and Live = client.
maybe midi beat clock with sync~?

broc's icon

Rewire provides the most accurate sync and works well for me (Live=mixer, Max=client).
[hostsync~] basically outputs the same data in Max as [plugsync~] in M4L.

Just make sure that in Max audio is on and 'ad_rewire' selected as driver.

benniy's icon

thanks guys..
it somehow doesn't work :// as soon as i set the driver in max to 'ad_rewire',
audio gets disabled (the little powerbutton in max7 turns off). if i reenable it,
it turns off within seconds, again.

what is this? what am i doing wrong :?

benniy's icon

(see image. and clicking 'audio driver setup' doesn't do anything at all ~>)

Screen-Shot-2014-12-01-at-18.17.39.png
png
Florent Ghys's icon

if Max is running as a client then your audio output is in Live, there won't be any audio output directly from Max

benniy's icon

sorry, i still don't get it.

1) i create a patch with a hostsync~ object
2) i set up the dsp for "ad_rewire" in max (but: i can't turn on the audio button)
3) close my patch
4) start up live
5) reopen my patch in max (so live has definitely been started first)
6) recheck dsp settings (still can't turn on audio)
7) hostsync~ does nothing.

any clue?

Florent Ghys's icon

this is weird I am able to turn on the audio with ad_rewire (even though the audio output is in Live)

broc's icon

I think the client (Max) must be launched first to be recognised from the mixer (Live).

rewire.png
png
benniy's icon

grr.. no :/ not working either way. onoff-toggle keeps disabling itself.
any other ideas? anything i need to set up globally on my mac or
as for live?

thanks for all you help.

broc's icon

Make sure that Live and Max are both in 32-bit mode or both in 64-bit mode.

benniy's icon

:(
nope... tried 32 on both, tried 64 on both, tried starting live first, tried starting max first – nothing. audio-toggle flips off by itself.

Florent Ghys's icon

same thing here. hostsync~ doesn't receive anything, but hostcontrol~ totally works
using Live9 and Max7
isn't there a setting to tell Live that it's in Rewire?

broc's icon

For me both hostsync~ and hostcontrol~ are working (Live8 and Max7).

HOWEVER, with some more tests I've found strange behavior and got serious crashes.
So it's apparently not reliable.

benniy's icon

mh. thanks for the testing, broc.
so ... is back to the beginning – is there a decent way to sync? :) :(

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

As mentioned earlier you could also use MIDI clock.
Here is a patch for sending MIDI clock controlled from the Max global transport.

benniy's icon

thanks again, broc... summing it up:
we currently have no way for a (reliable) high-resolution sync from ableton live to an external max patch?

broc's icon

Yes, unfortunately.

benniy's icon

oh that's too bad :(
i've written cycling to inform them about the difficulties with rewire.
will report here, as soon as i've heard back.

one (stupid?) idea on the side, then i'll leave you alone :) ->
how reliable would it be to UDP a plugsync~ clock out of live (via m4l) and into an external patch? any experience with that?

Andrew Pask's icon

There are some improvements in rewire support coming in Max 7.01, which will be released very soon, please let us know when this comes out if things are better in rewire land

Cheers

benniy's icon

thanks andrew! will do! (:

broc's icon

Sending clock via UDP seems to make sense, but I believe that UDP output from M4L introduces some variable latency relative to Live's audio buffer size. This may lead to inaccurate timing, in particular for a high resolution clock. Anyway, just check it out!

Andro's icon

Hi Benzzzz. I just send the global bang to Udpsend 127.0.0.1 5001 and then in Max with udprecieve 5001 i let that bang activate the transport, you can send any data through from live though including bpm and then send that to the Max transport object.
The transport object should give you accurate tick information if im correct (not behind computer though ;-) )

benniy's icon

andro & broc – thanks for your help!
i've did a quick test as for simply sending the ticks from M4L via UDP to max. i'm aware about its latency,
but its working quite well (if not perfect, up till now).

anyhow: max 7.0.1 is released and i'll do some rewire testing this evening. have had loads (!) of bad experience with UPD'ing within M4L (ports randomly closing, not reconnecting, crashes, etc etc)