After a little more experimenting, I found a little workaround for this issue... although it's still doesn't exactly shed any light on what's causing the problem. I figure I'll post it here to this mailing list, in case someone with more experience might know what's going on here.

I noticed that every time I switched to a different instrument in the ZynAddSubFX instrument bank, I would get an Xrun in JACK. Then I'd start hearing the crackling sound. The crackling didn't show up at first, only until I switched instruments. I found that if I disconnected ZynAddSubFX from system in the JACK Connection's Audio tab and then reconnected it, the crackling goes away. If I switch to another instrument in ZynAdd, however, I have to repeat this process otherwise the crackling comes back.

Another thing I noticed is that if I turn on "Verbose messages" in JACK, normally I'll steadily get line after line of messages like this:
load = 13.6919 max usecs: 185.000, spare = 1148.000
The load number will increase and the spare will decrease as I play notes. If I switch instruments in ZynAdd however, I get an Xrun and then the load number goes way down in the 1.0 - 2.0 range and as I play notes in ZynAdd, this number is unaffected. Its as if JACK disconnects itself from ZynAdd or something, despite not giving any indication that it has done so.

Oh well. I'm content with this workaround. I just thought I'd post this info in case it may be helpful for someone else.

On Fri, Jun 20, 2008 at 8:03 PM, Peter Lutz <peter@gotsomeideas.com> wrote:
On Fri, Jun 20, 2008 at 6:40 PM, Norval Watson <norv2001@yahoo.com.au> wrote:
Are you running a real-time kernel (rt)?

Yes, I am. It's the default kernel in Ubuntu Studio. I get almost no Xruns in JACK too, so as far as I know, its a separate problem. I have noticed though that one of the few times I'll get one or two Xruns is when I switch instruments within ZynAddSubFX. Not sure if that matters.

In case its helpful, here's some of my JACK settings:
Realtime: checked
Monitor: checked
H/W Monitor: checked
H/W Meter: checked (I'm not sure why I have these last two boxes checked, does it matter?)
Frames/Period: 64 (I've tried 128 too, and that didn't seem to change anything with ZynAdd)
MIDI Driver: seq
Sample Rate: 48000
Periods/Buffer: 2
Port Maximum: 256
Timeout: 500

As for ZynAddSubFX settings, here's some of the relevant ones:
Sample Rate: 48000
Buffer Size: 256
OscilSize: 512
PADsynth Interpolation: Linear (fast)
Append: checked
XML compression level: 3

Any ideas?