This is an old revision of the document!


FIXME This page should structure itself around different user stories and provide some starting points and guidance for each.

Introduction

Linux audio technologies are finally coming of age. It is now possible for distributions to ship with good and reliable audio which works just off the CD (off the web, off the USB!) on much hardware. There is also pro-level audio out there, including multitrack recording, live synthesis, MIDI interaction of many sorts, filters of several sorts both live and for alteration of recordings, and tight integration with video on a number of levels.

A good place to start is very probably to see what your current favorite distro will do with your hardware. These days, if it doesn't work immediately or with just a little casual investigation (and if you have the bandwidth), the quickest way to see results is to try the LiveCDs of a variety of other distros until you find one which does work easily and immediately. Getting the very basic Linux audio to work is very much a matter of many tricky bits at the levels of distribution install and configuration, so it's best to start with a running setup if you can.

Pro audio can get different. Technologies have coalesced quite nicely around a system for realtime connection of applications and hardware called Jack or Jackd. Jack has its own needs which can conflict with some general-purpose audio elements; for this reason there are many pro audio specific distros, which will save you lots of time and frustration if this is your work.

Elements

Within audio production, most software has standardized on JACK/ALSA; however, several competing approaches towards general desktop audio still exist.

Audio Drivers

Audio drivers provide the OS with access to the audio hardware (onboard sound, sound cards/audio cards or external USB/FireWire devices). For quite a few years all applications communicated directly to the drivers, but many problems in real-world usage have emerged with this approach. Drivers are still essential – without drivers, there is no way for the OS to talk to hardware at all – but one or more layers are often used now between application and driver, and the result is very good if done well.

ALSA - the standard Linux audio interface today, for non-FireWire audio devices. It emulates OSS when required by applications.

FreeBoB/FFADO - interface for FireWire audio devices.

OSS - an audio interface that was formerly the standard in Linux. Its development is now continued outside the Linux kernel.

Higher-level Layers

PulseAudio, EsounD, GStreamer, aRts - these serve various desktop audio needs, and have lots of overlapping functionality, but are not specifically focussed towards audio production like JACK. Increasingly standard in distros is PulseAudio, it emulates others for compatibility, and is a straightforward route to get many essentials (e.g., Adobe Flash) to work easily.

JACK - conceptually similar to a patch panel. It pipes sound between different applications and is standard for most audio production apps. When Jack is used, applications connect to Jack, and Jack connects directly to audio drivers. It can provide very-low-latency communication, high-quality mixing of streams, excellent controllability, transport synchronization with built-in timestamp distribution, and other features essential for pro audio.

NetJack allows to send and receive JACK data on an IP network.

See also: Audio layers overview

Session management

Due to the modularity of the Jack audio infrastructure there is some demand for a single point where sessions can be saved and restored. Quite the collection of GUI session management systems exists: LADCCA and its successor LASH, ladish, JACK_Session, and the Non Session Manager.

Another option is writing shell scripts that restore a session. A newbie introduction to this can be found here.

A more recent system using shell scripts with a tool called aj-snapshot, robust enough for live stage use, is documented here.

Plugin formats

Linux-native plugins are fairly well standardized. Unfortunately, most softsynths on the freeware or commercial market are in VST form and thus are harder to use or less compatible.

LV2 Host - low level Linux audio plugin format.

LADSPA - predecessor of LV2 Host.

DSSI - a higher-level API extending LADSPA. Geared towards instruments rather than effects.

Vamp - audio analysis and feature extraction plugins.

VST - a commercial format that is supported through various wrappers.

MIDI

Two MIDI systems coexist – Jack-Midi and Alsa-Midi. They are more elaborately explained in the corresponding FAQ section.

For Audio Playback

Numerous audio players exist for Linux. The few selected examples below are supposed to just give some useful hints besides the more comprehensive list of players. All the apps listed (except aplay) behave well with JACK, the otherwise popular VLC is omitted due to issues with its JACK output.

Command line interface
  • aplay, a simple tool for playing back soundfiles through ALSA, especially useful for low level testing.
  • MPlayer is a powerful player for video and audio. It will play almost every format, whether from disk, streamed or from CD/DVD – as long as the required codecs are installed. MPlayer can use JACK for audio output. Beyond it is capable of capturing A/V streams, connecting to a webcam, taking screenshots, acting as a browser plugin, etc.
Graphical user interface
  • Several GUI's exist for MPlayer (see above). Have a look what your distribution offers.
  • AlsaPlayer is a small JACK-aware audio player. One of its features is a control for playback speed.
  • aqualung plays audio CDs, Internet radio streams and podcasts as well as soundfiles. Features include JACK support, gapless playback and, if desired, an XML-based music database of your soundfiles.

For Waveform Editing and Sampling

Soundfile editing

Dave Phillips Article The Linux Soundfile Editor Roundup perfectly covers this subject.

The category Soundfile Editors lists available software.

Sampling

Sampling can be used in many ways. Playback of just one audio sample, triggered by a MIDI event, could for instance be done using the DSSI plugin trivial-sampler. More feature rich is e.g. Tapeutape, a midi controllable sampler designed for live performance. Hydrogen is a full featured sample based drum machiene, it allows to easily build custom sample kits from WAV and FLAC files. A tutorial for doing so is here.

