Jump to content

Audio Production on Linux

Hedon James

Recommended Posts

Hedon James
On 7/5/2024 at 9:00 AM, Hedon James said:

I seem to have eliminated my xruns, according to Cadence, by:

  • decreasing swappiness to 10
  • changing cpugovernor to performance
  • adding threadirqs and mitigations=off to kernel boot parameters
  • changing the MIDI driver in Cadence from "Alsa-MIDI-raw" to "none"; I read this either conflicts, or adds an additional layer to a2jmidid; changing to "none" seems to have a positive effect


I spent a long day in recording sessions yesterday, with no xruns; even using DrumGizmo (without tweaking) to convert MIDI to analog drums.  Cadence xruns remained at 0 (this was my baseline experience in old OS and Ardour 3.5 and old KXStudio repos).  But Ardour seems to randomly indicate xruns (this is a new behavior in 7.3 that didn't exist in 3.5).  I don't know if Cadence is providing false zeros, or if Ardour is providing false xruns



Just some additional notes/observations/clarifications, which may prove useful for anyone following along.  Referencing the bolded statements:


I forgot to mention that the JACK settings in the Cadence application were modified from buffer size of 256 (resulting in 5.8ms block latency) to 512 (resulting in 11.8ms latency), with sample rate of 44.1, which is CD quality.  I see no reason to exceed that for my use.  I'm sure there are use cases where 48k+ are desired, but it's overkill for me, IMO.  I was tinkering with 256 buffer because I was trying to find the upper limits of capability with the Ryzen3 CPU and I'd say that limit is good for about 90% of my sessions, but occasionally spiking off an xrun.  512 seems to be a good limit 100% of my sessions, with no discernible latency issues.  I think I've got JACK and Cadence sorted out, and starting to have confidence in those settings.


With respect to Ardour, still getting occasional xrun indications from within Ardour (top right, next to log/msg indicator), despite Cadence/JACK indicating no issues.  Having spent several hours in the studio tinkering with things this holiday weekend, I STRONGLY suspect that Ardour indications of xruns are actually "clip" notifications, when my recorded signal hit the 0.0db threshold in channel meters.  I'm not 100% certain, but certainly "more likely than not"....I'm about 90% confident that is what's happening.  It seems that Cadence/JACK and Ardour are using slightly different triggers to indicate an xrun has occurred.


Did some additional research on side-by-side installations of Ardour (2 instances running on same machine), and it is indeed possible.  Sunrat indicates the Ardour installation script installs to the /opt directory.  I have no installation of Ardour7 in that directory, so I believe that repo installation occurs to the system like a typical repo binary.  One caveat is that Ardour will update a "series", but won't update to the next "series".  In other words, I am currently on Ardour7.3 from the repo.  I may install Ardour8 from the Ardour site, which can be upgraded incrementally from 8.0 to 8.1.....to 8.9; so I can never have 2 versions of the same series at the same time....I cannot have Ardour 8.1 and Ardour 8.9, for instance, because the 8.9 installation WILL overwrite the 8.1 installation.  When Ardour bumps from 8.9 to 9.0, a new installation of Ardour9 will be required for v9; and Ardour8.9 and Ardour9.0 will co-exist simultaneously in the /opt directory, each with their own launcher.  So pay attention to your launchers when launching Ardour.  The Ardour8 launcher will launch version 8.0-8.9; but the Ardour9 launcher will launch versions 9.0-9.9.  So watch what you're clicking to open Ardour, or make sure you have the correct launcher in any docks/quick launchers.  A quick mouse-over will reveal which version you're about to launch.


The upshot of all this is that I'm going to follow Sunrat's suggestion and download Ardour8.9 (the most recent version) to see if that doesn't fix the many minor issues I'm experiencing in Ardour7.3.  But I should do that quickly, because once they go to Ardour9.0, I KNOW there will be new and fresh bugs present in the new series that take a while to get ironed out.  I'm guessing that's where I'm at right now.....someone at Debian decided Ardour7.3 is the 5-year version for Debian Bookworm Stable, even though it's a little buggy because the 3rd version in the Ardour7 series isn't as polished as say....version 7.6 or 7.9.  FWIW...

  • Like 1
Link to comment
Share on other sites

1 hour ago, crp said:

Is latency an issue that is a real-life problem for this?


It can be for audio production. If you play a keyboard using a softsynth in a DAW, you want the note to play as quickly as possible after you hit the key. If you have a latency of, say 30ms, that's close to a 1/16th beat at 120BPM. Would be very distracting and your recording may end up unusable.

Also if you do overdubs, layering fresh tracks adding to already recorded ones, it needs to be as close as possible to zero. Under 10ms is good to aim for in these cases, under 5ms even better.

There are also phase considerations as well as timing, it can get quite complicated and messy.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...