WEBVTT

00:00.000 --> 00:08.000
Well, I'm kicking it off today, here at the music production

00:08.000 --> 00:15.000
Deafroom. My name is Jeremy. First of all, I want to thank

00:15.000 --> 00:20.000
Luencio, Minero, and Stephen Goodwin for hosting this music production

00:20.000 --> 00:29.000
Deafroom. And let me move on. Like I said before, my name is Jeremy.

00:29.000 --> 00:36.000
I'm also known as Autostatic on the Interwebs, that's my nickname.

00:36.000 --> 00:42.000
I'm a Linux specialist engineer by trade, so that's my work.

00:42.000 --> 00:50.000
I work for Surf, which is the Dutch National Research and Education Network.

00:50.000 --> 00:56.000
And there I am, I'm a Linux specialist, so I'm maintaining the internal Linux systems.

00:57.000 --> 01:03.000
What I didn't add here is that I'm also a musician, I make music, I play guitar, I do vocals.

01:03.000 --> 01:07.000
And I play in several bands, punk rock bands, indie rock bands.

01:07.000 --> 01:14.000
And I've been making music since I was 14, I'm 52 now, so that's almost 40 years.

01:14.000 --> 01:20.000
And when it comes to Linux, I've been using it since, like, the end of the 90s.

01:20.000 --> 01:28.000
And I got involved in doing audio with Linux around 2007.

01:28.000 --> 01:35.000
And I really got hooked up during the first Linux audio conference that I visited in 2010 in Utrecht.

01:35.000 --> 01:42.000
And then that really got me going regarding Linux audio and doing music production on Linux.

01:42.000 --> 01:47.000
But back to the, back to the matter at hand.

01:47.000 --> 01:55.000
When you want to, when you want to start doing music production on your Linux machine,

01:55.000 --> 01:59.000
you have to start somewhere, of course.

01:59.000 --> 02:04.000
First of all, you start with your hardware, so your computer and audio interface.

02:04.000 --> 02:09.000
Also cables, yeah, I can demo it later on.

02:09.000 --> 02:14.000
Maybe, or you can ask me afterwards, if you have any questions or I can show stuff.

02:14.000 --> 02:21.000
I recently bought a USB cable from a renowned Dutch company.

02:21.000 --> 02:26.000
All my cables are from the same brands, also the microphone cable, speaker cables.

02:26.000 --> 02:30.000
USB cables also, I bought a new cable, plugged it in.

02:30.000 --> 02:35.000
And I wiggle it a bit, and my interface was just failing.

02:35.000 --> 02:38.000
So those kind of things happen.

02:38.000 --> 02:43.000
So cables are really important.

02:43.000 --> 02:48.000
Then you have your equipment, your computer and such.

02:48.000 --> 02:52.000
And you move on, of course, you have to install a distribution on it.

02:52.000 --> 02:55.000
Kind of speaks for itself.

02:55.000 --> 03:00.000
Then you move on with installing yourself where you want to use.

03:00.000 --> 03:02.000
You can choose for a modular setup.

03:02.000 --> 03:08.000
So you have different pieces of software talking with each other using Jack or 5 wire.

03:08.000 --> 03:11.000
Or you can use a monolithic approach.

03:11.000 --> 03:21.000
So use Reaper, Bitwig, other studio fender or anything else that runs on Linux.

03:21.000 --> 03:28.000
And when you're using this monolithic approach, you can add your plugins in there.

03:28.000 --> 03:30.000
You can also be done with a modular setup.

03:30.000 --> 03:35.000
If you use something like a walking host like Carla or use your doll as a walking host.

03:35.000 --> 03:40.000
And then connect all your other stuff to it.

03:40.000 --> 03:47.000
Next up is like you have to choose an audio framework.

03:47.000 --> 03:55.000
That you want to use, because like when you use a monolithic approach, you have bit more choice.

03:55.000 --> 03:59.000
Because with a modular approach, you cannot use the driver directly, the driver's deck.

