max msp in sync with ableton
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.
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.
The leftmost outlet of hostsync~ sounds like what you are after.
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.
A change object also works:
Wow, I feel stupid, that's incredibly simpler than my approach. wish i'd known about that.
how can i get the bpm of ableton to match my tempo object in max?
[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].
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?
this is from another post: