Distorted audio recording


I’ve recently bought Alesis io2 USB interface and would like to record my guitar with Ardour. Once I start qjackctl, Ardour receives the audio frames from the USB interface, but something about timing or priority is not working properly. The audio seems to have different delays or seems to arrive at incorrect times resulting in a distorted sound. The amplifier is not saturated, it’s not that sort of distortion.

I’ve a RT environment, that shouldn’t be the problem:
$ uname -a
Linux casiopea 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

$ cat /proc/asound/cards
0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xd5200000 irq 47
HDA ATI HDMI at 0xd0040000 irq 48
2 [iO2 ]: USB-Audio - iO|2
Alesis iO|2 at usb-0000:00:1d.0-1.1, full speed

$ cat /etc/security/limits.d/audio.conf
@audio - rtprio 95
@audio - memlock unlimited

$ groups
audio cdrom floppy dip video plugdev netdev scanner bluetooth lpadmin

I guess it has to do with the session or the patchbay option of qjackctl because I haven’t connected there anything yet (I don’t understand the input/output scheme).

The patchbay output options are:
Type: Audio -> System -> Capture 1 and 2
Type: Audio -> Ardour -> Master out 1 and 2, Auditioner out 1 and 2, Audio out 1 and 2, Click out 1 and 2
Type: ALSA -> IO/2 -> MIDI1

The input ones are:
Type: Audio -> System -> Playback 1 and 2
Type: Audio -> Ardour -> Master in 1 and 2, Audio in 1
Type: ALSA -> IO/2 -> MIDI1
Type: ALSA -> Ardour -> Ctrl, mcu and seq

Could anyone please help me out?
Thank you in advance

Hi Tux,
do you use rtirq script?
maybe this could help you :

change the mount options of your hard drives. In /etc/fstab change the option to noatime. This will stop the file system to continuously record the access times of the files, leaving it free to do more real work


I didn’t have rtirq running… I just installed it and started it:
# apt-get install rtirq-init

/etc/init.d/rtirq start

Setting IRQ priorities: start [i8042] irq=1 pid=77 prio=75: OK
But unfortunately didn’t work out, the recording is still a mess :frowning:

Maybe this could help?

Running realTimeConfigQuickScan gave me some tips for improving, but didn’t worked out.

The guide suggests also to build an RT kernel, even when kernel versions above 2.6 are already considered RT. However:
apt-get install kernel-package fakeroot build-essential
had too many dependencies (800MB of packages!), so I skipped that option.

On the other hand, I tried running a LiveCD with an audio distribution with RT kernel, such as Tango. Surprisingly, it worked better but still with no clear recordings. When I strum the guitar I basically hear echoes all the time. If I use the Debian kernel the recorded sounds are all mixed and can’t even figure out the original sound.

If Tango distribution didn’t work, is there any hope that any other fixes will?

Your problem is almost certainly a device-driver level error.

try kx studio its usually setup right out the box, just need to set th interface in cadence.

make sure ardour is not taking care of monitoring otherwise you will be hearing sound directr via the interface and then via software which will have a delay dependant on your buffer settings

You might try AV Linux, it works out-of-the-box & you may try a live usb/dvd before install


I can confirm that building your own kernel is at 99,99% not necessary!

If you hear just one “echo” when you strum, it sounds like buffer size is too big, and doesn’t allow your system to act like in real time. To avoid that, you might choose in Ardour Edit/Preferences/Audio/Record monitoring by Hardware, and disconnect the output of the track you rec (or reduce the buffer size in Ardour Windows/Audio MIDI setup/).

Investigate as Paul said up here is certainly a good idea, he is the main developper of Ardour if you don’t know…

Your problem is almost certainly a device-driver level error.

Hi all,

Solved! As Paul suggested, it was a device driver misconfiguration. Qjackctl had configured 41kHz sample rate while Ardour creates projects by default at 48kHz. I believe that was the reason why I basically heard echoes, because Ardour was sampling again part of the wave before it ended. Once I set Qjackctl to 48kHz I could record a smooth and clear sound!

As you all said, my non-RT v3.2 kernel was enough to carry out this task. I tried with Tango and couldn’t even notice the difference.

Thank you very much to all of you for your support, I was completely lost.

Glad you got it working, though your diagnosis is probably not correct. It is likely a bug in the device driver when trying to operate the device at a sample rate other than 48kHz, which is often the only/best rate that some USB devices will work at.