03:59.000 --> 04:01.000
Like the also driver's deck.

04:01.000 --> 04:04.000
So you have to then resort to or resort to.

04:04.000 --> 04:07.000
You can use pipe wire or jack for that in the modular setup.

04:07.000 --> 04:12.000
You can also use jack or pipe wire with the with order or with Reaper.

04:12.000 --> 04:21.000
But most of the time it's like it's when you're using a monolithic setup,

04:21.000 --> 04:25.000
it's easier to use just the driver's deck.

04:25.000 --> 04:30.000
So just click else on and everything should work magically.

04:30.000 --> 04:34.000
Well, not always, but we'll see later.

04:34.000 --> 04:43.000
Next up is if you want to go a little bit further and use a different kernel.

04:43.000 --> 04:47.000
You can use a standard kernel in generic kernel.

04:47.000 --> 04:50.000
It's these days more than kernel like that.

04:50.000 --> 04:52.000
Six, six.

04:52.000 --> 04:53.000
I'm sorry.

04:53.000 --> 04:58.000
The six version is it's pretty good for doing low lights the audio.

04:58.000 --> 05:00.000
So that's already quite okay.

05:00.000 --> 05:03.000
You can also use a specialized kernel.

05:03.000 --> 05:06.000
Like a real time kernel, not really necessary anymore.

05:06.000 --> 05:10.000
These days or something like specialized kernel like the Liquorix.

05:10.000 --> 05:15.000
They offer specialized kernel more or less for gaming and media stuff.

05:15.000 --> 05:21.000
Also does well for audio and music production.

05:21.000 --> 05:27.000
Then of course you have to set your buffers, which is sounds a bit esoteric.

05:27.000 --> 05:36.000
But the buffers is like the some kind of cash between your audio software and your audio interface.

05:36.000 --> 05:44.000
Your operating system has to buffer something before it can receive or send the audio.

05:44.000 --> 05:53.000
And of course you can set your buffers as low as you as low as possible.

05:53.000 --> 06:01.000
But then you have other issues like when you load your plugin or you have a lot of tracks.

06:01.000 --> 06:05.000
Then you can see the load of your system going up.

06:05.000 --> 06:12.000
And you have to find a nice balance, especially when doing mixing for example.

06:12.000 --> 06:16.000
Of the buffer size and the load on your machine.

06:16.000 --> 06:21.000
So for example when you're doing live stuff, you want your buffer size to be as low as possible.

06:21.000 --> 06:27.000
Because when you press a key on the media keyboard, you want it to be output immediately as fast as possible.

06:27.000 --> 06:33.000
But that comes with a drawback that these B load can get high quickly.

06:33.000 --> 06:37.000
If you're on a less performing machine.

06:37.000 --> 06:49.000
But with modern machines you can go quite low and do quite a lot of stuff at the same time at low buffer sizes.

06:49.000 --> 06:54.000
Most people are using USB devices these days.

06:54.000 --> 07:00.000
And on Linux you can configure your buffer size to accommodate for that.

07:00.000 --> 07:15.000
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.

07:15.000 --> 07:29.000
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.

07:29.000 --> 07:39.000
But what you also want to know is when starting with machine production is what the round trip latency of your system is.

07:39.000 --> 07:50.000
That means that if you connect that name put an output and use a specialized software or order can do it also.

07:50.000 --> 07:56.000
You can measure the round trip latency how much it takes signal from the output to the inputs.

07:56.000 --> 08:09.000
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.

08:09.000 --> 08:12.000
You can compensate for it.

08:12.000 --> 08:19.000
But that's more than you go already into detail for what a dog can do.

08:19.000 --> 08:27.000
I just was shown on a device that runs on Linux that is a base based guitar effects unit.

08:27.000 --> 08:32.000
It has a round trip latency of 1.3 milliseconds which is amazing.

08:32.000 --> 08:38.000
It runs with a buffer of 16 which is one of the lowest buffers you can get.

