Hi gang,
Maybe someone can help me out of this latest head-scratcher:
I have noticed that I tend to get audio glitches during performance when using external MIDI controllers, using the MIDI-in of my HDSP card under Linux [haven't tried any other way, however]. Tonight, experimenting with only the "test Audio + MIDI" help patch and my MIDI fader box, I found that, yes, MIDI appears to be the cause of the problem. It doesn't glitch every time, but it does do it fairly often when changing the faders, and never when I don't touch them. Using OSS or Jack does not make any difference, although Jack happily reports:
**** alsa_pcm: xrun of at least 0.042 msecs
every time a glitch occurs. I also tried starting pd as -rt [with "sudo"] as well as setting the period size of Jack to 2048 [much more than an HDSP should need!] and using that in realtime mode as well.
PD + ALSA + HDSP does not work on my setup, although PD + ALSA + i810 soundcard works fine. Go figure.
Any of you other HDSP users out there see this? I wonder if it has anything to do with audio + MIDI sharing one device? Improbable, I know, but still....
Any suggestions will be appreciated.
D.
Qjackctl gives some illuminating information on the problem:
02:05:18.063 XRUN callback. (54) delay of 46451.000 usecs exceeds estimated spare time of 45357.000; restart ... delay of 46451.000 usecs exceeds estimated spare time of 45357.000; restart ... 02:05:18.068 XRUN callback. (55) 02:05:36.407 XRUN callback. (56) delay of 46452.000 usecs exceeds estimated spare time of 45359.000; restart ... delay of 46452.000 usecs exceeds estimated spare time of 45359.000; restart ...
Anybody see a pattern? ;-) I wonder what this "spare time of 45359.000" would mean?
Things which seem to have helped so far:
significantly, but not completely. After changing blocksize, I got slightly different numbers out of Qjackctl's window:
delay of 45481.000 usecs exceeds estimated spare time of 45332.000; restart ...
I guess that means I gained .01 ms by changing the blocksize from 2048 to 64 ;-)
IRQ 9 with the HDSP]: appeared to reduce glitches, but not completely.
After some experiments, I am a bit happier, but not satisfied. The glitches still appear most often when several controls are being used at once, but sometimes just for a single controller when I haven't touched them in a while.
Question: can someone explain -sleepgrain to me? I know it affects MIDI, but I cannot exactly understand *how* from the docs.
Also, would a higher -audiobuf than 50 or 100 help here? I would rather keep latency lower than this, of course...
Thx again for any suggestions, D.
I hate to sound desperate.. ;-) ...but I have to perform with this rig on Tuesday, and these unpredictable MIDI-induced glitches in PD are making me a wee bit nervous. Do any of the gurus-in-residence on this list have any suggestions about this?
thx again, d.
derek holzer wrote:
Hi gang,
Maybe someone can help me out of this latest head-scratcher:
I have noticed that I tend to get audio glitches during performance when using external MIDI controllers, using the MIDI-in of my HDSP card under Linux [haven't tried any other way, however]. Tonight, experimenting with only the "test Audio + MIDI" help patch and my MIDI fader box, I found that, yes, MIDI appears to be the cause of the problem. It doesn't glitch every time, but it does do it fairly often when changing the faders, and never when I don't touch them. Using OSS or Jack does not make any difference, although Jack happily reports:
**** alsa_pcm: xrun of at least 0.042 msecs
every time a glitch occurs. I also tried starting pd as -rt [with "sudo"] as well as setting the period size of Jack to 2048 [much more than an HDSP should need!] and using that in realtime mode as well.
PD + ALSA + HDSP does not work on my setup, although PD + ALSA + i810 soundcard works fine. Go figure.
Any of you other HDSP users out there see this? I wonder if it has anything to do with audio + MIDI sharing one device? Improbable, I know, but still....
Any suggestions will be appreciated.
D.