FluidSynth is a command line application playing sf2 SoundFonts. There is a GUI called QSynth and there is FluidSynth-DSSI, a DSSI wrapper for fluidsynth, offering a GUI as well. Visit the SoundFonts page for more information and links to external resources.

Linuxsampler supports sample libraries in GIG, DLS, and Akai formats. For a GUI there is QSampler.

Swami allows editing Instrument formats such as SoundFont, DLS and GigaSampler.

Looping

There is an Article by Dave Phillips: Loop-based Music Composition With Linux. Part one covering use of Rosegarden and Freecycle, Part two covering Ardour and Audacity.

SooperLooper and Freewheeling, both well documented on their websites, are two applications very much dedicated to live looping.

For beat slicing look at Freecycle, Tranches and Smasher.

For Multitrack Recording

The hardware side

While most onboard soundcards are supported under Linux, they usually don't give the quality required for more ambitious needs.

Whether a device is supported or not largely depends on the vendors' willingness to either comply to standards or publish the specs to Linux developers. If you have an unsupported device, feel free to contact the vendor and ask for Linux support—with growing user demand some might change their mind. For the lucky ones who are just planning to buy one there are many well supported soundcards to choose from.

For devices connected via the PCI, PCIE, PCMCIA or USB port the Alsa Soundcard Matrix lists the support status.

PCI devices usually give a good price/quality ratio. Devices with a breakout box allow to keep the analog signal away from the computer and all its electromagnetic emissions.

Most USB 1.0 cards are class compliant devices. All class compliant devices work under linux. USB 2.0 lacks an adopted standard, so it's up to the vendors again to publish their specs.

FreeBoB and FFADO are the drivers for FireWire cards. The FFADO project supersedes the FreeBoB project and adds support for many devices. Though FFADO does not yet provide a stable release it is reported to work very well. It is just rarely packaged for distributions so users are on their own installing it.

Software

Applications are listed in the multitrack category. As that list is quite complete it includes unmaintained and experimental software.

The examples introduced below are – if not stable (Ardour, ecasound) – at least well usable. This certainly doesn't mean the ones not mentioned here are necessarily unstable, some are e.g. just less popular or more specialised.

  • Audacity is an easy to use but feature rich multitrack recording and soundfile editing application with support for LADSPA-plugins.
  • Ardour – the professional multitrack recorder, advanced and stable. Dave Phillips article Introducing Ardour gives a good overview, and of course there is the the project website at ardour.org.

For Music Composition

MIDI sequencing

With external hardware tone generation

For most general composition needs a workstation keyboard combined with a MIDI sequencer such as Rosegarden will work fantastically. The keyboard can provide sounds through General MIDI; later, softsynths can be introduced to improve the production quality.

With USB MIDI, most devices will be recognized soon after they're plugged into a USB port and turned on. However, if they contain proprietary software (for patch editing or otherwise), and the software is only for Windows or OSX, that software may not work correctly.

Fully software

A software-only studio has two problems to solve: softsynth availability, and low latency audio. Without resolving both, production will not be feasible.

Printing Sheet Music

If you want to get high quality notation or want to set more exotic scores (gregorian chants f. e.) your best bet is LilyPond.

Synthesis

Standalone Softsynths

Due to the flexible routing capabilities of the Jack Audio Connection Kit there is no need for synths to come in a plugin format. Any JACK-aware app is kind of a 'JACK plugin' and may recieve input from or send output to any other.

Three synthesizers – ZynAddSubFX, Phasex and Minicomputer – are introduced in the softsynths section of Lieven Moors Introduction to Linux & Audio The category Softsynths And Samplers lists many more.

Softsynth Plugins

LADSPA

LADSPA is the oldest audio plugin standard in Linux. The plugins do not have their own GUI, host applications can generate one. No LADSPA plugin makes up a full-featured softsynth, the majority are effect plugins as well as some signal generating ones.

With host applications like Alsa Modular Synth or gAlan, modular synthesizers can be built using LADSPA plugins. Both provide example patches for exploration.

DSSI

DSSI, the Disposable Soft Synth Interface, is a higher-level API that builds on LADSPA. DSSI-plugins may (and mostly do) provide their own GUI. There are softsynths available, for instance nekobee, a Roland 303 emulatur, and hexter, emulating a Yamaha DX7.

LV2

The LV2-plugin standard is the most recent development. Since version 2.5 Ardour includes support for LV2.

VST/VSTi

VST/VSTi plugins are partially supported through various wrappers. See the FAQ for more detailed information.

Synthesis Languages

For live electronic music and effects try Pure Data, a system related to MaxMSP.

Highest-Quality Non-Realtime-Synthesis, all kinds of synthesis flavors, still backward-compatible with the version from 1978 and many front-ends: CSound.

For an object-oriented, more general-programming-language-like syntax and live-coding abilities try SuperCollider or ChucK.

wiki/newbie.1360806409.txt.gz · Last modified: 2013/02/14 02:46 by jeb_ponderworthy.com