08:38.000 --> 08:40.000
So that's amazing stuff.

08:40.000 --> 08:47.000
So that is possible but that's really for a live setup.

08:47.000 --> 08:51.000
Then that's really nice to have.

08:51.000 --> 08:54.000
Of course the last thing you need is time.

08:54.000 --> 09:01.000
You have to commit yourself be patient with what's trying to achieve.

09:01.000 --> 09:04.000
And sometimes stuff can go wrong.

09:04.000 --> 09:07.000
You have to get ready for that.

09:07.000 --> 09:13.000
You could lose a session or you could have huge glitches or audio problems.

09:13.000 --> 09:19.000
But there's a lot of help out there so you can always ask.

09:19.000 --> 09:34.000
And you have to find a time to accept that sometimes things do not go the way you want them to.

09:34.000 --> 09:42.000
Next up is how you can improve the performance once you have setup your machine.

09:42.000 --> 09:48.000
Because there are a few steps you can take to get the most out of your machine.

09:48.000 --> 09:53.000
First thing you can do is check the CPU skating governor.

09:53.000 --> 09:58.000
Most of the times it's said to like power save or on demand.

09:58.000 --> 10:03.000
Which means that the CPU is scaling its frequencies.

10:03.000 --> 10:09.000
When the computer is doing nothing it runs at low frequency when the computer has to do a lot.

10:09.000 --> 10:11.000
It runs at high frequency.

10:11.000 --> 10:17.000
What you want to do with when doing audio is to have a constant frequency scale.

10:17.000 --> 10:19.000
And preferably the fastest one.

10:19.000 --> 10:23.000
The highest one so that is in most cases performance.

10:23.000 --> 10:31.000
So you can tell your system to use that governor.

10:31.000 --> 10:34.000
And make sure it runs at governor all the time.

10:34.000 --> 10:37.000
So that the CPU doesn't scale when you're doing audio.

10:37.000 --> 10:42.000
Because when it scales it can happen that an external occurs.

10:42.000 --> 10:46.000
An external is a buffer underrun in the driver stack.

10:46.000 --> 10:48.000
And you don't want that.

10:48.000 --> 10:52.000
So make sure it runs the highest available governor.

10:52.000 --> 10:56.000
Next thing is the simultaneous multi-freading.

10:56.000 --> 10:58.000
Also known as high-preferting.

10:58.000 --> 11:03.000
That means basically means that a chorus means will be split into two.

11:03.000 --> 11:10.000
And different threats are running on the same core simultaneously.

11:10.000 --> 11:14.000
Some audio programs are not very fond of that artist.

11:14.000 --> 11:25.000
So it is best to or you could choose for disabling it.

11:25.000 --> 11:31.000
And then have only your real physical course running.

11:31.000 --> 11:35.000
And have your audio software running on those physical course.

11:35.000 --> 11:38.000
And in some cases like with other.

11:38.000 --> 11:42.000
And probably also with other dollars software.

11:42.000 --> 11:52.000
It can be an option to get less excellence and less buffer underruns.

11:52.000 --> 11:55.000
Another thing is the CPU DMA latency.

11:55.000 --> 12:01.000
Processor wants to go into power saving mode when it doesn't do anything.

12:01.000 --> 12:06.000
And if you set the DMA latency to zero then that doesn't happen.

12:06.000 --> 12:10.000
And you can set it in order for example.

12:10.000 --> 12:16.000
This also makes sure that the CPU doesn't do anything you don't want.

12:16.000 --> 12:23.000
When you're doing audio it just stays at the same power saving mode.

12:23.000 --> 12:28.000
It stays on or active to stay all the time.

12:28.000 --> 12:33.000
This can also help very much in reducing the electrons.

12:34.000 --> 12:38.000
Of course you want a user to set real time priorities.

12:38.000 --> 12:45.000
You can prioritize processes and threats on only the system.

