Precise sync from Logic to Max and back?

Peter Ostry's icon

This is not a real-time application, but the processing of existing MIDI tracks:

I want to play back MIDI notes in Apple Logic, send them to Max, make sophisticated processing and write them back to a new Logic track at the correct position with a precision of less than a millisecond. Since I produce negative and positive delays, I have to introduce additional latency. I would send the Logic notes a bit earlier to make room, time-wise. Depending on tempo I would have to adapt the time compensation in Max.

I can send a audio sync signal with 24 PPQ from Logic. But how do I sync Max to that, to be able to set my delays by ticks, for example? Or would sample based delays an option?

My tests show me that such a system ist not very reliable. The return from Max varies relatively much in time.

Can SMPTE help in any way?
Or am I bound to make the whole thing in RNBO and compile a plugin for Logic?

The simplest methods would perhaps be to manually align the return to a ‘start beep’. Or to write a MIDI file from Logic, process it in Max and transfer it back as file. But I would like it to be more fluid.

I would appreciate hearing some ideas on this.

Source Audio's icon

In my opinion, it would be faster to process midi clips,

then to do it in realtime.

In any case if your processing can be done in non real-time.

Peter Ostry's icon

Not sure what a MIDI clip is. The notes are in Logic. You mean save a MIDI file and process it in Max?

Source Audio's icon

I mean midi file , region or track exported from Logic

Peter Ostry's icon

Ok, thank you.