I am a complete newbie to jack programming. I am trying to use Jack to send MIDI events to other applications. I am used to Mac OS X programming and the CoreMidi model, so from what I read about Jack, it seem it should be a fairly easy transition. I am still programming in Mac OS, but I am trying to make the code easily portable to Linux, hence my option for Jack. The problem is I can’t find good reasources for learning Jack. The reference to the API is good and they provide example code, but there is not enough explanatory text about how to put the pieces together, or a good tutorial to follow. Most of the stuff I found was about the audio part of jack, not so much about MIDI. So I have many, many questions, like:
- I believe I understand the basic procedures for (1) opening a client, (2) registering a port and (3) installing callbacks to deal with data. That part is similar to CoreMDI. But I don’t find any calls that I could make to just send MIDI bytes to the jack server, except from a process callback. The callback model seems natural to me in an input port, when we are waiting for data to come from other parts of the system and we don’ know when they will come. But I want to send MIDI at any arbitraty time that I decide within my application. How do I do that?
- It is not completely clear to me how jack deals with time. It seems everything is done in numbers of samples. Is that meant to keep it in synch with the audio? In that case, do I need to convert timestamps to number of samples and constantly keep track of changes in sampling rate? What is the sanctioned way of doing that? (couldn’t find it in the examples).
- I tried to compile and run the examples in Xcode with the provided project and source files, but it couldn't even get pass the #includes. I didn’t see in the provided project (the one that came with the Extras folder in the JackOSX instalation) any references to the jack framework. Tried to include it myself, but Xcode would still not see the jack headers. If I try to include the jack header with a full hardcoded path, it finds the first file (‘jack/jack.h’) but fails with other includes. Maybe the project file is outdated. Could anyone help with that?
Any help, tip or link would be highly appreciated. Sorry about the long message. Promisse I’ll keep them shorter from now on (If I don’t get kicked out of the list first…) ; - )