live.observer and current_song_time

gamesoundguy's icon

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).

71.Brad_Just_VideoOut.zip
zip
broc's icon

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).

gamesoundguy's icon

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.

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

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

gamesoundguy's icon

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.

lorenzo.bianchi's icon

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?

FP's icon

How to get current song position in ms when the tempo is NOT constant ? Thx.