Internet DJ Console Homepage IDJC

website logo

The purpose of this page

Some system configuration needs to be done in order to be able to run IDJC. Fortunately it only needs to be done once and full details follow.

Configuring your system for JACK Audio Connection Kit

No JACK means no IDJC

I'm going to be talking about JACK Audio Connection Kit (or JACK) from now on and its sound server, jackd. Forget IDJC exists for the moment as the information on this page applies to all applications that require JACK in order to function.

Manually running jackd to see what happens
$ jackd -d alsa
jackd 0.121.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details


JACK is running in realtime mode, but you are not allowed to use realtime scheduling.
Please check your /etc/security/limits.conf for the following line
and correct/add it if necessary:

  @audio          -       rtprio          99

After applying these changes, please re-login in order for them to take effect.

You don't appear to have a sane system configuration. It is very likely that you
encounter xruns. Please apply all the above mentioned changes and start jack again!

What just happened here is jackd just failed to start because it runs realtime mode by default and your system as it is configured won't supply it. Realtime mode helps to ensure that the small and therefore low latency audio buffers are refilled without interruption. By choosing not to use realtime mode the buffer fills become more erratic making solid performance rely on using larger buffers that result in higher latency.

Let's get reconfiguring

Add the line mentioned above to the file also mentioned above.

  • Ubuntu

    $ sudo su -c 'echo "@audio   -   rtprio   99" >> /etc/security/limits.conf'
  • Debian

    $ su -c 'echo "@audio   -   rtprio   99" >> /etc/security/limits.conf'

The above change applies only to members of the audio group. Ensure your user account is a member.

$ sudo usermod -a -G audio $(whoami)

Log out of your desktop and log back in again for the new settings to take effect.

Let's try starting jackd one more time.

$ jackd -d alsa
jackd 0.121.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
cannot lock down memory for jackd (Cannot allocate memory)
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback

This time it has successfully started so you can now run IDJC.

Making a simple JACK configuration file
$ echo "/usr/bin/jackd -d alsa -r 44100 -p 256" > ~/.jackdrc

This will ensure that when jackd is started on demand that it will do so with a sample rate equalling that of CD audio and therefore most likely your entire music collection.

Making JACK use a particular sound card

It's a two step process of finding the names of all the sound cards and specifying which one to use to jackd.

$ cat /proc/asound/cards
 0 [Revolution71   ]: ICE1724 - M Audio Revolution-7.1
                      M Audio Revolution-7.1 at 0xd000, irq 19
 1 [nanoKONTROL    ]: USB-Audio - nanoKONTROL
                      KORG INC. nanoKONTROL at usb-0000:00:1d.0-2, full speed
$ jackd -d alsa -d Revolution71 -r 44100 -p 256
Enabling MIDI events
$ jackd -d alsa -r 44100 --midi raw

Only use the --midi option if you intend to use a MIDI device to control IDJC.

Finally

The program qjackctl can be used to start a JACK sound server. It has a nice graphical user interface and can generate a .jackdrc file as well.