Sunday, 27 February 2022

Ardour DAW on Fedora

Whilst audacity is a well known and simple sound editor it has some limitations when compared to digitial audio workstations (DAWs): this space can be fileld with ardour and a number of basic plugins.

To install on Fedora 35, we need the DAW but its feature set is expanded with the relevant LV2 plugins that can be used as filters within ardour:
$ dnf -x lv2-*devel install ardour6 calf lv2-calf-plugins lv2-\* lsp-plugins-lv2 # a noise reduction filter/plugin $ dnf install fftw3-devel meson ninja-build $ git clone https://github.com/lucianodato/noise-repellent && cd noise-repellent \ meson build --buildtype release --prefix /usr \ ninja -C build install
Whilst ardour provides basic funcitonality like multiple audio tracks, cross fading/fade in/out, the filters and plugins provide very useful tools like audio compressors, gates and EQ filtesr to process audio.

Whilst Fedora has adopted pipewire to simplify audio handling (maintaining a subset of ALSA/pulseaudio functionality) by removing the need for the user to manually start/stop the jack daemon. However you may still finding warnings:
WARNING: Your system has a limit for maximum amount of locked memory. This might cause Ardour to run out of memory before your system runs out of memory.

You can view the memory limit with 'ulimit -l', and it is normally controlled by /etc/security/limits.conf
This can resolved with:
$ cat > /etc/security/limits.d/audio.conf << EOF @audio - rtprio 95 @audio - memlock unlimited EOF # $ sudo groupadd audio $ sudo usermod -a -G audio $(id -un)
Start to familarise yourself with buses, routing and arming tracks etc and you will be good to go.

Pipewire

One complicaiton with Fedora 34 onwards was that the backend sound system moved to Pipewire and this has shown up a number of issues whilst using Ardour - the biggest issue I've faced is choppy audio that floods journalctl with out of sync issues. A potential workaround on variuos forums suggest increasing min-quantum values:
# verify current load $ pw-top # powers of 2 $ pw-metadata -n settings 0 clock.min-quantum 2048 # if works, make system wide $ sudo cp -r /usr/share/pipewire/ /etc $ vi /etc/pipewire/pipewire.conf ... context.properties = { ... ## UPDATE ## default.clock.allowed-rates = [ 44100, 48000 ] default.clock.quantum = 2048 default.clock.max-quantum = 8192 }
The Pipewire development repo's troubleshooting guide also suggets increasing headroom:
$ mkdir -p ~/.config/wireplumber/main.lua.d $ cp /usr/share/wireplumber/main.lua.d/50-alsa-config.lua ~/.config/wireplumber/main.lua.d/ $ vi ~/.config/wireplumber/main.lua.d/50-alsa-config.lua ... ["api.alsa.period-size"] = 2048, ["api.alsa.headroom"] = 8192, $ systemctl --user restart wireplumber pipewire pipewire-pulse

FocusRite Scarlet 2i2 3G

Audio files can be captured through various means but you may also need to capture audio yourself, for example via a microphone for voice or instruments - for this you will need an (USB) audio interface. As with many devices for use under Linux there is a possibility of missing support but a large number of FocusRite devices have been supported in the mainstream kernel for a couple of years.

In particular the FocusRite Scarlet (poviding 2x inputs with phantom power over a USB connection) and has been available in Fedora 32 and its 5.11.x kernels. For the 2i2 we can also add alsamixer support:
$ cat > /etc/modprobe.d/snd_usb_audio.conf << EOF options snd_usb_audio vid=0x1235 pid=0x8210 device_setup=1 EOF
Furthermore:
In order to force your Scarlett 2i2 out of MSD mode without first registering it, connect it to your host computer and press and hold the 48V button for five seconds. This will ensure that your Scarlett 2i2 has full functionality [allowing sample rates up to 192 Khz rather than limted to 48 Khz as it arrives out of the box]].

No comments:

Post a Comment