Setting up Linux for music recording and production
If you’re a programmer, you’ll find GNU/Linux systems quite powerful and robust. When it comes to visual arts, video, business, or gaming, you’ll find tools with promising potential, but with many bugs, quirks, and challenges. You can accomplish everything you need in most cases, but the setup and learning curve may not be as smooth as proprietary options on proprietary systems.
In this article, based on my talk at SCaLE 14x this year, we’ll cover the basics of setting up your Linux system for music creation, highlighting what works best and acknowledging challenges with recommendations on how to find help.
To start with audio, we need speakers (headphones count). To use sounds other than those generated entirely by the computer, we also want sound input. Older Linux systems used OSS (Open Sound System), and older audio interfaces and computers with Firewire use FFADO, but for almost everyone today, the focus is on ALSA: Advanced Linux Sound Architecture .
Luckily, ALSA is part of the Linux kernel, so you don’t need to know much more as an end user. All you need to know is if your hardware is supported. Most computers’ built-in hardware will work. For better sound and compatibility with guitars, microphones and other music gear, a more dedicated audio interface makes sense. Any “class compliant” interface will work, which includes many affordable basic options. A decent number of high-end interfaces are also supported. For options with top-notch sound quality, I’ve had success with the Focusrite Scarlett series. Maintained only by volunteers, the most accessible lists of supported interfaces are rarely complete or up-to-date, but nice people on forums and IRC can help.
For the low latency synchronization needed for most musical creations, a low latency core is recommended (but not absolutely necessary). Best to install one pre-packaged as part of a dedicated music system.
Distributions and repos
A dedicated music system isn’t necessary to get started with the basics. Most introductory software runs on just about any standard GNU/Linux system (and anyone can modify any system to do anything, if that’s something you want to spend your time). However, dedicated music systems offer many advantages.
I use KXStudio, a great collection of repositories that can easily be added to any Debian-based (and therefore Ubuntu-based) operating system as well. Once the KXStudio repositories are added, a simple update and installation of the recommended items will give you a complete system with a low-latency kernel, tons of great programs, a dedicated suite of management tools, and tons of effects. , plugins and synthesizers . The KXStudio maintainers (mostly one guy, actually) do a terrific job of keeping things up to date and responding to requests. Keep in mind that this is essentially a full-time, efficiently done volunteer job, so consider making a donation to keep it going.
Aaron’s Custom KXStudio Desktop
Other audio-focused packages and distributions exist, including AV Linux and Fedora Jam. Several other systems have been created over the years, but most are not updated or active.
A note about 100% software freedom: Although audio-focused distributions Musix and Dynebolic have received FSF approvals, the newest way to have a 100% free/free/open music system is to use the Debian core system or the FSF-approved Trisquel distribution and add the KXStudio repositories to your installation.
While ALSA works directly with the hardware, other audio layers handle all the signals from various programs and send them to ALSA. Some programs directly support ALSA, while others work with PulseAudio or systems like KDE’s Phonon, which works with GStreamer or VLC backends. All of this confusion basically means that your system setup interacts in different ways with different programs depending on how they support and interact with these frameworks.
The main audio system dedicated to music is called JACK. It provides a backend that supports arbitrary paths for audio (and MIDI, the system used to send control signals for synthesizers) to and from all supported programs. With JACK, a synthesizer output can go into a reverb plugin and then into a recording program while a separate drum program is playing. JACK can start and stop all playback of multiple programs with any of them to be the master timer.
JACK approximates the unix principle of having small programs that do one or more things well instead of monolithic all-in-one programs. Of course, that requires some serious management tools to keep it all together. KXStudio provides the Cadence GUI tool suite, which many people also use outside of KXStudio. The most JACK-centric tools based on Unix principles come from Jon Liles, the author of the Non series. They provide a separate mixing tool, recording tool, sequencer and a session manager. A session manager is a tool that saves all the different settings and connections you have in JACK and saves them as a set so you can automatically close and later reopen all those independent programs all configured the same way.
Configuring JACK Connections with Cadence Tools
Unfortunately, while the concept of JACK and modularity makes sense, the level of support and quality of tools is inconsistent. Some combinations work perfectly and smoothly, but some programs offer incomplete support or even no support. Some programs support JACK but their design encourages users to do everything internally anyway.
Beginners in GNU/Linux music creation should try to understand the basic concepts of JACK. This will help them understand the general ecosystem of music tools available, whether or not they choose to take the modular approach.
In my next article, I’ll focus on programs that support JACK but can also be used independently.
The Linux Musicians Forum is overall the best place to start and get involved. Also check out the #opensourcemusicians IRC channel on Freenode.net (and many projects have their own channels too, of course). The Linux Audio Wiki is also a great resource, although some of them can be quite dated. Also, check out libremusicproduction.com for a great series of additional tutorials and more.
In practice, setting up your system may involve some troubleshooting. On my particular laptop, for example, if I want to use reliable low latency settings (needed for fast response when playing live with synths or effects), I have to disable my networking and tune my processor in performance mode. Although there are good guides on these topics (some of which I wrote myself), each case varies in this complex GNU/Linux world with such diverse tools and hardware. I encourage everyone to use the welcoming and helpful community. Nothing beats personalized support. Don’t forget to pay it forward: help improve wikis and answer questions from newcomers once you’re comfortable!