Well, I'm kicking it off today, here at the music production
Deafroom. My name is Jeremy. First of all, I want to thank
Luencio, Minero, and Stephen Goodwin for hosting this music production
Deafroom. And let me move on. Like I said before, my name is Jeremy.
I'm also known as Autostatic on the Interwebs, that's my nickname.
I'm a Linux specialist engineer by trade, so that's my work.
I work for Surf, which is the Dutch National Research and Education Network.
And there I am, I'm a Linux specialist, so I'm maintaining the internal Linux systems.
What I didn't add here is that I'm also a musician, I make music, I play guitar, I do vocals.
And I play in several bands, punk rock bands, indie rock bands.
And I've been making music since I was 14, I'm 52 now, so that's almost 40 years.
And when it comes to Linux, I've been using it since, like, the end of the 90s.
And I got involved in doing audio with Linux around 2007.
And I really got hooked up during the first Linux audio conference that I visited in 2010 in Utrecht.
And then that really got me going regarding Linux audio and doing music production on Linux.
But back to the, back to the matter at hand.
When you want to, when you want to start doing music production on your Linux machine,
you have to start somewhere, of course.
First of all, you start with your hardware, so your computer and audio interface.
Also cables, yeah, I can demo it later on.
Maybe, or you can ask me afterwards, if you have any questions or I can show stuff.
I recently bought a USB cable from a renowned Dutch company.
All my cables are from the same brands, also the microphone cable, speaker cables.
USB cables also, I bought a new cable, plugged it in.
And I wiggle it a bit, and my interface was just failing.
So those kind of things happen.
So cables are really important.
Then you have your equipment, your computer and such.
And you move on, of course, you have to install a distribution on it.
Kind of speaks for itself.
Then you move on with installing yourself where you want to use.
You can choose for a modular setup.
So you have different pieces of software talking with each other using Jack or 5 wire.
Or you can use a monolithic approach.
So use Reaper, Bitwig, other studio fender or anything else that runs on Linux.
And when you're using this monolithic approach, you can add your plugins in there.
You can also be done with a modular setup.
If you use something like a walking host like Carla or use your doll as a walking host.
And then connect all your other stuff to it.
Next up is like you have to choose an audio framework.
That you want to use, because like when you use a monolithic approach, you have bit more choice.
Because with a modular approach, you cannot use the driver directly, the driver's deck.
Like the also driver's deck.
So you have to then resort to or resort to.
You can use pipe wire or jack for that in the modular setup.
You can also use jack or pipe wire with the with order or with Reaper.
But most of the time it's like it's when you're using a monolithic setup,
it's easier to use just the driver's deck.
So just click else on and everything should work magically.
Well, not always, but we'll see later.
Next up is if you want to go a little bit further and use a different kernel.
You can use a standard kernel in generic kernel.
It's these days more than kernel like that.
Six, six.
I'm sorry.
The six version is it's pretty good for doing low lights the audio.
So that's already quite okay.
You can also use a specialized kernel.
Like a real time kernel, not really necessary anymore.
These days or something like specialized kernel like the Liquorix.
They offer specialized kernel more or less for gaming and media stuff.
Also does well for audio and music production.
Then of course you have to set your buffers, which is sounds a bit esoteric.
But the buffers is like the some kind of cash between your audio software and your audio interface.
Your operating system has to buffer something before it can receive or send the audio.
And of course you can set your buffers as low as you as low as possible.
But then you have other issues like when you load your plugin or you have a lot of tracks.
Then you can see the load of your system going up.
And you have to find a nice balance, especially when doing mixing for example.
Of the buffer size and the load on your machine.
So for example when you're doing live stuff, you want your buffer size to be as low as possible.
Because when you press a key on the media keyboard, you want it to be output immediately as fast as possible.
But that comes with a drawback that these B load can get high quickly.
If you're on a less performing machine.
But with modern machines you can go quite low and do quite a lot of stuff at the same time at low buffer sizes.
Most people are using USB devices these days.
And on Linux you can configure your buffer size to accommodate for that.
Because the USB protocol uses a kind of also a queue mechanism that takes about 1 millisecond to get the packages from your system to the USB device.
So if you can match your buffer size with that 1 millisecond rule, then you run into less issues with those x runs or glitches or kind of stuff.
But what you also want to know is when starting with machine production is what the round trip latency of your system is.
That means that if you connect that name put an output and use a specialized software or order can do it also.
You can measure the round trip latency how much it takes signal from the output to the inputs.
You can measure that and of course you want an audio device that has the lowest possible around your latency especially when you're doing live stuff of course.
You can compensate for it.
But that's more than you go already into detail for what a dog can do.
I just was shown on a device that runs on Linux that is a base based guitar effects unit.
It has a round trip latency of 1.3 milliseconds which is amazing.
It runs with a buffer of 16 which is one of the lowest buffers you can get.
So that's amazing stuff.
So that is possible but that's really for a live setup.
Then that's really nice to have.
Of course the last thing you need is time.
You have to commit yourself be patient with what's trying to achieve.
And sometimes stuff can go wrong.
You have to get ready for that.
You could lose a session or you could have huge glitches or audio problems.
But there's a lot of help out there so you can always ask.
And you have to find a time to accept that sometimes things do not go the way you want them to.
Next up is how you can improve the performance once you have setup your machine.
Because there are a few steps you can take to get the most out of your machine.
First thing you can do is check the CPU skating governor.
Most of the times it's said to like power save or on demand.
Which means that the CPU is scaling its frequencies.
When the computer is doing nothing it runs at low frequency when the computer has to do a lot.
It runs at high frequency.
What you want to do with when doing audio is to have a constant frequency scale.
And preferably the fastest one.
The highest one so that is in most cases performance.
So you can tell your system to use that governor.
And make sure it runs at governor all the time.
So that the CPU doesn't scale when you're doing audio.
Because when it scales it can happen that an external occurs.
An external is a buffer underrun in the driver stack.
And you don't want that.
So make sure it runs the highest available governor.
Next thing is the simultaneous multi-freading.
Also known as high-preferting.
That means basically means that a chorus means will be split into two.
And different threats are running on the same core simultaneously.
Some audio programs are not very fond of that artist.
So it is best to or you could choose for disabling it.
And then have only your real physical course running.
And have your audio software running on those physical course.
And in some cases like with other.
And probably also with other dollars software.
It can be an option to get less excellence and less buffer underruns.
Another thing is the CPU DMA latency.
Processor wants to go into power saving mode when it doesn't do anything.
And if you set the DMA latency to zero then that doesn't happen.
And you can set it in order for example.
This also makes sure that the CPU doesn't do anything you don't want.
When you're doing audio it just stays at the same power saving mode.
It stays on or active to stay all the time.
This can also help very much in reducing the electrons.
Of course you want a user to set real time priorities.
You can prioritize processes and threats on only the system.
And if you're doing audio the real time priorities is what you want to work with.
That's also an order for example.
It has audio threats and it sets a real time priority for it.
In order to do that you have to give your user the right permissions to set those priorities.
And you could run a specialized kernel or use kernel options to improve the kernel you're already running.
I don't think there are any kernel that like the generic kernels for like Debian or Ubuntu or Arch there are already running in preempt dynamic if I'm correct correct.
So you can set the preemption level but by default it's already full I think so in most cases.
So that means that you have a kernel that is already.
Well it's already very capable doing real time audio stuff.
Yeah that's that's those are the most important things to improve the problems of your Linux system.
There are also some.
There are also some myths and lore going around or of what you can do more to improve the.
The performance of your system.
And that is to change the frequency of the clock source as well.
There are there were someone who said on the internet.
Even recently that software like Rose Garden which is you know sequencer uses the HPEAT clock source.
I grab the source it doesn't do it anymore because it relies on something else now.
Same goes for the kernel time of frequency.
People change it to a thousand hertz because they think that they have less jitter or less or that it sounds better or that they're computers more responsive but.
Most if not all.
Audio software when you.
Start it up and you check the timers if you're system you see a new timer getting added which is the.
Also a high resolution timer.
Which has a resolution of one megahertz so that's lot more than a thousand hertz you can configure with the config.
HZ setting of your kernel so just use that and don't bother with the kernel timer settings.
You can also use threat to the IQs.
That means that every system as I accuse of course to.
Communicate with the peripherals.
You can prioritize those so that they don't get prevented.
But people then add threat your cues to their kernel options.
But then the next thing you do is like they do nothing with it.
They think that already the option alone does magic but it doesn't.
You have to configure it later on.
Well using the real time kernel it's not really necessary anymore because since like September two to two thousand twenty four.
With the six point twelve I think the whole real time pet shed was like merged with the main kernel.
Yep.
And so it's not really necessary to run a real time kernel anymore because you have.
Like I said it's most going to also running in pre and dynamic mode so you can.
Add a kernel option if you really need to.
Re-nice processes it's another thing that people tend to do.
It doesn't really work because this.
The scheduler's thingy for nice is.
Get other while we're in the audio realm.
You work with real time priorities.
Let's get fefo or get our our realm moving.
And.
Well any any process that has been nice will be prevented by a real time.
I prioritize process so.
Doesn't really do anything.
And then there's this I notify max user where to watch is that pops up every time.
On every weeky base that somebody starts up.
It's something something that people Google and then they just put it on their wiki because apparently you have to do this.
But it does really nothing.
The only thing this does is like hiring or raising.
The amount of files a program can watch.
You need it for when you're developing for example.
When you have like an IDE that with a lot of folders open with a lot of source code in there with a lot of.
Subdirectories.
Then you need all those watches because your IDE wants to know what's going on in all the other.
Directors.
But in case of for a doll or doing a modular setup this has really no use.
The tools you can use to.
Check the latest or check your system or improve the system.
I wrote a tool called RTCQS.
So the real time real time configuration quick scan.
It wasn't initially worth my re-boof by Ernest Nengla who did a talk yesterday for the next.
And it wasn't written in Pearl but I reported it to Python.
On top of that somebody built a nice GTK4 or 5 UI even called Miller second.
Which is really nice but under the hood that uses RTCQS.
You can check the DSP load in order or with check.
So you can see how much have room you have left.
If you run a lot of plugins and you're already at like 80% DSP load then you know that you cannot add much more.
But you can also then use the DSP load to balance find a balance here buffer size or try tweaking stuff.
So that the DSP load might decrease.
You can use action counter to that's a little C program written by Ernest Nengla from the GTK3.
It's a bit of a spinoff small project.
You can use it to do stress tests.
It then runs something to erase the DSP load and then at a certain moment it builds up with an x run.
And that gives you kind of a starting point because then you can start comparing on other machines or on your own machine with different settings.
When the first x run occurs at which DSP load.
It's a real fun tool.
I could show it afterwards if you want to.
You can also use the renowned cyclic test.
I was just told that with the device with the 16 frames buffer with 1.3 rounds of latency.
They did cyclic test on it and it had like a 5 millisecond microsecond.
Yeah, microsecond.
So I could test this in microseconds.
I like a system latency of 5 microseconds.
Although my machine I get like between 30 and 60s.
And you could check the IOLAIDC in order that's the round trip latency.
You can you can check or you can use that tool to know your system better.
You could also dive even deeper.
Prior to our prioritize your IRQs.
There are software for that.
You could disable kernel mitigations or use different kernel options.
I want to dive deeper into that because after hurry up a little.
But I'm already at the end of my presentation.
So you can reach me here.
I will be sticking around in this room for the rest of the day.
I think so.
Well, thank you for listening and enjoy the rest of the talks.
Thanks, Jeremy.
Well, what was which presentation?
As if could you come and start switching?
If you have some questions for Jeremy, we have a couple of time for a couple of them.
You can use the mic so that people from home can listen to them too.
Hey.
Thank you for the nice talk.
Thank you.
When you're in a creative space.
When you want to be in a creative space.
And configuring the whole machine kind of gets you out of that flow.
Do you think there should be some kind of a spin that configures everything in the most
effective manner.
And you can just get up and boosts going like music spin of a distro.
Is there something really like that?
Because a piece of software that can configure your machine for you.
Yeah, like a spin, a Linux spin that has all the music.
Okay.
Congratulations.
So yeah, optimally configured.
That you can see.
It's getting a bit busier before changing.
Yeah, I just mean that a Linux spin that has all the essential configurations set everything
that you can just boot up and then get going.
You don't have to muck around with the configs when you want to start making music.
Oh, yeah.
You mean like a spin like a music spin.
Yeah, a customized distribution.
Yeah.
Something like that already exists is called AVL Linux.
So yeah, that's that's possible.
But it's very dependable on your machine.
So you cannot move it to another machine because then probably works less.
Good.
Other questions?
Oh.
It's not so much about question.
It's a comment regarding the tools.
Something coming in next check release.
Because there's currently an issue where you're trying to measure your CPU load or DSP load
in the check graph.
Right now it uses an average which sometimes can look wrong.
So the next release going to support also a maximum value, which is much more useful.
Because of the spikes within the DSP load.
Exactly.
If you have a maximum value is a lot useful for knowing your performance of the system.
Yeah.
Not really a question with the comment for the next stuff to come that we can add in the tools.
Thanks.
Yeah.
Awesome.