Dev notes for VCV Rack

I’ve started a new project to capture my Rack development notes. Here I share various topics on the development of VCV Rack modules, from my practice. I don’t claim that my practices are ideal or “best” practice, but it’s stuff I’ve found to work for me and my plugins. At the moment, much of this is derived from previous posts on this forum, edited to stand alone.

Initial notes:

Note Description
Use GenericBlank Use the #d Generic Blank template repo to start a new plugin.
Project structure File layout of Rack plugin
Build Rack A.K.A. No SDK.
Panels My Panel process, plus tips for using Inkscape.
Jitter periodic updates Mitigate CPU spikes by adding jitter to periodic (control-rate) code.
Doc images Preparing module images for documentation.

The full (clickable) table of contents is here: Rack dev notes (by pachde #d)

As you can see from the full TOC, I have mapped out a few more topics that I have yet to write. If you have requests for a new topic, let me know. I’ll probably never write about DSP (not really qualified). My work so far has been mainly MIDI and UI.

Jitter periodic updates is the latest note, added a few minutes ago.

I’ll update this thread for new notes or significant updates.

10 Likes

Check out my latest dev note on Rack dev notes (by pachde #d)

Note Description
Hot-reload SVGs For fast iteration on panel SVGs, implement hot-reloading.

This note gives step-by-step instructions and all the code needed to implement panel SVG reloading at the touch of a key or the right click menu. Now you can see updates to your panel graphics as Rack is running. No more build/restart cycle! Instant gratification! (Even if not automatic.)

3 Likes

Check out my latest dev notes on Rack dev notes (by pachde #d)

Note Description
Build Rack Updated with steps for updating after a new Rack release.
Debugging Setting up Rack debugging in VSCode on Windows
2 Likes

More updates. I’m on a bit of a roll as I wait for VCV Rack to process my submission of pachde CHEM.

  • I’ve added instructions for building a dev build of Rack (and maintaining it across updates).
  • For SVG hot-swap, I added an even more minimal implementation.
3 Likes

New Dev note!

Dialogs : Making message boxes and popup dialogs suitable for more complex module configuration.

2 Likes

Thank you for these - I’m following along to learn. Right now I have rack building from source and the blank panel working.

A few notes -

Rack’s Core plugins don’t work right now because the json file is missing a version. Copying over the version info from fundamentals fixed that for me.

Installing bear (GitHub - rizsotto/Bear: Bear is a tool that generates a compilation database for clang tooling.) and building rack with it creates a json file that clangd will look at in order to figure out where files are. That was all I needed to get lsp stuff working in my editor of choice (zed) - I imagine this is pretty standard but I’m not usually writing C++ so this was new for me.

The part about Core doesn’t make any sense to me. My installs of Free and Pro have a Core.json without a version, and they both work fine, so having a version is clearly not necessary. Core modules aren’t in a plugin at all. They’re built into Rack.exe. So, if your Core modules weren’t working, then there is some other issue.

I had a problem with Core removing the version info as well when it was introduced; that said, it is not necessary to copy anything; you just need to set an environment variable before building:

In bash:

export RACK_VERSION=2.6.3

In fish:

set -x RACK_VERSION 2.6.3

The examples above are for Rack version 2.6.3, adjust as needed.

The error:

[0.070 info src/plugin.cpp:131 loadPlugin] Loading Core plugin
[0.070 warn src/plugin.cpp:203 loadPlugin] Could not load plugin : No plugin version

Edit: add error example.

RACK_VERSION is automatically set from the Makefile with git describe --tags --match "v2.*". If git isn’t installed, or if git didn’t pull tags for some reason, or you’re pulling a repo fork that doesn’t include tags, or you’re building a ZIP of the source, I’ve made the Makefile fall back to the version “2.dev” in the next version of Rack.

5 Likes

Thanks :slight_smile: