Details and comparison of miRack and VCV Rack multithreading implementation and performance

I implemented multitheading for miRack audio engine back in 2018 when it was a project targeting single-board computers because with slower CPUs it’s essentially a requirement to be able to run any decently-sized patches. The implementation (available here and is used in miRack app with minor modifications) is based on idea of having arrays for module input and output values, and a lock-free concurrent work queue implementation by Cameron Desrochers.

For each rendering cycle, say 512 samples (steps), all rack modules are pushed into to a work queue, also with start and end steps to process (so initially that is 1 to 512), then worker threads are woken up. The worker threads dequeue modules from the work queue and check that values for the step being processed are present for all module inputs (for disconnected inputs this is always true). If all values are available, the module is processed and output values are saved straight in input arrays of modules connected to each output for the next step number. The process continues until the end step is reached or until any of the input values are not available, in which case the module is pushed back into the work queue (updating the start step if needed) and another module is pulled from the work queue. Once there is no more modules in the work queue, the workers pause, and the rendering cycle completes. This implementation ensures that workers don’t wait unless they have to.

Until recently I never looked at the multithreading implementation that later appeared in VCV Rack (available here), but wanted to run some benchmarks at some point.

During normal operation, VCV Rack implementation uses spinlocks only. For each step in a rendering cycle, workers process only that single step for each module. Once there are no more modules for a worker to pick up, it will spinwait until all workers have finished, then values are transferred from outputs to connected inputs, and the workers are woken up to process the next single step. This implementation causes the workers to wait a lot instead of possibly processing next steps for some modules.

Now to the benchmark. I used the current miRack code and the latest VCV Rack code. All graphics rendering was disabled, as well as audio output. For VCV Rack, updating port lights was also disabled – it involves a lot of computations that substantially affect the results while not being related to audio processing.

The audio engines were told to process 1024 samples (steps) as fast as they can, and it was repeated 1000 times for a single thread then for 2, 3, and 4 worker threads. The tests were performed on a CPU with 4 physical cores. The following patches (by VCV Rack Ideas were used):


ThreadsmiRack TimemiRack %VCV Rack TimeVCV Rack %Ideal %
1st Patch Results
ThreadsmiRack TimemiRack %VCV Rack TimeVCV Rack %Ideal %
2nd Patch Results

“%” column shows time difference to the single-threaded case, and “Ideal %” shows the best theoretically achievable improvement of N times for N threads.

Also I should note that initially it was about comparing multithreaded speed increase, not absolute values (at least because miRack and VCV Rack use different versions of some of the patch modules), but absolute values turned out to be quite interesting as well. As I mentioned above, port lights update code adds about another second to VCV Rack results.

miRack AU plugin is now available on macOS

miRack AU plugin is now available in Reaper, Logic Pro and GarageBand on macOS 10.15 (Catalina). Unfortunately, other DAWs don’t seem to support it currently.

miRack AUv3 plugin is now available

The wait is over, miRack AUv3 plugin is now available in your favourite host app or DAW. Can be used as an instrument or effect, and supports parameter automation. Enjoy!

miRack is now available on macOS 10.15

Many users asked for a way to work on their miRack projects on desktop, too. Initially I was planning to support exporting to and opening patches made in VCV Rack, but that does not seem to be achievable at the moment. Therefore, miRack is now also available as a free macOS app.

It contains all the same modules, supports Core MIDI and Ableton Link, and can open patches directly from miRack iCloud folder.

Several things to mention:

  • Although miRack supports opening a patch (located on iCloud) on multiple devices at the same time, I noticed that the “patch changed remotely” notifications that are displayed when the patch is changed on another device are a bit too annoying at the moment. This will be fixed in the next update, until then I recommend closing the app before opening the same patch on another device.
  • Currently, external assets, like samples loaded into certain modules, are not saved inside patch file. Therefore, when opening a patch with such modules on macOS after iOS (or the other way round), you will need to re-open assets in the modules using them. Asset management will be improved in the near future to solve this problems.
  • In general, it received much less testing than the iOS app, please report any issues you notice.

As it is essentially the iOS miRack app built for desktop, it requires macOS 10.15 (Catalina) or later to work.

Multi-touch, Ableton Link, new modules, and more in miRack 2.10

It’s been a while since the last miRack update, that’s because I was working on several big features – AUv3, multitouch, variable sample rate support, and also Metal rendering (this one is almost not noticeable for users users but is quite important going forward).

AUv3 is already being tested by the beta testers and is looking good, with last bits and pieces left to be done. In the meanwhile, here’s an update with everything else. There will be another one with some more fixes, and then AUv3.

App Features

  • Multi-touch. Enable in Tools menu to operate multiple knobs or other module controls at the same time.
  • Ableton Link support. Enable in Tools menu and use Stellare Modular Link module to synchronize your patch with other Link-enabled apps, including IAA host apps.
  • Variable sample rate. Audio engine now works at hardware sample rate. Preferred sample rate can be set in Tools -> Settings.
  • Metal rendering. This should reduce CPU usage and battery consumption.


  • Updated Audible Instruments module pack. Added Percussive Synthesizer (based on Mutable Instruments Peaks) and Tidal Modulator 2 (based on Mutable Instruments Tides 2) modules.
  • Updated Befaco, Frozen Wasteland, Squinky and Holonic Systems module packs.
  • Added MI module pack – based on AS modules by Alfredo Santamaria (
  • Added Valley Amalgam (signal masher and multipler) and Dexter (powerful FM wavetable oscillator in a single module).
  • Bogaudio spectre analyser modules are available again.
  • Submarine text display modules are available now.

Bug Fixes

  • Fixed some modules not showing under “Filter/VCF” tag.

miRack status update

It’s been quiet recently with no app updates for quite some time (by miRack standards). This is because I need to implement a number of internal and UI changes required for the upcoming features. This required some research and experimentation to make sure everything I planned is possible and won’t require significant API changes in the future, specifically so that I can release a stable SDK for plugin developers.

Everything went well, and although there’s still stuff left to do, you can expect new modules and features soon – some have been discussed and promised before, and some I haven’t mentioned yet.