On Sat, Feb 16, 2013 at 10:33 PM, M Donalies <ingeniousnebbish(a)cox.net> wrote:
The first question is a rather stupid one: How long is
a Jack frame? If we're
running at 44.1 kHz, is a frame 1/44100 sec? Or is it some multiple? Or is it
something else? And does the process callback get called at each frame while
transport is rolling?
IIRC, a "frame" in JACK parlance is one sample, so 1/44100 in your
example. The process callback is called regardless of transport
state. You call a function (jack_transport_query I think? I don't
have any of my code in front of me right now) to get transport state
and timing/tempo information (including bar:beat:tick).
process_callback() calls process_midi_output(),
wherein we find:
port_buffer = jack_port_get_buffer(output_port, nframes);
Why the nframes parameter? Is there a separate buffer area for each frame?
There's a separate buffer for each port.
A little later in the same function we have:
last_frame_time = jack_last_frame_time(jack_client);
Is this the time of the end of the last process cycle?
Not sure about this one. The docs say: "the precise time at the start
of the current process cycle" which should be the same time as the
start of the current process cycle, I would think.