On Sun, Jul 5, 2009 at 2:50 AM, Renato Budinich<[email protected]> wrote: > On Sat, 2009-07-04 at 19:12 -0400, Mark Vitek wrote: >> Hello, >> >> I am new to audio/midi programming, but in my experience Jack is the >> easier API to learn/use. >> If you download midimon from sourceforce, and look in mm_jack.cc / >> mm_jack.h you can see the basic usage. >> Basically, you pass a callback function to jack, which allows you to >> pull available MIDI events from the jack API. >> I just queued those up using a Glib queue, and pull the events off in >> the user interface thread. Very straightforward. >> http://sourceforge.net/projects/midimon/ > > Thank you, I'll have a look in this. > What I can't understand is if it is possible, with the jack API, to > actually *create* midi note on/off messages. The examples I've seen > (like midimon too, it seems to me) only handle (reroute etc.) midi > coming from other sources, like an external keyboard or another program. > In my case instead I'll have to actually create those messages, as for > example midi sequencers do. > May this is the reason why programs that generate midi (seq24 for > example) use alsa? (see my confusion in point 1) in first message) > > Renato > > _______________________________________________ > Linux-audio-dev mailing list > [email protected] > http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev >
It is my understanding that ALSA MIDI and Jack MIDI are just two different MIDI API's, and the Jack MIDI is an easier API to use, but ALSA is more common on Linux (everyone using Jack MIDI will also have access to ALSA MIDI, but the converse is not necessarily true). If you wanted cross platform compatibility (which seems not to be an issue for your particular project), you would want to use portmidi, which is a third alternative. Someone please correct me if I got a detail wrong here. I have written a linux input device to OSC protocol message bridge program, and it seems like the hard part for your project would be getting the device polling right, the midi event side should be a cinch. _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
