Matthias Nagorni wrote:

On Mon, 26 Jan 2004, Garett Shulman wrote:



Matthias Nagorni wrote:



On Sun, 25 Jan 2004, Garett Shulman wrote:




Hello, I am trying to create a very simple midi filter client for the alsa
sequencer based on aseqview-0.1.4. I have alsa 0.9.8. This code shows the


Maybe you can base it on my MIDI router example in
http://www.suse.de/~mana/alsa090_howto.html

A QT MIDI router which you could take as example code is located at
ftp://ftp.suse.com/pub/people/mana/qmidiroute-0.0.2.tar.bz2

Matthias




Matthias, Thank you for the suggestion. Your howto is exactly the information
I need. Very nice. The code I was working with before is callback based. Do
you have any opinion about callback vs. polling in regards to the alsa
sequender? Do you think I will get less overhead if I use bits of the code in
your howto in the callback framework? Thanks. -Garett



Discussed this briefly with Takashi (author of ALSA sequencer). Currently there is no wrapper library implemented, so the polling method I use in my MIDI examples is the only way to handle the asynchronous MIDI events.
If you want, you can regard the "midi_route" function as callback function. You could even write a wrapper function yourself which has a function pointer as argument, the while(1) { poll (... } as body and will call its argument function whenever poll returns, indicating that a new MIDI event is available for read.


Matthias



The code I was using before was the portlib.c and portlib.h files that are included with aseqview. I beleive that this is code that Takashi created. Maybe this code works in a manner similar to what you are describing. I will have to take a closer look at the internals of this code. Thanks for the info. -Garett

Reply via email to