Roger Dannenberg wrote: > I'm running into many problems trying to write software that uses ALSA > for MIDI I/O. I think what I'm trying to do is relatively simple, and > maybe someone has some example code or preliminary documentation they > can point me to, or maybe someone would like to work with me on PortMidi > for ALSA (PortMidi for ALSA broke with ALSA v0.9).
I think I can help with PortMidi, but I don't have much time. > 1) Why do writes to "raw" midi remove status bytes? I have to replug my > USB interface every time I repatch or power-cycle MIDI devices to get > them a status byte. It should be considered a bug to not send status > after a long pause, and maybe "raw" is the wrong terminology? Indeed, USB MIDI isn't exactly raw MIDI. In the USB MIDI protocol, the status bytes are always sent (so the driver adds them if the user is using running status). It seems your interface tries to optimize the data stream by removing any duplicate status bytes, and overdoes it. What interface are you using? > 2) How can I find what devices are available? I found code to search for > non-raw devices, but not raw ones. alsa-lib/test/control.c enumerates rawmidi devices. > 3) An option in PortMidi is to perform timestamped, buffered output. I > think I should be able to use the sequencer interface for that, but I > can't find any documentation. The ALSA sequencer uses queues for this. See alsa-lib/test/seq-sender.c or alsa-lib/test/playmidi1.c. > 4) Short of finding answers to the above, is there any overview document > that explains the ALSA (MIDI) architecture? No. You might find some small scraps on <http://www.alsa-project.org/~iwai/alsa.html>, but good documentation is lacking. HTH Clemens ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user