Jump to content

Audio Production on Linux


Hedon James

Recommended Posts

Hedon James
Posted (edited)

Was gonna send Sunrat a direct message, as I think he & I may be the only ones posting in this thread.  But then I realized, I learn stuff from other folks' threads that seemingly have nothing to do with me....until it does, at a later date, and I remember that thread.  So if mods think this should be a private discussion, let me know, and I'm happy to take it there.  Otherwise, here goes:

 

Sunrat, I'd like to pick your brain regarding Linux Audio, Ardour, Jack, Plugins, and xruns.  Since about 2017, my Studio Machine was running Ubuntu 16.04 LTS, with KX Studio repos, and Ubuntu's low-latency kernel (4.x series, if i recall correctly).  I was running Ardour 5.12, and whatever dependencies got installed from that package, including Jack, Cadence, default plugins, etc...  ALL from KX.  Worked like a dream with my audio card (a Behringer Uphoria 404, if it even matters), but was getting long in the tooth.  It was time to upgrade and bring things forward, even though this setup worked PERFECTLY.  No issues, no xruns (EVER!), everything detected as expected, etc...

 

Fast forward to 2024.  I've switched to Debian as my preferred OS, currently running Debian 12 Bookworm.  I've added KX Studio repos, but KX doesn't provide DAWs anymore, just the KX-brewed audio apps (cadence, carla, catia, etc...) and a host of plugins.  So I've installed Ardour from Debian (v7.31 i think?), and the base packages from KX (I pretty much only use Jack and Cadence, that I can see); and I've installed the plugin packages that look familiar to me, i.e. Calf, gxstudio, Robin Gareus (x42), in addition to the community supplied ACE defaults.  Based on the advice of others, I've also installed Linux Studio Plugins (LSP) and am in the process of migrating from Calf to LSP (so far, so good....I'm liking the LSP plugins!).  Debian doesn't have a "low latency kernel", so I've installed the liquorix kernel (v.6.7.12-1).

 

Pulling my previous workflow forward, I have typically used DrumGizmo to capture MIDI from my e-drum kit, simultaneous with analog (a reference audio track only).  I then took the MIDI file and pulled it into a Windows laptop and imported to EZDrummer3 to convert to audio; which was then exported as *wav stems and imported back into my Linux DAW as separate tracks.  This has worked just fine for me, but has become a PITA....  Recently discovered Ugritone Drums as a native linux plugin; i LOVE the sounds and the ability to work completely from within my Ardour DAW on my linux desktop!  But I have noticed MANY xruns registering in Cadence.  Can't hear them when audio is playing, but they're accumulating.  After much experimentation, it seems these xruns are occurring when the chosen kit in Ugritone gets "loaded", and when the preferred "routing" is selected.  If I'm correct, is this a problem?  Are xruns in Cadence an issue if they're not occurring during playback or record?  I've cruised forums and many users (on Windows, Mac, AND Linux) are reporting similar issues....lots of xruns with Ugritone plugins.  I have messaged Ugritone and they're aware, but point out the drum VST is a "beta" and they're working on improving it.  In the meantime, I'm left wondering....is what I'm experiencing even a problem, if it isn't happening during playback or record, or it can't be heard? 

 

Alternatively, I've started learning to use the DrumGizmo kits (I've downloaded the Crocell), and use it for capture AND audio processing.  And I've got a setting that sounds VERY much like my EZD3 kit....very happy with it!  But I've noticed that DG produces xruns on occasion also.  Not nearly as many as Ugritone; maybe 1 or 2 or 4(?) if I leave it open a LONG time.  Haven't been able to isolate when the xruns occur, but have eliminated that it does NOT occur during playback/record. 

 

So with ALL that background, here's my question:  Is this a problem, is there anything I can do on MY end to improve things?  Maybe I'm spoiled by my old setup, where NO xruns were ever experienced, but that's my frame of reference.  Is that unusual, or is that the standard?

 

I have changed so much in my software that I can't possibly isolate what the culprit MAY be.  What I can say with 100% certainty is that it isn't the hardware.  It's the exact same hardware....I just pulled the old disks, installed new disks, and installed all new software and re-built the system from there.  NO HARDWARE has been changed.  Summary of changed variables:

