[PlanetCCRMA] Help Needed: Ardour + Jack + MIDI = distortion

James P. Early earlyjp@purdue.edu
Sat Feb 10 14:56:01 2007

Greetings everyone,
  I'm writing to ask for some help in locating the source of distortion when
recording a stereo track in Ardour. I discovered this while attempting to play a
MIDI sequence via Muse, through a USB Midisport 2x2 to an external Alesis
keyboard, and recording its audio output. The distortion does not sound like
clipping (i.e. level related) to me. It sounds more like timing fluctuations --
perhaps lost samples.

  I've tried many things to isolate the problem, but I'm not sure what to try
next. Here are some observations:

1) Recording in Ardour without a MIDI sequence playing produces *no* distortion.

2) Before starting jackd, playing a sequence using aplaymidi and simultaneously
recording the audio using arecord produces *no* distortion in the resulting file.

3) The distortion appears in Ardour whether the sequence is played using
Rosegarden, Muse, or aplaymidi.

  I'm running everything on a Dell Optiplex 410 PII/400 w/1GB RAM. I've tried
using both the realitime and desktop SMP kernels -- no differencce. The 'top'
command indicates plenty of free memory (no swap used) and the CPUs rarely get
above 10% utilization. My card is a Delta 44, and I have experimented with a
variety of buffer/period settings. I also experimented with 44.1K and 48K clock
rates for the card and jackd -- no difference. I wondered if this might be an
interrupt issue, but the fact that it works with the aplaymidi/arecord
combination would seem to rule that out. The only time the distortion appears is
when Ardour, Jackd, and some MIDI sequencer is running.

  Can anyone offer some suggestions on what to try next? Also, I would
appreciate some suggestions on "optimal" jackd settings for the Delta 44.