12:45.000 --> 12:51.000
And if you're doing audio the real time priorities is what you want to work with.

12:51.000 --> 12:53.000
That's also an order for example.

12:53.000 --> 12:57.000
It has audio threats and it sets a real time priority for it.

12:57.000 --> 13:12.000
In order to do that you have to give your user the right permissions to set those priorities.

13:12.000 --> 13:23.000
And you could run a specialized kernel or use kernel options to improve the kernel you're already running.

13:23.000 --> 13:35.000
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.

13:35.000 --> 13:42.000
So you can set the preemption level but by default it's already full I think so in most cases.

13:42.000 --> 13:47.000
So that means that you have a kernel that is already.

13:47.000 --> 13:55.000
Well it's already very capable doing real time audio stuff.

13:55.000 --> 14:02.000
Yeah that's that's those are the most important things to improve the problems of your Linux system.

14:02.000 --> 14:05.000
There are also some.

14:05.000 --> 14:12.000
There are also some myths and lore going around or of what you can do more to improve the.

14:12.000 --> 14:15.000
The performance of your system.

14:15.000 --> 14:19.000
And that is to change the frequency of the clock source as well.

14:19.000 --> 14:23.000
There are there were someone who said on the internet.

14:23.000 --> 14:30.000
Even recently that software like Rose Garden which is you know sequencer uses the HPEAT clock source.

14:30.000 --> 14:38.000
I grab the source it doesn't do it anymore because it relies on something else now.

14:39.000 --> 14:42.000
Same goes for the kernel time of frequency.

14:42.000 --> 14:53.000
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.

14:53.000 --> 14:56.000
Most if not all.

14:56.000 --> 14:58.000
Audio software when you.

14:58.000 --> 15:04.000
Start it up and you check the timers if you're system you see a new timer getting added which is the.

15:05.000 --> 15:08.000
Also a high resolution timer.

15:08.000 --> 15:14.000
Which has a resolution of one megahertz so that's lot more than a thousand hertz you can configure with the config.

15:14.000 --> 15:27.000
HZ setting of your kernel so just use that and don't bother with the kernel timer settings.

15:27.000 --> 15:30.000
You can also use threat to the IQs.

15:30.000 --> 15:35.000
That means that every system as I accuse of course to.

15:35.000 --> 15:38.000
Communicate with the peripherals.

15:38.000 --> 15:42.000
You can prioritize those so that they don't get prevented.

15:42.000 --> 15:46.000
But people then add threat your cues to their kernel options.

15:46.000 --> 15:49.000
But then the next thing you do is like they do nothing with it.

15:49.000 --> 15:53.000
They think that already the option alone does magic but it doesn't.

15:53.000 --> 15:59.000
You have to configure it later on.

15:59.000 --> 16:07.000
Well using the real time kernel it's not really necessary anymore because since like September two to two thousand twenty four.

16:07.000 --> 16:14.000
With the six point twelve I think the whole real time pet shed was like merged with the main kernel.

16:14.000 --> 16:15.000
Yep.

16:16.000 --> 16:23.000
And so it's not really necessary to run a real time kernel anymore because you have.

16:23.000 --> 16:28.000
Like I said it's most going to also running in pre and dynamic mode so you can.

16:28.000 --> 16:32.000
Add a kernel option if you really need to.

16:32.000 --> 16:37.000
Re-nice processes it's another thing that people tend to do.

16:37.000 --> 16:40.000
It doesn't really work because this.

16:40.000 --> 16:43.000
The scheduler's thingy for nice is.

16:43.000 --> 16:47.000
Get other while we're in the audio realm.

16:47.000 --> 16:49.000
You work with real time priorities.

16:49.000 --> 16:52.000
Let's get fefo or get our our realm moving.

16:52.000 --> 16:54.000
And.

16:54.000 --> 16:58.000
Well any any process that has been nice will be prevented by a real time.

16:58.000 --> 17:00.000
I prioritize process so.

