fix potential crash-causing coding errors when removing regionviews from the selection
[ardour.git] / DOCUMENTATION / FAQ
1 The Ardour FAQ
2 January 23, 2004
3
4 --Problems--
5 1.1.  Why can't I get configure to run when ...
6 1.2.  I'm getting syntax errors during build.
7 1.3.  I get the warning: "Gtk-WARNING **: Unable to locate image file in 
8 1.4.  What's an xrun?
9 1.5.  The region area overlaps the buttons in the editor.
10 1.6.  Ardour keeps freezing.  Here's the strace...
11 1.7.  What is "ardev" and why is it a shell script?
12 1.8.  How do I debug this thing?
13 1.9.  I want Ardour to run faster.
14
15 --Features--
16 2.1.  Are plugins supported?
17 2.2.  Are VST plugins supported?
18 2.3.  Does Ardour run on non-Linux systems?
19 2.4.  Ardour needs to have this feature now.
20 2.5.  Why doesn't Ardour support MP3s?
21 2.6.  Does Ardour support MIDI?
22 2.7.  What soundfile formats are supported?
23 2.8.  Can I use multiple cards?
24 2.9.  How do I save captures across partitions?
25
26 --Usability--
27 3.1.  How do I pan stereo outputs?
28 3.2.  Where's the patch bay?
29 3.3.  How do I do stuff?
30
31 --Misc--
32 4.1.  What's the deal with JACK, LAAGA, and Audioengine?
33 4.2.  Is Ardour internationalized?
34 4.3.  How do I get support?
35 4.4.  Well, where's the manual?
36 4.5.  Why are all these libraries included? I already have ...
37 4.6.  Why not another frontend to libardour?  Why not QT?
38
39 --------------------------------------------------------------------------------
40
41 --Problems--
42 1.1.  Why can't I get configure to run when ...
43
44 You can only run configure at the top level of the Ardour source
45 tree.  You don't want to know why this is true.  Don't try to work
46 around it.
47
48 1.2.  I'm getting syntax errors during build.
49
50 This probably means that you are using an out of date library.  Or you
51 might be using a very new library that has changed its API.  Check the
52 version number.  If it is lower than what is listed in the BUILD file, 
53 update your library.  If it is higher than what is listed in the BUILD file, 
54 email the mailing list.  Note that you have to be a member of the mailing 
55 list to send mail to it, which is done to prevent the list from receiving
56 much spam.
57
58 1.3.  I get the warning: "Gtk-WARNING **: Unable to locate image file in 
59         pixmap_path: "set-next-button.xpm"
60
61 The most common cause of this error is simply that you have not set 
62 the pixmap pathname correctly.  It can be specified in the Ardour 
63 config file. See the BUILD file.
64
65 1.4.  What's an xrun?
66
67 It's a generic term used to describe a situation where the software
68 did not keep up with the hardware, either by feeding it data, or by
69 collecting data from it.  It generally means that you're having
70 trouble with latency.  This can be caused by several factors.  You
71 could have a misconfigured system, you might be trying to do to much,
72 or both.
73
74 If you're haven't read http://www.linuxdj.com/audio/lad/resourceslatency.php3,
75 then your system is probably misconfigured.
76
77 If you are running many many tracks, with multiple LADSPA plugins, then it
78 is possible that your system just can't keep up with what you want to do.
79 Either simplify your music, or upgrade your machine.  A dual processor does
80 wonders.
81
82 You can test your setup with the latencytest tool, available at
83 http://www.linuxdj.com .
84
85 Jan Depner's HOWTO is loaded with latency tuning tips for Ardour:
86 http://myweb.cableone.net/eviltwin69/ALSA_JACK_ARDOUR.html
87
88 1.5.  The region area overlaps the buttons in the editor.
89
90 Make sure that you are using the appropriate font size for your monitor's
91 resolution.  If you are running at 1024x768 or below, you should use the
92 75dpi package, not the 100dpi.  This is usually set in /etc/X11/XF86Config.
93
94 1.6.  Ardour keeps freezing.  Here's the strace...
95
96 The results from strace aren't very useful.  To provide helpful information 
97 to the developers, run Ardour under gdb. If you don't know how to use
98 gdb, this isn't the time to learn. If you do know how to use gdb, read
99 section 1.8.
100
101 1.7.  What is "ardev" and why is it a shell script?
102
103 This is only applicable if configure was run with --enable-development-build.
104
105 To speed up the process of developing Ardour, we do not statically
106 link Ardour and its library, libardour. Instead, we use dynamic
107 linking, which allows the developers to avoid the (very) long
108 relinking step when they make certain kinds of changes to libardour. 
109
110 This means that the executable image for Ardour relies on the system
111 being able to find libardour whenever you start it. Rather than leave
112 this to chance and/or the whims of your system adminstrator (probably
113 yourself), we instead use a short shell script to make sure that the
114 connection between the two of them can be established. 
115
116 This has almost zero impact on any aspect of Ardour's operation. The
117 only noticeable effect is that it makes debugging slightly more
118 difficult. See 1.8 for more on this.
119
120 1.8.  How do I debug this thing?
121
122 +-------------------------------------------------------------------------+
123 | NOTE: Newer versions of gdb and/or glibc and/or the kernel have broken
124 | gdb in a critical way that make it impossible to run ardour. The gdb
125 | development group claim to have fixed this, but on many
126 | distributions, the version that is provided is still broken.
127 |
128 | Under such circumstances, you will have to get a core dump from
129 | ardour, and then use gdb to analyse the core dump, rather than 
130 | using gdb as a "live tool". 
131 |
132 | Many distributions set the default core dump size to 0, to prevent
133 | core dumps completely. So the first step is to do enter this
134 | at your shell prompt (in a terminal window):
135
136 |    ulimit -c 9999999999
137 |
138 | Then run ardour in whatever way causes a crash. after the crash
139 | you should find a file called "core" in your working directory.
140 | then run:
141 |
142 |    gdb ardour core
143
144 | When the gdb> prompt appears, type
145 |
146 |    backtrace
147 |
148 | Collect the output, and file it as an attachment to a Mantis
149 | bug report at http://ardour.org/mantis
150 |
151 | Thanks for helping to improve Ardour.
152 +------------------------------------------------------------------------+
153
154 A) How to start gdb ....
155
156 A1) IF YOU DID NOT USE --enable-development-build
157
158 You can use gdb the usual way:
159
160     % cd /where/you/built/ardour
161     % gdb ardour
162
163
164 A2) IF YOU USE --enable-development-build
165
166 The first and most basic thing you need to know is how to invoke
167 gdb. Because of the dynamic linking between Ardour and its library you
168 can't just invoke Ardour and get it to work. Besides, "ardour" itself
169 is a shell script (see 1.10 for more on this). So, what you need to do
170 is to invoke gdb with LD_LIBRARY_PATH set to point to the place where
171 libardour is installed, and use the name of actual executable image.
172
173 If you installed in the default location, this command will invoke gdb
174 correctly: 
175
176   env LD_LIBRARY_PATH=/usr/local/lib/ardour gdb /usr/local/lib/ardour/ardourx
177
178 If you used a --prefix argument during the build process so that
179 Ardour would be installed somewhere other than under /usr/local, then 
180 replace /usr/local in the command above with whatever "prefix" you
181 used.
182
183 You could easily make the above a shell alias or a 1 line shell script
184 if you think you'll be debugging Ardour with gdb a lot.
185
186 A3) ABOUT LADSPA PLUGINS AND GDB
187
188 Moving all your LADSPA plugins out of the way will make gdb very much
189 quicker to start. For example, if you normally keep them in
190 /usr/local/lib/ladspa, you could do something like:
191
192      mkdir /usr/local/lib/LADSPA
193      mv /usr/local/lib/ladpsa/* /usr/local/lib/LADSPA
194      
195 gdb doesn't do very well when forced to handle dozens of dynamically
196 loaded objects, as typically happens with LADSPA plugins.
197
198 It might be easier to redefine LADSPA_PATH to a dummy path.
199
200 B) What to do with gdb
201
202 When Ardour has crashed or is "stuck", issue the following command 
203 to gdb (you will need to use Ctrl-C if its "stuck" to get back to the
204 gdb command prompt):
205
206    thread apply all bt
207         
208 collect the output from this, and then go to 
209
210         http://ardour.org/mantis 
211
212 and file a new bug report with the output attached.  This will allow
213 us to get the most out of your misfortune. 
214
215 If you compiled ardour from source and want to be even more helpful,
216 recompile it after running
217
218          ./configure --disable-optimize
219
220 at the top level. This will make the debugging output more useful.
221
222 1.9.  I want Ardour to run faster.
223
224 The --enable-optimize flag is enabled by default which turns
225 on compiler features that can make Ardour run up to 50% faster.  
226 If you downloaded Ardour as a binary package, it should have been
227 compiled with that flag already.  
228
229 --Features--
230 2.1.  Are plugins supported?
231
232 LADSPA plugins are supported.  To use them, click the middle mouse
233 button in the top box at the top of the mixerstrip you wish to have a
234 plugin for.  This opens up a window which lists all the plugins.  Double
235 click on the one you wish to use.  In the mixer window, click on the
236 plugin to toggle it on and off, option-click to edit its values, or
237 shift-click to remove it.
238
239 2.2.  Are VST plugins supported?
240
241 There are several issues here:
242
243 1) Generic VST support
244
245    Many people have asked about VST support within Ardour. Work has been
246    done on this, but there are both license issues and technical
247    ones. The licensing issues seem relatively easy to resolve.
248
249    On the technical front, given that the goal is to not require VST
250    developers to build new native Linux versions of their plugins, the
251    most promising approach involves using Wine to support native
252    Windows VST plugins. It is already possible to run most VST plugins as
253    JACK clients and thus use them as inserts with Ardour, but the process
254    of doing so is not what most users would term "convenient".  
255
256    However, Wine cannot currently be used within a complex
257    multithreaded application. The Wine development team are working on
258    this, and as a rough guess, I'd expect progress within about 6 months
259    (i.e end of 2003). At that time, it will be possible to use most VST
260    plugins that have their own GUI ("editor") from within Ardour.
261
262    However, initially, this functionality will be available only as
263    part of a for-cost distribution of Ardour. 
264
265 2) Specific plugins
266
267    a) executable format issues
268
269    Plugins are pieces of executable code.  The format used for
270    the files that store this code is different under windows
271    and macos than it is for linux.  Some people have managed
272    to find workarounds for this --- there are reports of people
273    running windows-derived buzz plugins under linux, but nobody
274    has looked into trying it with vst plugins.
275
276    Linux also runs on a lot more hardware than windows or MacOS.  
277    We assume that when you say linux, you mean "linux on an intel
278    compatible processor", but keep in mind that to most of us, 
279    linux means more than that --- it includes the PPC, Sparc, Alpha,
280    ARM, MIPS and many other chip architectures.  Of that list,
281    only PPC has any VST plugin support at all.
282
283    This problem would go away if a VST plugin was available as source
284    code, but to my knowledge, only 1 is (freeverb).
285
286    b) OS dependency issues
287
288    Most VST plugin writers do not follow Steinberg's design advice,
289    and write plugins that have operating system dependencies.  As
290    a result, even if you could find a way to actually use, say, 
291    a windows-format VST plugin on Linux on an Intel machine, the
292    plugin would contain calls to operating system services that
293    don't exist (in the same way) under Linux.
294
295 So, the basic answer is "no".  I am an active member of the VST-plugins
296 mailing list, and I try to encourage people who write free plugins to
297 make their source code available so that we can use it under Linux, as
298 well as reminding people to try to avoid operating system dependencies
299 in their plugins.  I think this mostly falls on deaf ears.
300
301 2.3.  Does Ardour run on non-Linux systems?
302
303 Ardour depends on the JACK system to access the sound hardware.  Jack
304 has (as of this writing) support for Linux, Solaris, and MacOSX.  There
305 have not been any reports of running Ardour on any platforms besides Linux
306 though.
307
308 In addition, Ardour has abstracted the JACK dependency, so it can be ported 
309 to use another sound library.  But at the time, it only uses the JACK 
310 library.  The JACK website is http://jackit.sf.net/.
311
312 2.4.  Ardour needs to have this feature now.
313
314 Paul accepts donations through his paypal account.  The feature will 
315 (probably) be added more quickly if you pay him.  Contact him first.  
316
317 2.5.  Why doesn't Ardour support MP3s?
318
319 Ardour is meant for serious audio work.  MP3 is a lossy format
320 unsuitable for this.  Ardour does export sessions to wav format, which
321 is trivial to convert to MP3.
322
323 2.6.  Does Ardour support MIDI?
324
325 Ardour currently supports MIDI in the sense of:
326
327  * functioning as a MIDI Timecode master (it generates MTC)
328  * functioning as a MIDI Timecode slave (experimental; send reports!)
329  * understanding MIDI Machine Control
330  * allowing the user to bind GUI controls (sliders, etc.) to
331      MIDI Continuous Controller and NoteOn/NoteOff messages
332
333 It does not offer any facilities for editing or arranging or recording
334 or playing MIDI data.  There has been talk of integrating Midi
335 Mountain, an excellent midi editor.  There hasn't been any progress in
336 this direction lately, mostly due to other areas that need to be fixed
337 up.  It's not a trivial affair if the integration is going to proceed
338 in a way leaves the result feeling "natural".
339
340 2.7.  What soundfile formats are supported?
341
342 It depends on what version of libsndfile is installed.  This link lists the
343 latest formats: http://www.mega-nerd.com/libsndfile/#Features
344
345 Please note that Ardour requires the 1.x series of libsndfile.
346
347 2.8.  Can I use multiple cards?
348
349 In a word: maybe.
350
351 The sync issues that arise even between the same make and model of a card 
352 aren't worth the effort of fixing.  If you want to have more than two 
353 channels, buy a professional card.
354
355 On the other hand, if you already have two professional cards with word-sync,
356 you might be able to get them to work.  This is several layers removed from
357 Ardour; the proper place to ask for help is at http://www.alsa-project.org .
358
359 There is more information at http://www.linuxdj.com/audio/quality/#multi
360
361 2.9.  How do I save captures across partitions?
362
363 Ardour lets you specify multiple directories to save captured audio
364 in.  In the options editor, in the session path box, specify the full
365 paths of the directories you wish to use, seperated by colons (:).
366 These can be on different partitions or even different disks.  Using
367 this "software RAID"-like setup can greatly increase your disk
368 bandwidth.
369
370 --Usability--
371 3.1.  How do I pan stereo outputs?
372
373 Panning works over JACK ports.  So even if you have two outputs
374 connected to one port, Ardour doesn't consider this to be stereo.  You
375 need to make sure that you have two ports, and then add one (or more)
376 destination to each port.
377
378 You need to think of the ports as if they were physical sockets to
379 which you can connect as many plugs as you want. A single port means
380 mono, even though you can send the signal to many different
381 places. Two ports means stereo, even though the right and left signals
382 can each go to any number of different places.
383
384 3.2.  Where's the patch bay?
385
386 There is no separate dedicated patch bay. Patch bay functionality
387 is integral to the mixer. The mixer can have any number of inputs,
388 any number of busses, etc. In other words, it *is* the patchbay.
389
390 3.3.  How do I do stuff?
391
392 Region Dragging (object mode)
393 -----------------------------
394
395    click-drag => moves region
396    shift-click-drag => moves region with time position held constant
397                           (i.e. across tracks)
398    ctl-click-drag => moves a copy of the region
399    ctl-shift-click-drag => time-constrained movement of a copy of the
400                             region
401    snapmod-click-drag  => ignores current snap setting
402
403 Region Alignment (clicks without motion)
404 ----------------
405
406  [ all alignment uses:
407        
408        1) current region selection, if it exists
409        2) else the edit cursor
410  ]
411
412    ctl-click => aligns start of region 
413    ctl-shift-click => aligns end of region
414    ctl-alt-click => aligns sync point of region
415
416 Marks
417 -----
418
419         click in tempo track to create a new tempo mark         
420         click in meter track to create a new meter mark
421         click in marker track to create a new marker
422         regular edit op for tempo/meter allows editing
423         regular delete op for all markers (except initial
424            tempo/meter markers)
425         snapmod-click-drag to move a marker while ignoring
426            current snap mode       
427
428 Editing
429 -------
430  
431  default is ctl-button3 click
432  
433
434 Deletion
435 --------
436
437  default is shift-button3 click
438
439 Context Menu
440 ------------
441  
442  button3 click
443
444 Snap Modifier
445 -------------
446
447   default is mod3 (typically meta/windows/start key). using
448   ctl or shift or alt will cause problems. you can also
449   use combinations, but again, combinations using ctl and shift
450   will cause problems. mod3 or mod4 are probably your best
451   choices.
452
453 Selection (RANGE MODE required)
454 ---------
455
456    click on a region => make a region selection
457    shift-click on a region => add region to region selection
458    click-drag => make a range selection
459    shift-click-drag => add to range selection
460    ctrl-click-drag => move selection
461
462 Separation 
463 ----------
464   
465    in range mode:
466
467       a) make a single range selection
468
469    then, to split existing region apart
470
471       b) right click => Selection => Separate region
472
473     OR, to creates a new region without splitting original
474
475       b) switch to object mode
476       c) click on selection and drag
477
478
479 solo/mute/rec-enable
480 --------------------
481
482     to toggle solo/mute/RE for EVERYTHING:
483      
484           ctl-shift-click on a solo/mute/RE button
485
486     to solo/mute/RE mix group (when group is not active)
487     
488           ctl-click on solo/mute button
489
490     to toggle solo-safe status (which appears to not work
491          correctly right now)
492
493          shift-click on solo button
494    
495     to momentarily engage solo while pressing a mouse button
496
497          use button2 instead of button1
498
499
500 gain sliders
501 ------------
502
503     shift-click to reset to 0dB
504     ctl-click-drag for finer scale
505     ctl-alt-click-drag for even finer scale
506     
507 panners
508 -------
509
510     (stereo): shift-click to reset to center
511
512 --Misc--
513 4.1.  What's the deal with JACK?
514
515 JACK is the Jack Audio Connection Kit.  There is a basic problem with
516 audio+MIDI apps on Linux at this time: they are not able to exchange
517 data with each other in situations where low latency is a system goal.
518 There are systems (aRts, MidiShare, parts of alsa-lib) that allow data
519 sharing, but not when the latencies get down below 20ms.
520
521 JACK is an API that solves this problem.  Also, and quite importantly,
522 JACK drastically simplifies the programming of audio applications.
523 Applications that use JACK do not need to know anything about audio
524 hardware.  They do not interact with it directly in any way
525 whatsoever.  All they do is provide a few callbacks to the server they
526 connect with; the primary callback is responsible for producing and/or
527 consuming a specified amount of data whenever it is called.  This is a
528 'callback' model, and is extremely different from ALSA, OSS, and
529 several other audio APIs.  It is, however, very similar to Apple's
530 CoreAudio, Steinberg's ASIO, the PortAudio library, and most plugin
531 APIs. See http://jackit.sf.net/
532
533 4.2.  Is Ardour internationalized?
534 Parts of Ardour are.  Work is ongoing to fully internationlize Ardour.  If
535 you speak a language besides English, feel free to volunteer to help
536 translate.
537
538 These languages have translations:
539
540 gtk-ardour:
541 French, German, Italian, Portuguese, Brazilian Portuguese, and Russian
542
543 libardour:
544 Italian
545
546 4.3.  How do I get support?
547
548 Ardour is a volunteer project.  There is no one devoted to providing
549 support.  However, there is a members only mailing list where someone
550 might answer your question.  You can join at Ardour's website: 
551
552                   http://ardour.org/
553
554 There is also the IRC #ardour channel on the FreeNode network.
555
556 Alternatively, you can pay Paul for specific support.  Check with him
557 for hourly rates.
558
559 4.4.  Well, where's the manual?
560
561 Currently, the existing documentation is sparse.  You might want to check out
562 the Protools reference; Ardour is rather similar to it.  Also, Paul wants
563 users to be able to complete the Mackie HDR tutorial using Ardour; so that
564 is another manual to check out.  Both are available online from
565 <a href=http://digidesign.com/support/documents.html>DigiDesign</a> and <a
566 href=http://mackie.com>Mackie</a>.
567
568 There is the begining of a manual in Ardour's manual directory.  Feel
569 free to create your own HOWTOs, tips and tricks sheets, tutorials, or
570 whatever you feel like adding.
571
572 A couple people have written some documentation to get people started with
573 Ardour.  It is available at http://www.djcj.org/LAU/ardour/
574
575 4.5.  Why are all these libraries included? I already have ...
576
577 Yes, we know that it's quite likely that you already have gtkmm or
578 sigc++ installed on your machine, let alone others.  There
579 are 2 problems. 
580
581 Ardour requires either the latest version of these libraries or even a
582 version with a patch that has not yet been incorporated into a release
583 of the library.  Rather than require you to get the library source,
584 patch it, recompile and install it, Ardour keeps its own copy, builds
585 a static, private version of the library and links against it.  That
586 way, we don't have to worry about crashes caused by you having the
587 wrong version of the library. 
588
589 The second problem is more general.  C++ does not yet have a unified
590 "Application Binary Interface", even on a single process
591 architecture+OS combination.  This is unlikely to ever change (it was
592 encouraged by the inventor of C++).  This means that libraries compiled
593 with one compiler are not always compatible with applications compiled
594 with another compiler.  By "another compiler", we can mean something as
595 subtle as a different version of g++.  Worse, because many C++
596 libraries feature inlined code, we even need to be sure you compile
597 against exactly the same version of the library as other parts of
598 Ardour will use.  Even worse, there are compile time flags you or
599 someone else could give to a C++ compiler that would make the library
600 incompatible in subtle ways with code compiled with different flags.
601
602 After a year of trying to address these problems "the normal way", the
603 Ardour team gave up and decided to include every necessary library
604 that is written in C++ and/or has patches required.  You may not like
605 this very much, but trust us, you would like the alternative even
606 less.
607
608 4.6.  Why not another frontend to libardour?  Why not QT?
609
610 The GTK+ frontend to libardour is almost 7 times the size of libardour.  GUIs
611 for these sort of programs are very large and detail orientated.  It would be
612 a waste of time to try to reimplement Ardour with another widget set.  This is 
613 also why there won't be a native port of Ardour to MacOS X.