Time measures in JACK

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Time measures in JACK

Gabriel M. Beddingfield

I'm having trouble telling the difference between the different notions
of time in the JACK API.  I've poured over the docs and even sometimes
in the code... and it's still got me a little puzzled.  Below is what I
understand after a bit of digging -- but I'm not sure it's right.  Would
someone help straighten me out?

These are the JACK time-related types:

    jack_nframes_t (as in jack_position_t.frame)
    jack_nframes_t (i.e. return of jack_frames_since_cycle_start())
    jack_nframes_t (i.e. return of jack_frame_time())
    jack_nframes_t (i.e. return of jack_get_current_transport_frame())

Here's how I understand them (pardon my liberal use of the word "epoch"):


The number of micro-seconds since the jackd server was started ("the
jackd epoch").  Not seekable, always counting.

jack_nframes_t (i.e. return of jack_frames_since_cycle_start())

Same as jack_time_t, but measured in frames since the jackd epoch.  If
the frame rate has changed since the jack server started, it is not
easily mapped back to jack_time_t by the user.  Use
jack_frames_to_time() for a more accurate mapping.  Not seekable, always

jack_nframes_t (i.e. return of jack_frame_time())

Is this the same as jack_frames_since_cycle_start()??

jack_nframes_t (i.e. return of jack_get_current_transport_frame())

The number of frames since the starting point of the transport ("the
transport epoch" -- frame=0 being bar 1, beat 1, tick 0).  Seekable, and
not directly related to the frame counts above unless the transport is
rolling in real time (not freewheeling).


A structure for the transport that maps between (a) real time since the
jackd epoch, (b) frames since the transport epoch, and (c) the
user-defined bar/beat/tick.  The real-time-to-transport-frames mapping
is only significant if the transport is rolling.

jack_nframes_t (as in jack_position_t.frame)

The number of frames since the transport epoch.  This is seekable, and
is only related to time when the transport is rolling.

jack_time_t (as in jack_position_t.usecs)

The number of microseconds since the jackd epoch that corresponds to
when jack_position_t.frame (the transport frame) occurred or is
scheduled to occur.  Really only has significance if the transport is

Thanks in advance,

This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Jackit-devel mailing list
[hidden email]