The Current state of Linux Audio Production
Chris Cowley
- 8 minutes read - 1531 wordsA few years ago (becoming many years ago now) I was a Linux loving sound engineer. I am also a guitar player with a family which means I have not been much of a guitar player for a while now.
Well, I recently got a new (to me) laptop to replace my Pinebook Pro and I have decided to dip my feet back into music production. With that in mind I feel I can add to the conversation by giving how things are going after a few years away.
I always lean towards Fedora for my personal workstations, so this will be Fedora-centric. There are definitely other options:
- Arch Linux has a detailed Wiki page for Professional Audio here
- Ubuntu Studio has been around for years and works really well by all accounts
- AVLinux has also been around for ages, but seems to be less active that Ubuntu Studio
As I said though, I like Fedora, so I will stick with that.
What I need
I want to be able to record guitar, piano (including MIDI) and vocals. Neither I nor my wife can play drums, so I will need a drum machine (ideally a virtual drummer of some form). I also want to be able to play guitar just for fun. So I need
- Real-time audio
- A Digital Audio Workstation
- Guitar amp modelling
- Drum machine
- Synths
I have a Behringer UMC202HD which I already know works out-of-the-box. Back in the day this was the biggest hurdle, but USB class-compliance has completely changed the game here.
I also use a cheap MIDI interface that allows me to use my wife’s old (pre-USB MIDI) digital piano. Like the audio interface, this is USB class-compliant and worked flawlessly out of the box.
The Fedora Music Ecosystem
The first place to look is for a Special Interest Group (SIG) that could be helpful. Sure enough, Fedora has the Music & Audio SIG that is geared towards exactly this. From this I discovered a few things:
- Yann Collette is maintaining a COPR dedicated to music production
- Audinux also has some excellent resources
- Linux Musicians has an excellent thread that covers basically everything “under the hood”
Getting Good Latency
Latency need to be very low in order to actually play anything.
Info
Audio latency is the delay between when a sound is created and when it’s heard. In digital systems, this is the time it takes for audio to travel through your hardware (like microphones or speakers) and be processed by your computer. Lower latency (measured in milliseconds) means more real-time sound, which is crucial for music production.
The first step to getting low latency is to enable real-time processing. This will guarantee tasks complete within strict deadlines instead of optimizing for average speed. In the dark days, we had to build a dedicated kernel for real-time work. Now that has all been included in the mainline kernel and there are a few options to enable. Fedora even has those packaged up:
sudo dnf install realtime-setup
sudo systemctl enable realtime-entsk.service
sudo systemctl enable realtime-setup.service
sudo usermod -a -G realtime <username>
To get low latency, you need to set the PIPEWIRE_LATENCY
variable:
echo "PIPEWIRE_LATENCY=256/48000" | sudo tee -a /etc/environment
Warning
I have found a lot of conflicting information about setting latency for Pipewire.
Literally everywhere you look says you should be able to run:
pw-metadata -n settings 0 clock force-quantum 128
pw-metadata -n settings 0 clock.force-rate 48000
and that the environment variable approach is deprecated. In my experience the settings from pw-metadata
do not persist.
YMMV
Reboot and real-time should be enabled.
What Applications
Everything is based around the DAW, for which I will use Ardour. There are plenty of other options (Reaper, Bitwig, Audacity, etc), but I quite like Ardour’s interface, it is open source and it is mature and feature rich.
Guitar was quite important to me as that is my main instrument. Guitarix is the daddy of amp modellers on Linux and can even run Neural Amp Modeller profiles. By installing both guitarix
and lv2-guitarix-plugins
packages I can either play stand-alone or directly in Ardour. This is all I need for guitar quite frankly.
We are kind of spoilt for choice on Linux for drum synths. Hydrogen is more gear towards electronic music and AVL drums and Drumgizmo have have excellent samples of acoustic kits. What I have not really found yet is a Virtual drummer, at least an open source option. I hate programming drums, so this is a bit of a problem for me. I will look into getting MT Power Drum Kit 2 running via [Yabridge] most likely.
The next major thing I need is some sort of synths. There are many types of a synth and the main thing I am looking for is a sampler type synth that uses soundfonts. These come in 2 formats: SFZ and SF2. It seems that there is no solution that can do both, so I just go for both:
- Fluidsynth for SF2 (Qsynth can be used as frontend outside Ardour)
- Liquidsfz for SFZ files
Both of these work in Ardour thanks to LV2.
Info
SFZ is an open text-based format where sample parameters are defined in simple text files that reference external audio files, making it lightweight and editable with any text editor, while SF2 is a proprietary binary format that packages audio samples and their parameters into a single file, offering better compatibility with older hardware and software but less flexibility for editing.
SFZ provides more advanced control over sample behavior with its extensive modulation options and scripting capabilities, whereas SF2 has more universal support across music production tools but offers more limited sound design possibilities.
The primary use for these will be piano. There are lot of free, excellent piano sample sets out there. The ones I have settled on for now are:
- Salamander Grand
- Ivy Audio Piano in 162 is a Steinway Model B
They both sound really good, but different.
An honorable mention for BitKlavier Grand which is a huge sample library of a beautiful Steinway Model D Grand. It is not in SFZ or SF2 format, but re-packaging it as such is allowed by the license. I may take this on as a bit of fun.
I also need a good General Midi set that can be used for basically anything. A bit of digging bought me to The General Montage Soundfont that covers everything in the GM spec.
Finally, I need a patch bay to link all this together. The community seems to have settled on QPwgraph for this and it seems pretty good to me.
Installation
Honestly, the biggest question I had was how to install things. The choice on Fedora is either RPMs or Flatpak. Conceptually I like the idea of Flatpaks, so that is what I initially went with. On Flathub I found basically everything I needed, but then I ran into a problem.
While the major applications were available in Flatpaks, including LV2 plugins for use directly in Ardour. However, any plugins installed through RPM were not visible.
This makes sense due to Flatpaks being sandboxed, so I simply added exceptions to the flatpak to allow it so see where the RPM based LV2 plugins were installed (/usr/lib64/lv2
for those following along). I also added an environment variable to the flatpak so it would search in that folder. Despite those modifications, the LV2 plugins were never available to Ardour so I backed out and decided to just install everything through RPM.
I configure everything with Ansible and have a playbook just for audio here
Conclusion
Overall I am really impressed with the Linux audio ecosystem. Hardware support is amazing now, with both my audio and MIDI interfaces working perfectly with no effort.
Pipewire means that I can no longer need a configuration dedicated to audio. Firefox and Ardour both use the same interface with no issues. In the real world, this is huge. Not everyone can (or want to) have a dedicated computer just for music. I can now close my DevRel day job tools, pull my guitar out and play.
In terms of software, Ardour is on par with the big boys like Logic and Protools. If I were running a professional studio, I would probably still have to use Protools for interoperability, but for me that is not an issue. The workflow in Ardour is as slick as anything from the big boys.
The plugins and sounds I have found so far are excellent. Guitarix sounds great even without NAM profiles, the piano samples I have found sound amazing as do the drums. Honestly, the quality of the tools is absolutely not a hindrance to creativity.
I truly love what I see here. Back in the day, you basically had to run an RME Hammerfall or a M-audio Delta 1010 and hope for the best. Ardour already existed, but was not stable and the quality of FX and instruments was variable at best. It all took so much careful configuration and tweaking that we were basically obliged to have a dedicated machine. Now, with everything working so easily, I can just use my normal laptop, install a few packages and go.