max msp in sync with ableton

pepperclouds's icon

So i figured out how to record max in ableton using rewire. I have a sequencer in max that i want to sync up with ableton. I have the bpm set up but the tricky part is, in order to have everything sync up perfectly, i need to "toggle on" my max sequencer to the prerecorded ableton tracks, on the beat. i was wondering if there is a way that everytime i push record on ableton, it could trigger my "toggle on" switch in max.

nit's icon

i use the sync~ object in msp to sync up ableton to max (as a slave). if you're on OSX you should look at this opbject in combination with the internal midi driver.
suppose there are also internal midi drivers for windows.

X37V's icon

The leftmost outlet of hostsync~ sounds like what you are after.

mbryo's icon

You need to connect the left hostsync~ outlet to a toggle.. however, hostsync constantly sends out annoying bangs through this outlet and can mess with your sequencer (if you're using the tempo object for instance) so this is my little abstraction to get around that. its kind of ghetto, but works.

Max Patch
Copy patch and select New From Clipboard in Max.

X37V's icon

A change object also works:

Max Patch
Copy patch and select New From Clipboard in Max.

mbryo's icon

Wow, I feel stupid, that's incredibly simpler than my approach. wish i'd known about that.

pepperclouds's icon

how can i get the bpm of ableton to match my tempo object in max?

.mmb's icon

[hostsync~] will give you bpm. Also, you can use [hostphasor~] to make a clock synced up to your host. Take a look at its helpfile to see how it is done. It will give you quarter notes, but if you want smaller you can just multiply the output of [hostphasor~] by the division of the quarter note (i.e. a sixteenth is 1/4 of a quarter, so multiply it by 4) and wrap the signal using [pong~ 1 0 1].

pepperclouds's icon

i can't get bpm in hostsync. i can get the beat count, but i need the bpm number (ex 120 bpm) so i connect it to a tempo object. is there a way to do this? do i need to write some sort of expr object, or is there an easier solution?

mbryo's icon

this is from another post:

Max Patch
Copy patch and select New From Clipboard in Max.

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