JACK
| Please format this article according to the Style Guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article.
Reason(s):
|
This article is about the Jack Audio Connection Kit (JACK) and its configuration.
[edit] What is Jack?
From the homepage http://jackaudio.org/ :
JACK is a low-latency audio server, written for POSIX conformant operating systems such as GNU/Linux and Apple's OS X. It can connect a number of different applications to an audio device, as well as allowing them to share audio between themselves. Its clients can run in their own processes (ie. as normal applications), or they can run within the JACK server (ie. as a "plugin").
JACK was designed from the ground up for professional audio work, and its design focuses on two key areas: synchronous execution of all clients, and low latency operation.
[edit] Why use JACK?
JACK is the way to go if you want to do some serious audio work like creation of audio or multimedia content. Otherwise, you don't need it.
In short, whereas cables will let you to interconnect your music hardwares on a stage or a studio, JACK will let you to do the same with the hardware and software audio components of your computer with the mouse in qjackctl.
[edit] Installing necessary software
In order for JACK to be of any use to you, you need three distinct components:
- ALSA driver for your sound card.
- JACK itself
- software which makes use of JACK (such as the JACK output driver for XMMS or MPlayer)
[edit] Kernel Configuration
You don't have to use the realtime mode in order to use jack, but it is needed for low latencies, which is one of the two primary goals of JACK. In order for you to use the realtime mode you need to have some options turned on in the kernel. You can find more information in the jack FAQ.
| Linux Kernel Configuration: Realtime kernel config |
Processor types and features --->
Preemption Model (Preemptible Kernel (Low-Latency Desktop))
Timer frequency (1000Hz)
|
Make sure that the following option (GROUP_SCHED) is disabled, otherwise you won't be able to use realtime scheduling as a normal user (on kernels >=2.6.25). If you get errors like 'cannot use real-time scheduling (FIFO at priority 10) ... (1: Operation not permitted)', this is most probably the culprit.
| Linux Kernel Configuration: Realtime kernel config |
General setup --->
Control Group Support --->
[ ] Group CPU scheduler
|
Or, you may still use realtime scheduling with GROUP_SCHED enabled, if you add the following PAM configuration file (see /etc/security/limits.conf for details):
#<domain> <type> <item> <value>
@audio - rtprio 90
@audio - memlock 500000
The nice setting is not necessary it is an option that has been made up. See the original post here http://ardour.org/node/3434
If you need support for a kernel <= 2.6.24, please refer to the Troubleshooting section.
[edit]
We'll first make sure we have the relevant USE flags enabled. Open up /etc/make.conf (or /etc/paludis/use.conf if you're using paludis), look at this list of USE flags and enable what you think suits you best.
- altivec : Adds support for optimizations for G4 and G5/ppc970 processors (PPC/PPC64 architecture only).
- alsa : Adds support for media-libs/alsa-lib. (don't even think of disabling this...)
- jack-tmpfs : Compile in a tmpfs path (deprecated, not used in newer jack versions)
- jack : Enables programs to output to or input from JACK.
- portaudio : Adds support for the crossplatform portaudio audio API. Note: Portaudio support is NOT, repeat NOT needed when compiling jack-audio-connection-kit on Linux! Very few applications actually require this; enable only for applications which do not have native alsa/jack support!
- lash : Adds LASH Audio Session Handler support Note: Lash is not needed by jack-audio-connection-kit, but it will let you save and restore your JACK audio sessions. If you want to use it, a must is to emerge lash.
Save your USE flags and continue with installing JACK below.
[edit] Installing jack
You need to have jack-audio-connection-kit installed.
[edit] Configuring JACK
[edit] Starting jack manually
Here's some info about starting it manually, but there are graphical programs like qjackctl to help your life. You can read about those in the next section. The jack daemon starts with the following command:
If you want to run jack in realtime mode, use the following command:
[edit] Using graphical tools
QJackCtl is a nice tool to configure and start jackd. The interface should be easy to grasp.
QJackCtl is designed to start and pass options to JACK for you. It can also provide a system tray icon. This program is a must have for anyone who wishes to experience the power and flexibility of JACK. While the default configuration could work, you should try fiddling around with it anyway. For example, if you want to do playback in 5.1 or 7.1, you'll need to adjust the number of output channels accordingly. It's very important to change the server path to jackd, it never seems to work with either of the other two options selected.
After you've adjusted the settings to meet your preferences and sound card, click OK to save the changes, and then press the Start button on the main qjackctl panel to test the jack server.
[edit] Starting JACK at boot time
It is possible to start jackd at boot time and as a regular user with a boot script.
#!/sbin/runscript
# This programm will be used by init in order to launch jackd with the privileges
# and id of the user defined into /etc/conf.d/jackd
depend() {
need alsasound
}
start() {
if ! test -f "${JACKDHOME}/.jackdrc"; then
eerror "You must start and configure jackd before launch it. Sorry."
eerror "You can use qjackctl for that."
return 1
else JACKDOPTS=$(cat "${JACKDHOME}/.jackdrc"|sed -e 's\/usr/bin/jackd \\')
fi
if [ -e /var/run/jackd.pid ]; then
rm /var/run/jackd.pid
fi
ebegin "Starting JACK Daemon"
env HOME="${JACKDHOME}" start-stop-daemon --start \
--quiet --background \
--make-pidfile --pidfile /var/run/jackd.pid \
-c ${JACKDUSER} \
-x /usr/bin/jackd -- ${JACKDOPTS} >${LOG}
sleep 2
if ! pgrep -u ${JACKDUSER} jackd > /dev/null; then
eerror "JACK daemon can't be started! Check logfile: ${LOG}"
fi
eend $?
}
stop() {
ebegin "Stopping JACK daemon -- please wait"
start-stop-daemon --stop --pidfile /var/run/jackd.pid &>/dev/null
eend $?
}
restart() {
svc_stop
while `pgrep -u ${JACKDUSER} jackd >/dev/null`; do
sleep 1
done
svc_start
}
# owner of jackd process (Must be an existing user.)
JACKDUSER="dom"
# .jackdrc location for that user (Must be existing, JACKDUSER can use
# qjackctl in order to create it.)
JACKDHOME="/home/${JACKDUSER}"
# logfile (/dev/null for nowhere)
LOG=/var/log/jackd.log
Create and save those 2 files. Don't forget to adjust JACKDUSER to the wanted user name (the same as yours I guess).
We need to make /etc/init.d/jackd executable:
Adding the script into the default run-level:
Before restarting your system or starting this script, you must be sure that jackd is configured for $JACKUSER or jackd will fail. This is because the script will read /home/${USER}/.jackdrc. If this file doesn't exist, the easiect way to create it is to run QJackCtl as explained above.
Note: You will find this boot script into the Pro-Audio Gentoo Overlay, where it is known as sys-apps/jackd-init.
Note on Realtime: Due to a limitation in the implementation of start-stop-daemon, it is not possible to start jackd in realtime mode as a non-root user by this method if using pam_limits. start-stop-daemon does not implement support for pam_sessions, meaning that changes to limits.conf have no effect in this context.
[edit] Where to go from here
Now that (hopefully) you got JACK working, you have the ability to produce sound in real-time. If you were not interested in realtime audio in the first place, you should probably have just used PulseAudio or ALSA. Assuming you wanted realtime audio, you are probably planning to make music. And to make music, you need a studio. Specifically, a music studio.
[edit] Configuring software to use JACK
Aside from JACK-only software, which is generally made for musicians, you may want other software to output or input with JACK too. How to go about this depends on the application.
[edit] Applications which support JACK natively
Some applications, for example MPlayer, support JACK natively. Often, you'll need to enable the jack use flag, which you have probably done globally already above. Remerge the packages which support that JACK use flag now.
[edit] xmms
First you need to install the jack output plugin
Then you need change the output plugin in preferences to jack Driver. If you get an error saying that you don't have your soundcard configured properly then it's likely that you don't have jackd running.
[edit] MPlayer
You can manually start MPlayer using JACK with the following command:
Or you can make JACK your default in /etc/mplay.conf and/or /etc/mplayplugin.conf:
ao=jack
If you wish to specify which jack ports you want Mplayer to connect to, then do the following:
$ mplayer -ao jack:port=[1-2]
[1-2] represents the port numbers listed as your jack system playback ports, for your device. If, for example, you use system:playback_3, and system:playback_4, for your speaker outputs, then the command would be:
$ mplayer -ao jack:port=[3-4]
[edit] MythTV
In the mythfrontend, set the Audiodevice from /dev/dsp to JACK:.
[edit] ALSA plug
ALSA contains a JACK plugin, which enables ALSA-only applications to output to JACK using ALSA's emulation plug. First, make sure that alsa-jack is installed. Usually, it comes with alsa-plugins when its jack USE flag is enabled.
pcm.jackplug {
type plug
slave { pcm "jack" }
}
pcm.jack {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}
Then, you can test it by using:
If you are satisfied, you can rename jackplug to !default to make it the default output device.
[edit] PulseAudio and JACK
An alternative to the alsa plug is to use pulseaudio.
The following will add a software volume control for pulseaudio.
pcm.soundcard-hw {
type hw
card 0
}
pcm.!default {
type pulse
slave.pcm "soundcard"
}
pcm.soundcard {
type pulse
}
ctl.soundcard-hw {
type hw
card 0
}
We need to tell pulseaudio to load the jack sink and sources.
### Load audio drivers statically (it is probably better to not load ### these drivers manually, but instead use module-hal-detect -- ### see below -- for doing this automatically) #load-module module-alsa-sink #load-module module-alsa-source device=hw:1,0 #load-module module-oss device="/dev/dsp" sink_name=output source_name=input #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input #load-module module-null-sink #load-module module-pipe-sink load-module module-jack-source load-module module-jack-sink ### Automatically load driver modules depending on the hardware available #.ifexists module-udev-detect.so #load-module module-udev-detect #.else ### Alternatively use the static hardware detection module (for systems that ### lack udev support) #load-module module-detect #.endif
After that, you should be able to use pulseaudio with jack.
Kill it withOne PulseAudio JACK Sink and one PluseAudio Jack Source must appear into qjackctl.
As many programs are now using pulseaudio, those settings will enable them to use jack. Even Phono from kde will work with it. If it doesn't, launch the Pulse Audio Device Manager:[edit] Jack2 Dbus Configuration
If you use use the "dbus" flag with jack, it becomes easier to add pulseaudio to the mix. Emerge qjackctl and jack-audio-connection-kit with dbus, and follow the directions at https://wiki.archlinux.org/index.php/PulseAudio#PulseAudio_through_JACK_the_new_new_way to get pulseaudio to startup. This is more stable and reliable, as it ensures that jack always starts first.
[edit] Jack and Loopback device as Alsa-to-Jack bridge
If you don't want any other audio layer such as Pulseaudio, etc, in between Jack and the lower level layer (ALSA), you can make a permanent bridge between ALSA and JACK with the ALSA Loopback device. This will work with any ALSA software inclusive firefox and flash. This more complex but more robust approach is well documented in this document: Jack and Loopback device as Alsa-to-Jack bridge.
[edit] Any application that uses OSS
OSS applications are not so easy to get running with jack. One way which does not seem to work is the oss -> aoss -> alsa -> jack chain. Another possibility is to to use a sound daemon like arts (which can be configured to use jack as backend), this results in the chain: oss -> arts -> jack, which only works for playback though. Yet another solution is to use oss2jack, which allows you to do oss -> jack directly, but requires some work (which is rewarded by a high compatibility, every oss application I tried worked). The fusd-kor ebuild did not work for me, the compilation failed. Finally, you could also use PulseAudio, but not all applications support it, and it generally adds a bit of latency.
[edit] oss2jack
Note : The following is outdated because oss2jack is masked (depend on the realtime-lsm module).
We need to get oss2jack and fusd-kor, both have not been integrated into the official portage tree, but are available here: http://gentoo-sunrise.org/svn/reviewed/media-sound/oss2jack/ (please view the relevant docs on PORTDIR_OVERLAY if you don't know how to use external ebuilds with emerge). The fusd-kor ebuild did not work for me, so I installed fusd-kor manually following the instructions from http://fort2.xdas.com/~kor/oss2jack/install.html - substituting the kfusd/kfusd.c with the file from http://hg.konstruktiv.org/fusd/file/2df3a93d0724/kfusd/ (the changes were needed for >= 2.6.19 compatibility).
Create two new files, /etc/modprobe.d/fusd and /etc/udev/rules.d/30-fusd.rules:
alias /dev/fusd kfusd alias /dev/fusd/control kfusd alias /dev/fusd/status kfusd
Afterwards run update-modules.
SUBSYSTEM=="fusd", NAME="fusd/%k", GROUP="audio", MODE="0666"
Then, after adding "media-sound/fusd-kor-1.10.11" to /etc/portage/profile/package.provided continue with
Now everything should be working: - make sure jackd is running - modprobe kfusd (this should spawn devices called /dev/fusd/control and /dev/fusd/status) run oss2jack (or oss2jack -n X if you want oss2jack to be accessible via /dev/dspX), this should create the devices /dev/dsp (or /dev/dspX if you used the -n parameter) Run your oss application, and point them to the /dev/dsp devices which you assigned to oss2jack. Enjoy!
[edit] Firefox
[edit] Needed Softwares
Be sure to install firefox, mplayerplug-in, netscape-flash, nspluginwrapper and libjackasyn.
I use the mplayerplug-in because it will play more video formats than gnome-mplayer or gecko-mediaplayer at that time of writing (February 2009).
On amd64, be sure to install the last netscape-flash version. Also on amd64, if mplayerplug-in fail due to "cannot find -lgio-2.0", see bug238990 and emerge it without the -gtk USE flag.
[edit] Configuration
You will need the ALSA plug into your asoundrc file as explained before.
Mplayerplug-in must be configured to use JACK by default, and ALSA if JACK is not running.
ao=jack,alsa
[edit] Netscape-flash, very old way
For netscape-flash to work with firefox and JACK, you must launch firefox with:
Note: After my last system update, jacklaunch just hangs. The good news is that flash in firefox works with jack as usual:
[edit] Netscape-flash, old way
After a system update, I was getting no sound with mplayer. I removed ~/.asoundrc and mplayer was working again, as well than all the other audio softwares, but at the exception of netscape-jack. After a while, I found a jack plugin for the flash player. It is into the pro-audio overlay, so it is just to run
This is with the last svn jack2 code from the pro-audio overlay, and I don't use a .asoundrc file anymore. Just start firefox as usual.
[edit] Netscape-flash, new way
Use the ALSA Loopback device as explained before.
[edit] Test
You must now be able to play the videos at www.humanitysong.org with JACK and Firefox.
[edit] Timidity++
It is possible to run timidity++ as a MIDI server for jack. This way, timidity++ will appear into QJackCtl like 4 ALSA MIDI input ports. You can use it in order to play your MIDI files if your sound card lack a MIDI synthesizer, (or if you want to use big sound fonts...).
You must have the jack use flag for Timidity++.
[edit] Starting the Timidity++ server at boot time
In order to start the JACK Timidity++ server at boot time, jackd must be running and Timidity++ must be run under the same user than jackd.
When installing Timidity++, emerge will install the boot script, and you will have to modify it. Here are the modified files:
#!/sbin/runscript
depend() {
after alsasound esound
if [ "${TIMIDITY_OUT}" = "-Oj" ]; then
need jackd
fi
}
start() {
ebegin "Starting TiMidity++ Virtual Midi Sequencer"
test -n "$TIMIDITY_PCM_NAME" && export TIMIDITY_PCM_NAME
start-stop-daemon --start --background \
--make-pidfile --pidfile /var/run/timidity.pid \
-c ${TIMIDITY_USER} \
--exec /usr/bin/timidity -- -iA ${TIMIDITY_OUT} ${TIMIDITY_OPTS}
eend $?
}
stop() {
ebegin "Stopping TiMidity++"
start-stop-daemon --stop --quiet --pidfile /var/run/timidity.pid
eend $?
}
# TIMIDITY_OPTS # Command line arguements to be passed to timidity. -iA is always used # Common options: # -Os : Output to ALSA pcm device # -Oe : Output to esd # -On : Output to NAS # -Oj : Output to JACK # # -B<n>,<m> : Set number of buffer fragments(n), and buffer size(2^m) # # -EFreverb=0 : Disable MIDI reverb effect control # -EFreverb=1[,level] : Enable MIDI reverb effect control # `level' is optional to specify reverb level [0..127] # This effect is only available in stereo # (default) # -EFreverb=2 : Global reverb effect #TIMIDITY_USER # User that will run the daemon. If not using output to JACK, # leave the default "root". TIMIDITY_USER="dom" TIMIDITY_OUT="-Oj" TIMIDITY_OPTS="-B2,8 -EFreverb=0" # TIMIDITY_PCM_NAME # This option can be used to choose an alternate ALSA pcm device. This will # be most useful for users of the dmix alsa plugin or those with multiple # cards. If you don't know what this is, chances are you want the default. #TIMIDITY_PCM_NAME="default"
Don't forget to adjust TIMIDITY_USER to the same user than defined into /etc/init.d/jackd
Adding the script into the default run-level:
[edit] Netjack
With Netjack it's possible to transport audio over a network. Netjack is more complicated to set up than media-sound/pulseaudio, but has an additional benefit. Playing audio over a network is easy with PulseAudio, but editing is not really possible. Yes, you can edit with media-sound/jokosher when media-plugins/alsa-plugins is installed with pulseaudio, but it is buggy. A much better solution is something like media-sound/audacity with jack.
[edit] Homework
Before starting, read up on some concepts in the walk through. A Linux User article offers sound information too.
You should now know that a slave is where the applications are, but audio hardware is not. A master is located where the audio hardware is, but the applications are not.
[edit] Installation
[edit] Master
Install > media-sound/jack-audio-connection-kit-0.109.2-r1 with alsa:
Under alsamixer make sure that PCM is > 0.
[edit] Slave
Install media-sound/jack-audio-connection-kit with -alsa . netjack is now deprecated.
Make sure your applications such as media-video/mplayer are built with jack.
[edit] Running
[edit] Sound server on Master
Run the Master sound server:
00:0b.0 Multimedia audio controller: ESS Technology ES1969 Solo-1 Audiodrive (rev 01)
can produce a nasty mmap-based access error:
jackd 0.116.2 Copyright 2001-2005 Paul Davis 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. 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: mmap-based access is not possible for the capture stream of this audio interface ALSA: cannot configure capture channel cannot load driver module alsa
There is some problem with ESSSolo capture ports because specifying just playback is successful:
jackd 0.116.2 Copyright 2001-2005 Paul Davis 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. loading driver .. creating alsa driver ... 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 playback: 16bit little-endian ALSA: use 2 periods for playback
[edit] Sound server on Slave
jackd 0.118.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
Memory locking is unlimited - this is dangerous. You should probably alter the line:
@audio - memlock unlimited
in your /etc/limits.conf to read:
@audio - memlock 2335920
JACK compiled with System V SHM support.
loading driver ..
creating net driver ... net_pcm|48000|1024|3000|2|2|transport_sync:1
-r, because realtime hasn't been setup here.
[edit] Connect Slave to Master
On Master:
jack_netsource -H host-name Connected :-)
This produces a response on the running jackd on Master and Slave.
The netsource ports then need to be connected to the system ports. They can be listed with
system:playback_1 system:playback_2 netjack:capture_1 netjack:capture_2 netjack:capture_3 netjack:playback_1 netjack:playback_2 netjack:playback_3
On Slave:
Boom: sound erupts from your speakers.
media-sound/qjackctl is a gui for connecting Jack ports. However, because we are working on Master, which doesn't have a graphical environment to run such applications the connections have to be constructed manually with jack_connect.
[edit] Automating Netjack
[edit] Master
jackd -d alsa -P & sleep 2s jack_netsource -H mr-noisy-as & sleep 2s jack_connect system:playback_1 netjack:capture_1 jack_connect system:playback_2 netjack:capture_2
The sleeps allow time for things to connect up.
[edit] Slave
#!/bin/bash
if [ "`ps x | grep "jackd" | grep -v grep`" == "" ];then
jackd -r -d net 1>/dev/null 2>/dev/null &
fi
[edit] Troubleshooting
[edit] cannot load driver module alsa
If get something like the following when trying to start jackd:
| Code: jackd |
loading driver .. creating alsa driver ... hw:0 |
I got this first but it can easily be corrected by lowering the Frames/Period setting. Use -p option to jackd or qjackctl to do this.
[edit] Failed to start jackd
If you are having problems starting jackd as a normal user and it is failing with errors like:
| Code: Output |
cannot create /var/run/jack/jack-1000 directory (Permission denied) cannot create server sockets cannot create engine |
then check the ownership of /var/run/jack as it may be set to root:root. Running the following as root will fix this and allow users in the audio group to start jack:
[edit] Could not open/initialize audio device -> no sound.
If you get this message trying to have mplayer play sound through Jack, probably Jack support isn't compiled into your mplayer. You will need to get libbio2jack before attempting a compile.
If you have a recent bio2jack version, you may run into a little compatibility problem while compiling with jack support enabled. It turns out that 'JACK_GetJackLatency' has been changed to 'JACK_GetJackOutputLatency' in one of the recent bio2jack versions. All that is needed is to make two or three small changes to ao_jack.c and it will compile fine. The CVS version of MPlayer already contains a better JACK output driver that doesn't use libbio2jack at all.
[edit] Cannot use real-time scheduling
If you are unable to use realtime scheduling as a normal user (in spite of properly configured PAM/set_rlimits), and get errors like:
| Code: Output |
cannot use real-time scheduling (FIFO at priority 10) ... (1: Operation not permitted) |
then please see 'Kernel configuration'.
[edit] Kernel <= 2.6.24
[edit] realtime-lsm (deprecated from a long time ago and removed since 2.6.24)
Kernel versions before 2.6.24 can use realtime-lsm. If you have a newer kernel, or if you can anyway, please use the RLIMITS option below.
| Linux Kernel Configuration: Kernel Config for Jack |
Processor type and features --->
Preemption Model (Preemptible Kernel (Low-Latency Desktop)) --->
[*] Preempt The Big Kernel Lock
Security options --->
[*] Enable different security models
Security options --->
<M> Default Linux Capabilities
|
Compile and install your kernel, and then reboot. Now enable the caps USE flag and emerge realtime-lsm:
The easiest way to make sure it gets loaded at boot time is to add it to /etc/modules.autoload.d/kernel-2.6:
Make sure you added the user who should be capable of using realtime features to the group realtime, which gets created by realtime-lsm. You can check that the realtime module is in use in the qjackctl status window.
[edit] RLIMITS
[edit] With PAM
Make sure you have PAM version 0.99 or later installed.
Then edit /etc/security/limits.conf:
# rtprio @audio - rtprio 90 @audio - nice -5 @audio - memlock 500000
Save and close. Log out and log back in, and you should have realtime capabilities if you're in the audio group.
[edit] Without PAM
If you do not want or cannot use PAM, there is a tool to set RLIMITS priorities, called set_rlimits.
- Untar it and see the included README and manpage what to do with it ;)
- A sample set_rlimits.conf entry could look like this:
@audio /usr/bin/jackd nice=-1 rtprio=85 @audio /usr/bin/qjackctl nice=-1 rtprio=84 @audio /usr/bin/ardour nice=-1 rtprio=83 @audio /usr/bin/hydrogen nice=-1 rtprio=82 @audio /usr/bin/jackeq nice=-1 rtprio=81 @audio /usr/bin/jack-rack nice=-1 rtprio=80 @audio /usr/bin/jamin nice=-1 rtprio=79 @audio /usr/bin/qsynth nice=-1 rtprio=78 @audio /usr/bin/rosegarden nice=-1 rtprio=77 @audio /usr/bin/seq24 nice=-1 rtprio=76 @audio /usr/bin/specimen nice=-1 rtprio=75 @audio /usr/bin/vkeybd nice=-1 rtprio=74 @audio /usr/bin/zynaddsubfx nice=-1 rtprio=73 @audio /usr/bin/ams nice=-1 rtprio=72 @audio /usr/bin/amsynth nice=-1 rtprio=71
Note: this sample is respectfully taken from: http://ubuntustudio.com/wiki/index.php/Breezy:Using_set_rlimits
There is also an ebuild for set_rlimits in ProAudio overlay http://proaudio.tuxfamily.org/wiki/index.php?title=Main_Page
