Well, even if I push the fader up real slow.. say 6 seconds from bottom to top, the same problem occurs.

That would mean around 16 messages per second.The code in the MIDI thread is actually still a bit of a mystery to me.. as its taken from some other o/s projects

Qt Code:
  1. void midiThread::run()
  2. {
  3. snd_seq_t *seq_handle;
  4. int npfd;
  5. struct pollfd *pfd;
  6.  
  7. seq_handle = open_seq();
  8. npfd = snd_seq_poll_descriptors_count(seq_handle, POLLIN);
  9. pfd = (struct pollfd *)alloca(npfd * sizeof(struct pollfd));
  10. snd_seq_poll_descriptors(seq_handle, pfd, npfd, POLLIN);
  11. while (1) {
  12. if (poll(pfd, npfd, 100000) > 0) {
  13. midi_action(seq_handle);
  14. }
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

This is the run part of the QThread. The other relevant bit is:

Qt Code:
  1. void midiThread::midi_action(snd_seq_t *seq_handle) {
  2.  
  3. snd_seq_event_t *ev;
  4. MyDataEvent dataEvent(0,0);
  5.  
  6. do {
  7. snd_seq_event_input(seq_handle, &ev);
  8. switch (ev->type) {
  9. case SND_SEQ_EVENT_CONTROLLER:
  10. dataEvent.setParam(ev->data.control.param);
  11. dataEvent.setValue(ev->data.control.value);
  12. QApplication::sendEvent( parent, &dataEvent );
  13. break;
  14. }
  15.  
  16. snd_seq_free_event(ev);
  17. } while (snd_seq_event_input_pending(seq_handle, 0) > 0);
  18.  
  19. }
To copy to clipboard, switch view to plain text mode 

If this is a horrible way to do things.. I would much appreciate any ideas on how to handle MIDI better.

On windows I used Borland C++ Builder.. and found a great component that pretty much did it all for me, passing the messages to my callback function. I guess I have to learn more C++ to program on Linux ;-)