[LAD] Deciphering jack-smf-utils -- Jack MIDI stuff

M Donalies ingeniousnebbish at cox.net
Mon Feb 18 14:23:56 UTC 2013


This question arises from jack-keyboard rather than jack-smf-utils. The basic 
framework is very similar, but jack-keyboard gets input from a gui rather than 
from a smf.

So the idea is that you press a key on the keyboard and an event handler gets 
called. The event handler calls queue_new_message(int, int, int), which 
creates a midi event ev on the stack. Then it calls queue_message(&ev).

queue_message() copies ev to a ringbuffer. Okay, so far, so good. 
queue_new_message() exits and ev goes out of scope, so only the copy on the 
ringbuffer remains.

The next process cycle process_callback() is invoked. It calls 
process_midi_output(), which takes data from the ringbuffer and moves it to 
output_port's buffer.

Is this what's happening?


Now for receiving timing info from Jack. Where's a good place to look for code 
that explains how to get (and display in a gui widget) the current time while 
transport is rolling? There's QJackCtl of course. Is there something simpler, 
more of an example program?

-- 
7:8


More information about the Linux-audio-dev mailing list