I started recently to use the VCV rack and I dont know if its only something related to my computer but as long as I make a “complex” patch or add reverb or delay, there is a lot of dirt/noise coming up. I thought it was because I needed a sound card or smth but I tried now with a focusrite interface and headphones and it is still there…
None of OS that can run VCVRack are real-time operating systems, meaning there’s no guarantee that a program is granted certain amount of execution time. Or a guaranteed maximum time responding to events.
Rack works without glitches as long as it can compute a new audio buffer in less time than it takes to play an audio buffer. If Rack uses too much CPU, or the OS, or other applications uses too much CPU. Just drawing the Rack Window also takes a significant amount of time, and the screen drawing thread competes for processing time with the audio processing thread. That’s why you can play with fewer glitches when you turn down the screen refresh rate in Rack.
Other programs running at the same time also compete for processing tome. A big culprit for glitches is a web browser – Google Chrome is really into running many threads and rendering as fast as possible.
I was getting periodic massive glitches on my new computer until I turned off the WiFi network interface. Every so often it would pretty much freeze the whole system for a second or two which is kind of shitty for playing music.
As of 5.0, the Linux kernel supports RTOS out of the box. You probably need to be running JACK to enable it (and there are other requirements, usually related to group membership in the audio group and the limits of that group).
Having said that, I rarely run RT, as it just seems less convenient. I run on a laptop which isn’t particularly capable, so to get quality sound I have to render it, and RT isn’t really a consideration when you’re rendering the audio (via something like JACK or a built-in VCV recorder).
As of 5.0, the Linux kernel supports RTOS out of the box.
I spent a couple of years working with a hard realtime OS.
In order for REAL realtime to occur there are a bunch of things that have to happen:
The OS has to advertise and deliver a maximum time between an event and calling the event handler. ‘Events’ are usually hardware interrupts, but not exclusively.
Event handlers have to stay in a finite time window where they lock the CPU, preventing other event handlers from running.
foreground pregrams - i.e. the actual application to be delivered - also has to limit the time window where they lock exclusive CPU access.
Foreground programs have a finite window to delevier data. Example for our case: the application needs to fill a buffer with audio samples before it’s needed by the audio driver.
Linux isn’t that kind of hard realtime. A ‘realtime kernel’ is some form of soft realtime.
Well, equating “REAL” with “hard” seems somewhat idiosyncratic, but as this is an entirely pedantic discussion at this point, the existence of RTLinux should be admitted :
But it would probably be silly to make music with it. Cobbling together a working system together to make music would probably be a challenge that would not appeal to many people!
I used to run this patch set on my box:
but eventually stopped because it seemed more work that it was worth. I assume the code that went into 5.0 was a similar feature set.