[LAD] making sense of Jack MIDI; or, is this an appropriate use for Jack?

M Donalies ingeniousnebbish at cox.net
Fri Feb 15 23:41:11 UTC 2013


On Friday 15 February 2013 15:22:20 Paul Davis wrote:
> the JACK API is fully documented. tutorials on basic use of the audio API
> exist. the big difference here is that there are several example blobs of
> source, ranging from the explicitly "example" clients within the JACK
> source code package itself, to the utility clients, and onward up to full
> scale MIDI sequencers such as ardour.

I suppose I've been spoiled by the Qt documentation. There are overviews for 
each framework, and each class and method have significant explanatory 
documentation, often including a sample of how to use it. The examples are 
well-documented, take you by the hand, and walk you through exactly what's 
going on at each line (or small group of lines).

I find the Jack documentation much harder to follow. The refman opens with some 
broad explanations of what Jack is, then goes on to give short descriptions of 
each function and data type. There's no "here's how you use these guys" 
sections. Some of the Jack example files are commented and some aren't. There's 
also no expanded tutorial that takes you step by step from something 
completely trivial to a simple but functional program (e.g. Qt's tutorial, 
Scribble, if I recall).  I don't mean to denigrate the documentation that's 
there, but it's missing something. It's like a bunch of disconnected man 
pages. It's okay if you already know how to use it, but it's very hard for the 
newbie. The Alsa documentation suffers from this as well. It's kind of like 
taking a calculus textbook and jumbling all the pages. You'd have hunt and 
peck through this page and that for a very long time before you could 
understand anything.


> what could make quite a bit of sense would be a utility JACK client that
> played an SMF file via JACK MIDI. this would be *relatively* simple to do
> (once you figure out what godawful lump of code you plan to use to parse
> SMF) and would be quite instructional for future questions such as yours.

For parsing an SMF, you mean something like code that can convert midi to text 
and back again? I've written a couple of converters to do that sort of thing. 
In the program, each midi track is a list of events with absolute times. 
Merging the tracks together isn't a big deal, so then I'd have a single list 
of events with absolute times (in midi ticks). I also have the code to convert 
each event to a list of bytes (binary data), since I can write a SMF. And I 
have an algorithm to convert absolute ticks to nanoseconds. It's that messy 
sequencing stuff that's giving me the trouble.

-- 
7:8


More information about the Linux-audio-dev mailing list