Forums > Jitter

Syncing QT playback to MIDI clock

February 20, 2009 | 12:59 pm

I’m working on a patch thats syncing visuals to music, and I want to sync the quicktime playback to external MIDI clock.

Right now I’m doing this by getting MIDI clock into Max using rtin – sel 248 which gives me a bang on every midi clock tick (1/96) and this bangs are routed to jit.qt.move.

If i use the external object lnth (which only lets every n-th bang come through) I can filter it by 6 to get 1/16 or by 3 to get 1/32, and that gives me 16 FPS at 120 BPM. But that is not enough, that’s why I would like to use 1/64 that would give me more usable 32 FPS at 120 BPM (I’m mostly working in the range 100-120 bpm). The problem is, I would have to filter MIDI clock by 1.5 which is impossible to do the way I’m doing it now.

So basically I would like to know if anyone has any suggestions how to get 1/64 out of MIDI clock, or maybe I’m overlooking some other better way to MIDI sync QT playback altogether?

Jernej


February 20, 2009 | 7:46 pm

Have a look at the sync~ help patch and the rate~ object. This should give you most of what you need.

Best,
Andrew B.


February 20, 2009 | 8:49 pm

am I understanding correctly that your using midi to sync the rate that the frames are displayed? If so, why not use it for something more meaningful like triggering visual events that correspond to the music, or having it trigger the playing of the video file on certain midi notes?


February 20, 2009 | 10:01 pm

Quote: andrewb@cycling74.com wrote on Fri, 20 February 2009 12:46
—————————————————-
> Have a look at the sync~ help patch and the rate~ object. This should give you most of what you need.
>

Thanks, I already looked at sync~ but haven’t looked at rate~. From having a quick look it seams it might be just what I was looking for.


February 20, 2009 | 10:17 pm

Quote: Axiom-Crux wrote on Fri, 20 February 2009 13:49
—————————————————-
> am I understanding correctly that your using midi to sync the rate that the frames are displayed? If so, why not use it for something more meaningful like triggering visual events that correspond to the music, or having it trigger the playing of the video file on certain midi notes?
—————————————————-

Well there’s a lot more going on than just midi sync of the rate, but the source material that is later getting processed is video loops that correspond to specific audio loops, and synced midi clock to frame rate ensures that video and audio loops are of the same length.
So basically I’m triggering video loops in jitter over MIDI at the same TIME I’m triggering audio loops in Ableton Live. Should be easier once Max for Live comes out.


February 20, 2009 | 10:18 pm

Quote: Axiom-Crux wrote on Fri, 20 February 2009 13:49
—————————————————-
> am I understanding correctly that your using midi to sync the rate that the frames are displayed? If so, why not use it for something more meaningful like triggering visual events that correspond to the music, or having it trigger the playing of the video file on certain midi notes?
—————————————————-

Well there’s a lot more going on than just midi sync of the rate, but the source material that is later getting processed is video loops that correspond to specific audio loops, and synced midi clock to frame rate ensures that video and audio loops are of the same length.
So basically I’m triggering video loops in jitter over MIDI at the same TIME I’m triggering audio loops in Ableton Live. Should be easier once Max for Live comes out.


April 24, 2009 | 7:31 pm

hello, I found this thread as I was desperately looking for some record about a sync malfunction between live and max…
I am working on a virtual loop machine programmed in Max/MSP that should be able to sync itself to a midi sequencer.
I am using the rtin object, select 248 and then some counters with 0 as min count and different max count: 0 – 11; 0 – 23; 0 – 47, etc.
this will never work… synchronism gets lost along the way as the song proceeds.
I read about the sync~ object in this thread and tried it in my patch right away… it is perfectly in sync with the counters output thus gradually loosing sync with live.
it is so frustrating…
is Max as rewire host the only way? I would really like to avoid it…


April 29, 2009 | 1:57 pm

The question is if you really need synchronization with dynamic tempo changes.

If not, you could run your own clock, manually set the tempo and use only MIDI clock start/stop messages (250/252) for synchronization. Many sequencers like eg. Live and Reaktor understand it without clock messages. In my experience timing is quite stable this way.


April 29, 2009 | 3:02 pm

I suppose I need synchronization with dynamic tempo changes.
Anyway I now have a clock generated in Max by a metro object triggering a 248 message sent to live with midiout. This way I have the 2 softs in sync without the restrictions of time signature, I am able to feed audio sources into max and I do not depend on live flickering midi clock. It is working up to know… only time will tell.
thanx for your post, broc.


April 5, 2012 | 7:20 pm

there is also hostsync~ which may help


Viewing 10 posts - 1 through 10 (of 10 total)