Frequently Asked Questions
General
Q: How to optimize my system for audio / midi ?
A: Using a “real-time kernel” and setting priorities appropriate is an important step here. Articles and more information about real time operation.
Audio
Q: How to setup the JACK audio server?
A:
- Use a samplerate supported by your hardware
- Use either 2 or 3 as value for periods per buffer (depends on hardware)
- start with 2048 frames per period and divide it by 2, until you get xruns (lower is better here) in general a value of 64 to 256 is possible with a real-time kernel. Use a value that does not produce xruns
- for recording you probably want to use a small period size for low latency monitoring
- for mastering, mixing or editing: raise the period size up to >= 1024 (many postprocessing effects are very CPU intense, and you do not need low latency to listen)
Q: What is an xrun?
A: A buffer-underflow (a buffer (a count of bytes or samples) is requested that has not been filled yet)
Wouldn't it be more accurate to say something like: “a buffer is not filled in time for the requesting software to use it”–or “sound data does not arrive fast enough so that the requesting software has a continuous stream of data, in other words, the requesting software runs out of sound data” (possibly adding “because some part of the system is not fast enough to keep up”)
MIDI
Q: What is the difference between Jack-Midi and Alsa-Midi?
The short answer:
Jack-Midi has been introdueced, to extend/replace alsa-midi with:
- improved timing
- sample accurate midi-event alignment
They currently co-exist.
The long answer:
kindly provided by Fons Adriaensen (2008-09-23 at linux-audio-user _AT_ lists.linuxaudio.org)
To understand how all this fits together you need to know the following.
1. The bottom layer: ALSA audio and ALSA raw midi.
On most (nearly all) linux systems these are the drivers handling audio and midi devices respectively. A program can use these directly, but then it is limited to connecting to hardware devices only.
2. Interconnecting applications and hardware: Jack and ALSA midi sequencer.
Jack can interconnect audio programs that are written to use it to each other and to an audio card. To talk to the audio card Jack uses the ALSA driver in mose cases. This is what you see in the 'AUDIO' tab in qjackctl.
The ALSA midi sequencer does the same for midi. It can connect applications to each other and to physical midi interfaces (raw ALSA ports). This is what you see in the 'ALSA' tab of qjackctl.
3. Jack midi replacing ALSA midi sequencer.
Using the ALSA midi sequencer can be hard (for a programmer) and also it has had serious problems with timing, mainly because of lack of high-resolution timer support in Linux until recent times. This has resulted in the development of midi-in-Jack, which can (almost) be used as a replacement for the ALSA midi sequencer. It has its pros and cons. This is what you see in the 'MIDI' tab in qjackctl.
Currently the two midi routing system coexist, and this leads to some confusion.
In qjackctl you have three options for midi-in-Jack:
1. 'None' - this means that Jack will not use any ALSA midi devices. Applications that use midi-in-jack (e.g. Aeolus) will still show up in the 'MIDI' tab, but you can't connect them to any physical ALSA midi ports, only to other apps (if there are any other).
2. 'Raw' - this means that Jack will grab the raw ALSA (hardware) midi devices, and convert them into Jack midi ports with rather useless names. The same devices are still shown in the 'ALSA' tab, but you will notice you can't connect them there anymore - they are usually supporting only one client, and Jack has already taken them. This means that applications that only support connecting to ALSA midi sequencer can't be connected
to physical midi devices anymore. In the dreams of the Jack midi developers, such apps will soon cease to exists, and if that happens the 'raw' option is the normal one to use.
3. 'Seq' - this means Jack will convert *all* ALSA sequencer ports into Jack midi ports. The original ones remain accessible in the 'ALSA' tab.
Example: Aeolus has both an ALSA midi sequencer port, and a midi-in-Jack port. You will see Aeolus in both the 'MIDI' and 'ALSA' tabs. If you use 'Raw', you will have to use the Jack connection to connect Aeolus to a keyboard. If you use 'Seq' you can make the connection in either system.
Also if you use 'Seq' there will be two Jack-midi ports for Aeolus: the Jack-midi port that Aeolus creates, and a Jack-midi copy of the ALSA sequencer port of Aeolus, shown as system:playback_#, with # some number.
Don't use the latter. What happens if you do that is that the midi data from your keyboard will follow a rather long route: Raw ALSA → Jack port → Jack port → ALSA sequencer → Aeolus.
The most direct route is still the one in the 'ALSA' tab: Raw ALSA → ALSA sequencer → Aeolus.
Hardware
Software
Q: Is it possible to run VST plugins on Linux?
A: Yes, there are different sollutions:
- wine with jack driver and a windows vst-host
- wine with wine-asio to jack driver and a windows vst-host (see: WineAsio Guide, wineasio download, Gentoo wineasio info
- linux-native vst pluins (only availabe for open-sourced VSTs that compile on linux) (see: Jost )
List of windows vst-hosts:
List of linux vst-hosts:
- Note: Some linux-apps can run vst plugins, if they are being compiled with appropriate options.
Related sites:
- http://quicktoots.linuxaudio.org/toots/vst-plugins/ - a more detailed introduction
- http://ladspavst.linuxaudio.org/ - Linux Compatibility of Plugins
Note: Instead of VST, you will soon prefere to use Linux plugin technologie
LADSPA, DSSI and LV2