khz wrote:In all cases where I play with MIDI I get more xruns than when I play my hardware e-bass through Linux effects and then possibly record.
Only audio I get as good as no xruns. MIDI-to-Audio I get xruns.
I suspect they are complex dependencies on the individual priorities assigned to the
A) RT kernel
B) RT-MIDI
C) RT-IRQ (If it is a USB MIDI keyboard (hardware))
D) foobar
If these are not optimally coordinated - MIDI does not run/work in real time but audio and irq run/work in real time - conflicts (xruns) occur.
This is interesting. xruns are typically basically an audio thing, independent of MIDI: a failure of the audio processing to consume or produce the audio fast enough to keep up with the clock. If the MIDI processing has too low a priority, you would expect no xruns, but jitter: the MIDI events would arrive too late, but not interfere with the audio processing.
I guess there are 3 ways MIDI could cause increased xruns:
* by consuming system resources that were needed for the audio processing to keep up with the clock
* by causing additional load on the audio processing
* if the audio processing threads would somehow 'wait' for MIDI data.
I think point '3' is pretty unlikely, so that leaves '1' and '2'.
khz wrote:I sometimes play hardware and software synthesizers with a hardware keyboard or a hardware or software sequencer
This would be interesting to test '2': could you program your hardware sequencer to produce some pattern, and also record the same pattern into a software sequencer? It would be interesting to see if the same pattern (and otherwise the same system) would produce xruns when driven by the hardware sequencer but not by the software sequencer.
Generally, how do you connect your MIDI devices? Via your sound card, or via a MIDI/USB bridge? How does your MIDI data flow into your audio applications? ALSA MIDI, Jack MIDI, ...?