Record Music on Linux

Introduction

Install packages

Ardour is a powerful open-source Digital Audio Workstation (DAW) that’s widely used on Linux,

sudo apt-get install ardour

JACK Audio Connection Kit is essential for low-latency audio routing,

sudo apt-get install jackd2 qjackctl

Calf Plugins for effects like reverb and delay,

sudo apt-get install calf-plugins

Set Up JACK

Launch qjackctl (JACK Control) and start the JACK server. Set a low latency in the settings (<10ms if possible) but adjust according to your system’s performance.

Connect Your Guitar

Plug your guitar into the Focusrite Scarlett 2i2.

Audio Routing in JACK: Use qjackctl or patchage to connect the input from your Focusrite to Ardour’s tracks.

Configure Ardour

Open Ardour and create a new session. Add Tracks: Add a mono or stereo track for your guitar.

Ensure the input is routed from your Focusrite (configured via JACK).

Load Plugins: Use built-in Ardour effects or Calf Plugins for reverb, delay, and other ambient effects.

Add Guitar Amp Simulator

sudo apt-get install guitarix

One of the most important things when recording guitar at home using an amp simulator is to not have the level so high such that you introduce clipping. You need to reduce the gain level on your recording interface such that the full range of the guitar audio is recorded without any clipping.

Ideal dBFS (Decibels Full Scale) peak levels evels should for most recording scenarios, it’s recommended to keep your peak levels between -12 dBFS and -6 dBFS. This range provides enough headroom to avoid clipping while still capturing a strong signal.

Add Additional Plugins to Ardour

Some plugins are not installed through the package manager. E.g., the GTune tuner plugin is one example. You download this plug in, unzip it, and then,

mkdir ~/.lv2
mkdir ~/.lv2/GTune
cp GTune.so ~/.lv2/GTune

Afterwards, in the Ardour preferences, you press plugins, and scan for plugins, then you add ~/.lv2 to the Linux VST2 paths.

Recording Process

Arming the Track: Click the ‘record-arm’ button on the track you want to record. Monitoring: Enable monitoring to hear your guitar through the effects in real-time. Recording: Press the record button on the transport bar, then play your guitar.

Measure LUFS using ffmpeg

ffmpeg -i session.wav -af loudnorm=print_format=summary -f null -

Convert to Video using ffmpeg

ffmpeg -loop 1 -i cover.webp -i session.wav -c:v libx264 -tune stillimage -c:a aac -b:a 320k -pix_fmt yuv420p -shortest outputvideo.mp4

Convert from WAV to mp3

The recommended format to save high quality audio is WAV, and Ardour can automatically save it such that the volume is standardized to fit different streaming services such as Apple Music. However, the WAV files are rather large, and we can easily convert them to mp3 format with ffmpeg.

ffmpeg -i session.wav -codec:a libmp3lame -b:a 320k session.mp3