@x42 and I have done a lot more work and experimentation with raspberry pi 4 model b and ardour.
My test ardour sessions are pretty simple: some midi tracks running a-fluidsynth and a single audio track with a modest amount of signal-changing plugins. Usually guitarix stereo + reverb and sometimes various combinations of some a-reverb, a-compressor, gxlooper and pedal-type plugins from gxplugins.lv2.
Discovery 1: PREEMPT
It really helps to have kernel PREEMPT set, in terms of eliminating xruns/pops/clicks. Clone the latest linux kernel, build the default config for pi 4, then use menuconfig to change the kernel priority under general settings (it has moved around in different kernel versions). Build, reboot and you’re in business.
Discovery 2: Headlessness
Ardour can run just fine without a desktop. Check out ardour6-lua.
Discovery 3: RAM selection
Ardour runs just fine for me at 48000/256/2 on the 2 GB model. CPU usage fluxuated between 55% and 85% on a single core for the sessions described above, depending on the actual mix of plugins in use.
Discovery 4: Daemonization
You can run Ardour as a daemon using a new tool x42 built. systemd service file example:
pi@raspberrypi:~ $ cat ardour6-lua.service
[Unit]
Description=Ardour6-lua
After=network.target
[Service]
Type=simple
ExecStart=/home/pi/ipc-stdio/ipc-server /home/pi/Ardour/bin/ardour6-lua
WorkingDirectory=/home/pi
Restart=always
RestartSec=1
User=pi
TimeoutSec=120
[Install]
WantedBy=graphical.target
Just use ipc-client to send commands to Ardour.
close_session()
backend = AudioEngine:set_backend("ALSA","","")
backend:set_buffer_size(256)
backend:set_input_device_name("USB Audio CODEC")
backend:set_output_device_name("USB Audio CODEC")
s = load_session ("/home/pi/sessionpath/","sessionname");
s:request_transport_speed(1.0,false,0)
You can even make Ardour controllable via the web with, say, a node http server that spawn()s ipc-client and sends commands to its input.
Discovery 5: Guitar input
This guitar input works well, if you’re looking for an inexpensive, small form factor audio device + pi. Other no-name knockoffs in the same form factor and design available on Amazon did not fare so well (weak signals, instability). The former has a proper chip from TI. The latter had a chip from C-media with a false manufacturer id for “Intel”.
I’ve had success with Audiobox A96 USB and Behringer UM2, too, but they are much larger.
Discovery 6: Overclocking
If all your Pi is going to do is Ardour, especially in the way I use it (described above), you’re pretty safe to overclock bc only one of the 4 cores is going to get worked that hard which means the temperature is going to stay manageable. (You still need a heat sink of some sort, though.) I am running mine at the max possible without force-turbo (which voids warranty), arm_freq=2147, over_voltage=6. So far so good and I’ll report back if I run into issues.
Discovery 7: xruns from other programs
When using a Pi with ardour, you have to be careful that external sources aren’t causing xruns. For instance, I thought i’d “watch vcgencmd measure_temp” and got an xrun every time it fired. I could run “vcgencmd measure_temp” over and over in a terminal just fine, but with “watch” it caused issues. My guess is watch has a high priority (or some IRQ crap I don’t/don’twantto understand) and kept cutting into ardour processing.