Ubuntu 16.04 swapped for Debian 12

Ubuntu low-latency kernel swapped for Debian liquorix kernel

Ardour 5.12 swapped for Ardour 7.31

and any upgrades of KX dependency software between 2017ish and 2024!

 

Can you educate me a little on xruns?  I know they're bad, but maybe not fatal?  Is there a way to determine what is causing them, and when they occur?  Do you see anything in my software choices that causes concern?  Any advice on the best way to move forward and restore my "0 xruns experience", or is that unrealistic?

 

TIA for any advice you may offer!

 

Edited by Hedon James
  • Like 2
Link to comment
Share on other sites

securitybreach

So I know absolutely nothing about music production but I turned my boss onto Linuxmint years ago and he does. I can run something across him if you like when I get back to work Monday. Just let me know

Link to comment
Share on other sites

Hedon James
1 minute ago, securitybreach said:

So I know absolutely nothing about music production but I turned my boss onto Linuxmint years ago and he does. I can run something across him if you like when I get back to work Monday. Just let me know

By all means, please do!  I'm not picky about where the knowledge comes from, only that the information is good!  I'm sure there are others who can educate me, but Sunrat is the only one I know of?!  LOL!

Link to comment
Share on other sites

securitybreach

Well I was referring to what applications he would use for certain things and such. I don't think he is running different kernels and such but he might be. He is a computer guy and hasnt asked me any questions about linux in years but I know he still runs linuxmint.

Link to comment
Share on other sites

sunrat

Tuning for optimum audio performance is a rabbithole I've found myself in many times. The best guide is https://wiki.linuxaudio.org/wiki/system_configuration

A most helpful script is rtcqs (formerly Realtime Config Quick Scan) - https://codeberg.org/rtcqs/rtcqs . Run it and implement its recommendations until everything shows as [OK]. I set frequency scaling governor to Performance. For Liquorix you need to add kernel option threadirqs. I also disable mitigations with mitigations=off and disable C-states.

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_idle.max_cstate=0 processor.max_cstate=1 threadirqs mitigations=off"

The c-states is for Intel, and there are security implications disabling mitigations; for my Haswell CPU it can improve performance up to ~30%

 

What audio server do you have? I still use Pulseaudio > JACK > ALSA. Some DEs eg.GNOME now use Pipewire which I know very little about so far.

 

A few xruns are to be expected, mainly just when loading files or plugins. Should be minimal or zero when playing or recording. You can run specific tests for xruns with xruncounter from https://github.com/Gimmeapill/xruncounter

 

I think it is worth paying a few bucks to get the latest Ardour rather than the old repo version. I paid 5 bucks and have v.8.6.0 and it covers updates until v.9.

The KX repo is less useful than it used to be as the devs focus mainly on their own projects and quite a few 3rd party plugins are now a version or more behind upstream. I get LSP from upstream and contribute to his Patreon. I use Qjackctl in preference to Cadence (setup of rncbc repo shown in attached guide).

 

I wrote a guide for setting up my system with KDE Plasma, on Intel and Nvidia hardware. Some of it may be relevant for you. File attached.

bookworm-setup.txt

The easiest way however to have a functioning audio production system is to use a dedicated distro. AVL-MXE is excellent; the latest version uses Enlightenment desktop which is very lean. It's based on MX which is based on Debian Bookworm.

 

Lotsa luck, and say hi to the rabbits!

  • Like 1
Link to comment
Share on other sites

Hedon James
Posted (edited)

EXCELLENT Sunrat....TY!

 

Maybe the biggest take from all that information is that "A few xruns are to be expected, mainly just when loading files or plugins. Should be minimal or zero when playing or recording."  I have that now, in my current setup, using DrumGizmo to capture MIDI and convert to analog prints.  I guess I was spoiled with my old setup, which was a stock Lubuntu that I added KX Studio Repos and configured to taste.  That setup never had xruns, with no tweaking.  So for me, THAT was the expected behavior; but you're telling me that was exceptional behavior.  And the xruns I'm noticing now aren't showing up during playback/recording runs.....they're showing up during Plugin loads/activations and change of settings.  Sounds like IF that's the case, THAT is somewhat to be expected?

 

