How to sync Live (via rewire~) to an external midi clock?

Feb 22, 2006 at 6:08pm

How to sync Live (via rewire~) to an external midi clock?

I use Ableton Live inside max (rewire) ; With rewire~, I can send tempo /
start / stop messages to Live, but I need to sync it to an external midi
clock (coming from an external device -> rtin)
Is there a way to send to Live the midi clock sync directly with the midi
message?
(rtin -> prepend midi -> rewire~ = “error: rewire~: midi: argument error”)
What would be the right midi message?
If it’s not possible this way, do I have to convert the midi clock sync to
tempo / position messages to rewire~? How…

When Live is a rewire slave, it’s midi inputs are disabled, so I can’t send
it midi messages directly…

I of course searched in the mail archive, lot of things about syncing max to
live with rewire, but not in this way…

(I have to do it in windows, so don’t tell me to use jack or soundflower !)

Thanks in advance

Mathieu Chamagne
http://www.maxobjects.com

#24868
Mar 1, 2006 at 11:24am

As I had no reply to my first post last week… I ask again!

I need to use Ableton Live inside max (rewire~) and I want to sync it to an
external MIDI clock.
Here is my problem :
With rewire~, I can send Start/stop/tempo/position messages to Live, but I
can’t see how to sync it to a Midi clock. I tried to send the midi clock
with the “midi” message to rewire~, but it doesn’t seems to work (or I don’t
know how to format this message correctly…).

Any help is welcome…

Mathieu Chamagne
http://www.maxobjects.com

#72502
Mar 10, 2006 at 4:30pm

I already ask this 2 times… and no replies.
Does it mean that it’s a really stupid question, or does really nobody can answer ?

Ok, I try a third (& last) time :

I need to use Ableton Live inside max (rewire~) and I want to sync it to an
external MIDI clock.
Here is my problem :
With rewire~, I can send Start/stop/tempo/position messages to Live, but I
can’t see how to sync it to an external Midi clock. I tried to send the midi clock with the “midi” message to rewire~, but it doesn’t seems to work (or I don’t know how to format this message correctly…).

Any help is welcome…

Mathieu Chamagne
http://www.maxobjects.com

#72503
Mar 10, 2006 at 5:47pm

Hey Mathieu,

here are some ideas: I’d use rtin -> sync~ and see if the (float) bpm
info from sync~’s middle outlet is accurate enough for syncing (strip
the bpm and send to rewire~ with ‘tempo $1′). You should get the
start/stop messages with ‘sel 250 252′ directly from rtin. If this
doesn’t work you could try detecting the beginning of a bar from the
signal outlet of sync~ with >~ and edge~ (or by counting midi ticks),
and send a position message to rewire~. You would need to calculate how
many samples are in a bar at the current bpm and count how many bars
have already played. Haven’t tried any of this … Good luck, g.

#72504
Mar 10, 2006 at 6:12pm

Thanks for your reply, Georg.
I already tried the sync~ -> bpm -> tempo -> rewire~ solution, but it’s not
accurate enough. (I want to be able to follow fast tempo changes and start /
stop messages… sync~ doesn’t react very well and sometime takes a couple
of beats to output the right tempo after a change).
In fact, I need to know if it’s possible or not to send a midi message to
rewire~ containing a midi clock. If it’s not possible that way, I will have
to deal with tempo / position messages…
I just hoped that could be easier. Midi clock is a simple and robust sync ;
It would be too bad to not be able to use it directly with rewire~.

Thanks

Mathieu

#72505
Mar 10, 2006 at 8:42pm

Dear Mathieu, please explain me if you have some particular reason to use Live inside Max ,..i work with my max patches “inside” Live, receiving reliable and solid timing from it using hostsync~ and ad_rewire driver..and then sync Live to any external device via midi..

#72506
Mar 10, 2006 at 9:06pm

Because with max “inside Live” (ad_rewire driver) adc~ is disabled.
With rewire, as far as I know, audio can only go in one way : from client to
host. So in your configuration, you can’t process an external audio source
in max, and you can’t send audio from live to max.

Am I wrong ?

MathieU

#72507
Mar 11, 2006 at 11:40am