17:00.000 --> 17:03.000
Doesn't really do anything.

17:03.000 --> 17:08.000
And then there's this I notify max user where to watch is that pops up every time.

17:08.000 --> 17:12.000
On every weeky base that somebody starts up.

17:12.000 --> 17:21.000
It's something something that people Google and then they just put it on their wiki because apparently you have to do this.

17:21.000 --> 17:23.000
But it does really nothing.

17:23.000 --> 17:28.000
The only thing this does is like hiring or raising.

17:28.000 --> 17:32.000
The amount of files a program can watch.

17:32.000 --> 17:35.000
You need it for when you're developing for example.

17:35.000 --> 17:42.000
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.

17:42.000 --> 17:44.000
Subdirectories.

17:44.000 --> 17:48.000
Then you need all those watches because your IDE wants to know what's going on in all the other.

17:48.000 --> 17:49.000
Directors.

17:49.000 --> 17:55.000
But in case of for a doll or doing a modular setup this has really no use.

17:55.000 --> 18:02.000
The tools you can use to.

18:02.000 --> 18:07.000
Check the latest or check your system or improve the system.

18:07.000 --> 18:10.000
I wrote a tool called RTCQS.

18:10.000 --> 18:14.000
So the real time real time configuration quick scan.

18:14.000 --> 18:20.000
It wasn't initially worth my re-boof by Ernest Nengla who did a talk yesterday for the next.

18:20.000 --> 18:26.000
And it wasn't written in Pearl but I reported it to Python.

18:26.000 --> 18:33.000
On top of that somebody built a nice GTK4 or 5 UI even called Miller second.

18:33.000 --> 18:39.000
Which is really nice but under the hood that uses RTCQS.

18:39.000 --> 18:43.000
You can check the DSP load in order or with check.

18:43.000 --> 18:47.000
So you can see how much have room you have left.

18:47.000 --> 18:55.000
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.

18:55.000 --> 19:06.000
But you can also then use the DSP load to balance find a balance here buffer size or try tweaking stuff.

19:06.000 --> 19:11.000
So that the DSP load might decrease.

19:11.000 --> 19:19.000
You can use action counter to that's a little C program written by Ernest Nengla from the GTK3.

19:19.000 --> 19:22.000
It's a bit of a spinoff small project.

19:22.000 --> 19:25.000
You can use it to do stress tests.

19:25.000 --> 19:33.000
It then runs something to erase the DSP load and then at a certain moment it builds up with an x run.

19:33.000 --> 19:40.000
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.

19:40.000 --> 19:45.000
When the first x run occurs at which DSP load.

19:45.000 --> 19:47.000
It's a real fun tool.

19:47.000 --> 19:52.000
I could show it afterwards if you want to.

19:52.000 --> 19:57.000
You can also use the renowned cyclic test.

19:57.000 --> 20:04.000
I was just told that with the device with the 16 frames buffer with 1.3 rounds of latency.

20:04.000 --> 20:09.000
They did cyclic test on it and it had like a 5 millisecond microsecond.

20:09.000 --> 20:11.000
Yeah, microsecond.

20:11.000 --> 20:13.000
So I could test this in microseconds.

20:13.000 --> 20:18.000
I like a system latency of 5 microseconds.

20:18.000 --> 20:26.000
Although my machine I get like between 30 and 60s.

20:26.000 --> 20:32.000
And you could check the IOLAIDC in order that's the round trip latency.

20:32.000 --> 20:42.000
You can you can check or you can use that tool to know your system better.

20:42.000 --> 20:45.000
You could also dive even deeper.

20:45.000 --> 20:49.000
Prior to our prioritize your IRQs.

20:49.000 --> 20:51.000
There are software for that.

20:51.000 --> 20:55.000
You could disable kernel mitigations or use different kernel options.

20:55.000 --> 20:58.000
I want to dive deeper into that because after hurry up a little.

20:58.000 --> 21:00.000
But I'm already at the end of my presentation.

