Typo
[linux_from_scratch_hints.git] / OLD / ardour.txt
blobfbee1d3f3fce1a23b8e572872e9d65e42b29b46c
1 TITLE:          Ardour Hint
2 LFS VERSION:    any using gcc 3.x
3 AUTHOR:         Alex Kloss <alex@22-music.com>
4 DATE:           2003-08-20
5 CATEGORY:       Audio/Multimedia
6 SYNOPSIS:       Ardour is a multitrack sound recorder/editor/mixer.
7 DESCRIPTION:    Ardour itself is easy enough to install, but needs a lot
8                 of additional fiddling (RT-Kernel patch, Jack Server and
9                 Ladspa).
10 HINT:
12 Downloads and Prerequisites:
13 ============================
15 ardour          http://ardour.sourceforge.net -> release or CVS version
16 JACK            http://jackit.sourceforge.net -> release version
17 glib/gtk+       http://www.gtk.org -> 1.2.8 or newer, but not 1.3 or 2.0!
18 libxml2         http://www.xmlsoft.org -> 2.5.X
19 libart_lgpl     on your local GNOME mirror, see BLFS section
20 libsndfile      http://www.zip.com.au/~erikd/libsndfile -> 1.0 or higher
21 libsamplerate   http://www.mega-nerd.com/SRC/ -> 0.0.13 or newer
22 LADSPA SDK      http://www.ladspa.org -> SDK and plugins of your liking
23 raptor          http://www.redland.opensource.ac.uk/raptor -> release
24 liblrdf         http://plugin.org.uk/lrdf/ -> 0.3.1 or higher
26 and the RT-Scheduling-Patch for your kernel version:
27                 http://www.zip.com.au/~akpm/linux/schedlat.html
29 Ardour requires to use ALSA as sounddriver.
31 Installation order:
32 ===================
34  - Kernel Patch for RealTime Scheduling
35  - ALSA sounddriver (if not already available, remember that the
36    reinstallation of the kernel removes everything in the modules
37    directory, so you may have to reinstall the driver)
38  - glib
39  - gtk+
40  - libxml2
41  - libsndfile
42  - libsamplerate
43  - LADSPA SDK (plus the plugins you want)
44  - JACK
45  - raptor
46  - liblrdf
47  - ardour
49 There are already hints and/or BLFS sections for ALSA, glib, gtk,
50 libxml2, so these packages will not be discussed again. Please refer to
51 their instructions.
53 Discussion: Starting Jack/Ardour as root or patching the kernel:
54 ================================================================
56 If your system is faster than the average (and even a slow hdd can
57 kill that advantage) or you don't think you need Realtime scheduling,
58 you can leave all following instructions about the kernel undone.
60 There are 2 ways of starting JACK (and thusly ardour) with realtime
61 latency, once your kernel is patched:
63  - start jack as root (need to start ardour as root, too; insecure)
64  - apply givertcap patch:
66    edit /usr/src/linux/include/linux/capability.h:
68    where it says:
70 #define CAP_INIT_EFF_SET    to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
71 #define CAP_INIT_INH_SET    to_cap_t(0)
73    change the lines so it will read:
75 #define CAP_INIT_EFF_SET    to_cap_t(~0)
76 #define CAP_INIT_INH_SET    to_cap_t(~0)
78    and go on with patching your kernel for RT scheduling.
80 I myself prefer the last way, but you may choose yourself.
82 Patching your kernel:
83 =====================
85 cd /usr/src/linux # (or wherever you have your kernel sources)
86 bzcat <patch> | patch -Np1 # fill in the appropriate name for "<patch>"
87 make menuconfig # and select real time scheduling
88 make dep
89 make clean
90 make bzImage
91 make modules
92 make modules_install
94 now copy the bzImage in arch/<arch*>/boot/ to /boot, edit your
95 /etc/lilo.conf to your needs and run lilo [*fill in whatever is
96 appropriate, this will be i386 in most cases]. Now restart your system.
99 Install ALSA, glib, gtk+ and libxml2 (when in doubt, look at the related
100 BLFS section/hints).
102 Installing every other package:
103 ===============================
105 all those packages are easy enough installed with
107 ./configure --prefix=/usr &&
108 make &&
109 make install
111 Starting ardour:
112 ================
114 To start ardour, you need to ensure no other process is holding the
115 sound devices, start the jack server and then ardour and don't forget to
116 remove the jack server afterwards. Because we're a lazy bunch, well do
117 that with a script. You'll have to edit it to your needs
119 --snip
120 #!/bin/bash
122 # Ardour Startscript
124 # Variable declarations
125 JACKD=jackstart
126 JACKOPTS="-a -R -d alsa -d ice1712 -p 512"
127 # replace "ice1712" with your soundcard's identifier!
128 JACKD_ALREADY_RUNNING=0
130 # find out whether jackd is already running
131 for i in /proc/*/cmdline; do
132  CMDLINE=$(<$i)
133  if [ "$CMDLINE" != "${CMDLINE#$JACKD}" ]; then
134   JACKD_ALREADY_RUNNING=1
135  fi
136 done
138 # if jackd isn't yet running, we start it
139 if [ "$JACKD_ALREADY_RUNNING" = "0" ]; then
140 # but first we need to kill all processes that locks sound devices
141  fuser -k /dev/admmidi? /dev/adsp? /dev/amidi? /dev/audio* /dev/dmfm* \
142   /dev/dmmidi? /dev/dsp* /dev/dspW* /dev/midi0? /dev/mixer? /dev/music \
143   /dev/patmgr? /dev/sequencer* /dev/sndstat >/dev/null 2>&1
144  if [ -d /proc/asound/dev ]; then
145   fuser -k /proc/asound/dev/* >/dev/null 2>&1
146  fi
147  if [ -d /dev/snd ]; then
148   fuser -k /dev/snd/* >/dev/null 2>&1
149  fi
150 # and now start jack
151  $JACKD $JACKOPTS &> /dev/null &
154 # now we are ready to start ardour with all options we were called with
155 ardour -n "$@"
157 # afterwards, if jack wasn't already running (we presume that would be
158 # for a reason), kill the jackd.
160 if [ "$JACKD_ALREADY_RUNNING" = "0" ]; then
161  for i in /proc/*/cmdline; do
162   if [ "$(<$i)" = "$JACKD$(echo $JACKOPTS | sed s/\ //g)" ]; then
163    pidbackup=${i#/proc/}
164    pid=${pidbackup%/cmdline}
165    kill -9 $pid
166   fi
167  done
170 # end of ardour-start
172 --snap
174 copy that script to /usr/bin/ardour-start and run
176 chmod 755 /usr/bin/ardour-start
180 CHANGELOG:
182 2003-08-20      First Version of the hint.