you are right :(

#72508
Jan 13, 2008 at 9:24pm

Hi Mathieu,

I only just saw your post

You can sync Live using a pitch bend message from Max/MSP
If this is useful write back to me at
andrew.robertson@elec.qmul.ac.uk

Also, I have a question for you.
Can you sync Live by sending a Midi Clock message from Max.

I’ve always used my pitchbend method with Ableton’s Midi map, but for various reasons want to check out other ways too.

If you’re interested, check out
youtube.com/bkeepersystem

for some of the work

Regards,
Andrew

#72509
Jan 14, 2008 at 4:47pm

I am very interested in this as well. If it is not proprietary
knowledge, could you please share with us as well?
I am sure others in the future may want to know this.

#72510
Jan 14, 2008 at 9:30pm

Hi,

I discovered a nice way to do this thanks to Mitch Turner who posted on this forum. He posted the following patch which you send on midiout “from Max/MSP 1 (or 2)”

In Live you must make sure you are set to recieve Midi Clock – i.e. from Max/MSP 1 is set sync ON in Midi preferences.
Then activate external switch by switching EXT on in Live’s main control bar.

So here’s the patch in Max:

max v2;
#N vpatcher 276 156 587 354;
#P window setfont “Fixedwidth Serif” 12.;
#P window linecount 1;
#P newex 231 134 58 1441804 midiout;
#P button 231 87 15 15;
#P message 231 66 51 1441804 goto 0;
#P hidden message 35 46 30 1441804 120;
#P hidden newex 35 24 64 1441804 loadbang;
#N vpatcher 171 447 652 702;
#P origin 0 3;
#P outlet 407 211 15 0;
#P window setfont “Fixedwidth Serif” 12.;
#P message 407 171 58 1441804 242 0 0;
#P inlet 407 35 15 0;
#P outlet 15 211 15 0;
#P inlet 346 35 15 0;
#P inlet 285 35 15 0;
#P inlet 224 35 15 0;
#P inlet 69 35 15 0;
#P message 34 122 15 1441804 0;
#P message 15 122 15 1441804 1;
#P newex 346 171 58 1441804 int 251;
#P flonum 69 84 35 12 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 69 59 154 1441804 expr 60000./($f1*24.);
#P newex 285 171 58 1441804 int 252;
#P newex 224 171 58 1441804 int 250;
#P newex 15 171 58 1441804 int 248;
#P newex 15 146 64 1441804 metro 12;
#P fasten 12 0 7 0 351 109 20 109;
#P fasten 10 0 7 0 229 113 20 113;
#P connect 7 0 0 0;
#P connect 8 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 13 0;
#P fasten 11 0 8 0 290 117 39 117;
#P connect 9 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 0 1;
#P connect 10 0 2 0;
#P connect 11 0 3 0;
#P connect 12 0 6 0;
#P connect 14 0 15 0;
#P fasten 1 0 16 0 20 205 412 205;
#P connect 15 0 16 0;
#P fasten 6 0 16 0 351 196 412 196;
#P fasten 3 0 16 0 290 199 412 199;
#P fasten 2 0 16 0 229 202 412 202;
#P pop;
#P newobj 35 108 206 1441804 p MidiClockOut;
#B color 6;
#P button 182 87 15 9;
#P message 182 66 34 1441804 cont;
#P button 133 87 15 8;
#P message 133 66 34 1441804 stop;
#P button 84 87 15 7;
#P message 84 66 44 1441804 start;
#P comment 25 152 34 1441804 tick;
#P button 35 134 15 0;
#P flonum 35 66 41 12 0 0 4 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P comment 107 158 180 196617 Klangwerkstatt ;
#P hidden connect 11 0 12 0;
#P hidden connect 12 0 1 0;
#P connect 1 0 10 0;
#P connect 10 0 2 0;
#P connect 4 0 5 0;
#P connect 5 0 10 1;
#P connect 6 0 7 0;
#P connect 7 0 10 2;
#P connect 8 0 9 0;
#P connect 9 0 10 3;
#P connect 13 0 14 0;
#P connect 14 0 10 4;
#P connect 10 1 15 0;
#P pop;

And if people are interested in how to sync live using Midi pitchbend, let me know or search previous messages here.

Cheers,
Andrew

#72511
Jun 7, 2011 at 9:05pm

i am so glad that i found this patch! thankyou so much. its ancient – but still works well. i couldnt figure out why my midiout was not working – now i understand that the midi clock message is 258! mine was sending out ‘midi’!

thanks!

#72512

You must be logged in to reply to this topic.