21:00.000 --> 21:02.000
So you can reach me here.

21:02.000 --> 21:05.000
I will be sticking around in this room for the rest of the day.

21:05.000 --> 21:06.000
I think so.

21:06.000 --> 21:11.000
Well, thank you for listening and enjoy the rest of the talks.

21:11.000 --> 21:12.000
Thanks, Jeremy.

21:12.000 --> 21:17.000
Well, what was which presentation?

21:17.000 --> 21:20.000
As if could you come and start switching?

21:20.000 --> 21:25.000
If you have some questions for Jeremy, we have a couple of time for a couple of them.

21:25.000 --> 21:30.000
You can use the mic so that people from home can listen to them too.

21:30.000 --> 21:31.000
Hey.

21:31.000 --> 21:33.000
Thank you for the nice talk.

21:33.000 --> 21:34.000
Thank you.

21:34.000 --> 21:39.000
When you're in a creative space.

21:39.000 --> 21:42.000
When you want to be in a creative space.

21:42.000 --> 21:48.000
And configuring the whole machine kind of gets you out of that flow.

21:48.000 --> 21:52.000
Do you think there should be some kind of a spin that configures everything in the most

21:52.000 --> 21:53.000
effective manner.

21:53.000 --> 21:57.000
And you can just get up and boosts going like music spin of a distro.

21:57.000 --> 21:59.000
Is there something really like that?

21:59.000 --> 22:03.000
Because a piece of software that can configure your machine for you.

22:03.000 --> 22:07.000
Yeah, like a spin, a Linux spin that has all the music.

22:07.000 --> 22:08.000
Okay.

22:08.000 --> 22:09.000
Congratulations.

22:09.000 --> 22:10.000
So yeah, optimally configured.

22:10.000 --> 22:11.000
That you can see.

22:11.000 --> 22:14.000
It's getting a bit busier before changing.

22:14.000 --> 22:20.000
Yeah, I just mean that a Linux spin that has all the essential configurations set everything

22:20.000 --> 22:23.000
that you can just boot up and then get going.

22:23.000 --> 22:28.000
You don't have to muck around with the configs when you want to start making music.

22:28.000 --> 22:29.000
Oh, yeah.

22:29.000 --> 22:32.000
You mean like a spin like a music spin.

22:32.000 --> 22:35.000
Yeah, a customized distribution.

22:35.000 --> 22:36.000
Yeah.

22:36.000 --> 22:40.000
Something like that already exists is called AVL Linux.

22:40.000 --> 22:42.000
So yeah, that's that's possible.

22:42.000 --> 22:45.000
But it's very dependable on your machine.

22:45.000 --> 22:49.000
So you cannot move it to another machine because then probably works less.

22:49.000 --> 22:50.000
Good.

22:50.000 --> 22:51.000
Other questions?

22:51.000 --> 22:52.000
Oh.

22:52.000 --> 22:53.000
It's not so much about question.

22:53.000 --> 22:56.000
It's a comment regarding the tools.

22:56.000 --> 23:02.000
Something coming in next check release.

23:02.000 --> 23:08.000
Because there's currently an issue where you're trying to measure your CPU load or DSP load

23:08.000 --> 23:10.000
in the check graph.

23:10.000 --> 23:14.000
Right now it uses an average which sometimes can look wrong.

23:14.000 --> 23:18.000
So the next release going to support also a maximum value, which is much more useful.

23:18.000 --> 23:21.000
Because of the spikes within the DSP load.

23:21.000 --> 23:22.000
Exactly.

23:22.000 --> 23:27.000
If you have a maximum value is a lot useful for knowing your performance of the system.

23:27.000 --> 23:28.000
Yeah.

23:28.000 --> 23:32.000
Not really a question with the comment for the next stuff to come that we can add in the tools.

23:32.000 --> 23:33.000
Thanks.

23:33.000 --> 23:34.000
Yeah.

23:34.000 --> 23:35.000
Awesome.