My CPU is a Ryzen 5, with a discrete ATI video card.  I can't remember, but I may be bypassing that videocard for the onboard with the Ryzen 5.  Nevertheless, I'll run down some of your suggestions because I do want it to be the best it can be...even if tests confirm it's already there, I'll want to know that!  Since I'm using Ryzen, sounds like I can skip the C-states, and focus on threadirq and mitigation.

 

I am using the PA > Jack > ALSA setup...no pipewire (although looking forward to the day when it's the default in Debian!)  Since all hardware is IDENTICAL (remember, I just pulled my OLD drives, put new drives in and reinstalled, with no hardware changes whatsoever!) I made my Cadence settings in the new Debian exact clones of my old settings in Lubuntu.

 

Those Cadence settings include default settings on the Engine tab, and the Network tab isn't being used.  My Driver tab uses ALSA, with settings of 44100 sample rate (good enough for CDs, good enough for me), buffer of 256, and 2 periods/buffer; collectively yielding 5.8ms of latency.  BTW....this matches the latency on my dedicated drum station/windows laptop using ASIO driver.  My MIDI driver is ALSA Raw-MIDI.  Any settings that catch your eye that COULD be better?  Reading forums, I'm seeing suggestions that 3 periods/buffer would be better, but I'm not clear WHY.  What are your thoughts and advice?

 

TIA Sunrat!

Edited by Hedon James
Link to comment
Share on other sites

sunrat

I recall seeing 3 periods/buffer is recommended for USB sound cards, don't know why. It would be simple to test it. Mine is set to 2/512 but I have an old M-Audio 2496 PCI card and haven't done recording for ages.

Link to comment
Share on other sites

securitybreach

Well back at work. I can ask my boss what sound card he uses on his linux machine.

Link to comment
Share on other sites

securitybreach

Well no go on there:

 

Quote

good morning - i don't do any serious audio processing on Linux, probably just post-processing to make basic edits on WAV files so i've made no hardware or configuration changes with pulseaudio

 

all the composing and recording i do on a windows machine since the DAW i want to use is only available there, as are most of the plugins i like

 

Link to comment
Share on other sites

Hedon James
Posted (edited)
1 hour ago, securitybreach said:

good morning - i don't do any serious audio processing on Linux, probably just post-processing to make basic edits on WAV files so i've made no hardware or configuration changes with pulseaudio

 

all the composing and recording i do on a windows machine since the DAW i want to use is only available there, as are most of the plugins i like

 ^ that's actually pretty common, but there has been GREAT progress in the last 5+/- years.

 

Ardour started as a Linux DAW, but offers Windows & Mac versions.  That's my choice.  Harrison Mixbus is a somewhat newer DAW, based on Ardour, and is also cross platform.  REAPER is a more recent DAW, and is cross platform.  Studio One is a major player in the DAW arena and has recently started offering its DAW as a Beta on Linux; it's neither "free", nor "freeware", and requires a license registration, but it's the first MAJOR player in the audio production software arena to recognize the recent shift in professional audio users moving to Linux; and they're chasing those folks!  There are some other smaller DAW projects on Linux, but I'd say their niche and/or specialized use....such as LMMS, QTractor, Rosegarden....and they're Linux-only as far as I know.....so, very small user-base.  Once upon a time, ProTools was the big daddy of DAW software, and probably still is...for Win and Macs.  But Ardour, Harrison, REAPER, and Studio One have been putting some serious dents in the former ProTools userbase.  And it's not uncommon for folks to have more than 1 DAW, because some DAWs do some things better, and it's always smart to have a backup software, IMO.  I'm an Ardour guy, but I also have REAPER waiting in the wings.  REAPER has nice features for Drum VSTis and MIDI editing.  Ardour devs have indicated they're not interested in implementing those features (at this time), so who knows.....over time, I may become a REAPER guy.  I like 'em both, and they're both very solid on Linux.

 

Same thing goes for plugins....perhaps even moreso!  A lot of the gyrations I'm going through right now revolve around the dearth of Drum VST plugins for Linux.  There are a few, but they all lack SOMETHING that the dozens of Windows & Mac Drum VSTs offer.  There are so many for Windows & Mac that it's hard to choose which one is the right one for your use case.....MTPowerDrumkit (freeware), EZDrummer, SuperiorDrummer, StevenSlateDrums (SSD), AddictiveDrums, BFD, PerfectDrums....and these are just the more popular offerings.  There are at least as many "boutique" offerings that I haven't mentioned.  None of them are for Linux.  Ugritone Drums has recently started offering their Drum VSTi plugins as an "unadvertised" beta....and are now cross-platform.  So that's one, but hardly anyone knows about it.  The others are AVL Drumkits and DrumGizmo, and that's pretty much it.  AVL is probably the most polished plugin, but their 3 drumsets (including Red Zeppelin, Black Pearl, and Blonde Bop) do not have enough drums to map to all my skins.  Most kits are 5-piece (mine included), but AVL drums are only 4 (kick, snare, rack tom, and floor tom); I'll lose all my racktom2 hits, or have to completely change my playing style to avoid racktom2.  Better to change the software, IMO.  That leaves me with DrumGizmo by default.  I have always used DG to capture my MIDI; but then I moved the MIDI to a Win machine and processed the MIDI into analog drums with EZD, and then pulled that analog audio back into my Linux machine to finish the song/project.  The "other half" of DrumGizmo is the analog drum samples available.....they are VERY RAW.....the phrase "wysiwyg" comes to mind....mics only, no processing whatsoever.  To my untrained ears, they were unusable.  I have since learned a lot about audio production (but still know very little, LOL!) and am able to gate, EQ, compress, and add the right amount of reverb for a usable drum tone, and I can now process DG into a very strong resemblance of the pre-mixed EZD tones!  So DrumGizmo is only now just starting to get the nod from me as the preferred Drum VSTi for MY use-case scenario in Linux audio production!  It's still lacking a MIDI "table" to edit percussive notes/velocities, and a sequencer to edit grooves/measures, but I can duplicate that (with more effort) from within the DAW itself.  Not ideal, but making solid progress and that's a different problem for a different day.

 

And that's just a discussion for Drum VST plugins.  Extrapolate that to other plugin tools, and you'll see the same occurrence.  So many for Windows, it's hard to decide; so few for Linux, your preferred plugin will choose you, based on the fact that its the ONLY one that does that one thing that matters to you most.  But I've noticed the trend with DAWs on Linux, and plugin devs follow their DAWs; so it's only a matter of time until the plugins gain more variety also.  So you're boss is right, and I get it.  But it IS changing.

 

In the meantime, I made a change.  I've always used Calf Plugins....it's a carryover from my old days of Cubase DAW on Windows.  Calf looks familiar and is somewhat known to me.  I was ecstatic to find them in Linux-land.  But I'm learning from others in different forums that there are better issues, without various audio artefacts (that I don't hear...at least not at this time) that Calf introduces.  Fortunately, there's a PRIMO set of plugins for anything you might need on Linux...."Linux Studio Plugins" a/k/a LSP.  I've been slowly switching over and duplicating my Calf settings; and as I'm getting more familiar with LSP and the interface, I'm also noticing knobs and features that Calf didn't have.  So I'm digging the LSP plugins, and thinking I'll grow INTO them over time, rather than OUT OF.  And that's perfect for me....

 

In a nutshell, I'm reading articles that indicate major studios are looking at, or even already using, Linux as an audio production platform.  These are audio geeks and engineers akin to US as computer geeks/software hackers, and they are recognizing that Linux can easily do things with audio that Windows struggles with.  And time is money in the studio.  Stay tuned....this is another industry that Linux is primed to take over, and has reached enough of a user-base that perhaps critical mass to adoption is imminent?!

Edited by Hedon James
  • Like 1
Link to comment
Share on other sites

securitybreach

Thanks James, I passed that along to my boss.

 

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.

Guest
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...