Forums > Max For Live

live.observer and current_song_time

February 18, 2010 | 4:38 am

Hello friends,

My goal this week is to get the firewire port of my Mac to output DV video in sync with the transport of Ableton Live using Max for Live. This type of DV Firewire Video output functionality is already available in programs like Logic and Nuendo for Mac. I have always wanted it in Ableton so I can view my videos on a large TV while I still have my 2 monitors for editing.

I have come close to accomplishing this but have run into a wall.

I am successfully playing the video using jit.qt.movie. I am successfully sending the movie out the firewire port using jit.qt.videoout. The hard part has been using the Ableton Live transport position as the play position of my movie. I tried using the "transport" object but I could not get any meaningful values that jit.qt.movie can understand. The closest I have come is to use the live.observer object to report the "current_song_time". The manual claims this gives me "Live set play position in milliseconds"…but when I press play in live the and spew these numbers to a float number box, they are much smaller and slower than ms. I hooked it up to the inlet of jit.qt.movie anyway and it does successfully control my video…just very very slow. Maybe this is a problem with timescale and units? Have I gone about this entirely wrong?

My main question is: How can I get an accurate value of the play position of Ableton Live to control the playback position of my quicktime movie?

I have included my patch (attachments are not working for me, I will try to upload again lateR).


February 18, 2010 | 12:49 pm

Obviously the documentation is wrong.
Actually "current_song_time" delivers a beat count (with fractional values) instead of milliseconds. The issue has been discussed already on this forum, but so far I haven’t seen any response from the developers.

Note: If the song tempo is constant, you can calculate the time in seconds from the beat count by multiplication with factor (60/bpm).


February 19, 2010 | 12:27 am

Good idea. I ended up calculating the current frame with:

current frame = (Song FPS/(Song BPM/60)) * Current BPM

Is it possible to control the playback position with a unit other than frames (like ms)? If so, I could probably have used a much simpler calculation. It would be nice if we could easily get the absolute time in ms from the Ableton Transport and feed it directly to jit.qt.movie to control movie playback position.


February 19, 2010 | 6:48 pm

If you want to get ms from the origin you might be able to use something like this

– Pasted Max Patch, click to expand. –

February 19, 2010 | 11:42 pm

Ah yes, this is much easier. Thank you. Now is there a way to control the Quicktime video with ms? I am only able to find frame and frame_true as a means of causing the video to jump to a specified location.


February 20, 2010 | 7:35 pm

a frame if you are 25 frame for second is 40 milliseconds.

so you can easily pass from one measure to the other one.

no?


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