I highly recommend cloning Rack and building it from source, rather than using the SDK. Also clone Fundamental, and other open source modules you use frequently. Plugin sources, including your own should be under the cloned Rack source plugins
folder.
Doing this lets you see good examples of how things are done, and lets you step through Rack code to see how Rack interacts with your module. Stepping through in the debugger is a great way to observe what Rack and your code actually does.
Lots of us use VS Code, and searching here will have a number of posts that give a number of ways to set up building and debugging for your host environment.
(Optional) I modify Rack/compile.mk
to turn off optimizations to make it easier to step into Rack code in the debugger, as follows:
#FLAGS += -O3 -funsafe-math-optimizations -fno-omit-frame-pointer
FLAGS += -funsafe-math-optimizations -fno-omit-frame-pointer
This requires a modification to Rack/dep/oui-blendish/blendish.c
(line 64):
//#define BND_INLINE inline
#define BND_INLINE static
For debugging in VSCode it can be useful to see the Rack logs in the embedded console, which on Windows may require this change in Rack/Makefile
for STANDALONE_LDFLAGS
:
ifdef ARCH_WIN
STANDALONE_TARGET := Rack.exe
# STANDALONE_LDFLAGS += -mwindows
STANDALONE_LDFLAGS += -mconsole
Until Rack 2.5x is released, make install
is broken on Windows with OneDrive. This change in Rack/plugin.mk
(line 46) works around the issue:
ifdef ARCH_WIN
TARGET := $(TARGET).dll
LDFLAGS += -static-libstdc++
ifdef OneDrive
RACK_USER_DIR ?= $(OneDrive)/Documents/Rack2
else
RACK_USER_DIR ?= $(USERPROFILE)/Documents/Rack2
endif
endif
If you’re on a non-English machine, replace Documents
with the localized name of the docs older.
Other notes
-
Squinky has some great docs on antialiasing, and other DSP and plugin development and in his repo. See the thread at Help dealing with Aliasing? for references.
-
The Rack tutorial has you use helper.py
, which others have warned about. It’s only good for boostrapping the first time, and you really can’t use it for continued development when you need to change your UI. Using my template repo might be an easier place to start:
See Paul-Dempsey/GenericBlank: Template for a VCV Rack Blank module (github.com).
-
px
vs mm
: Might want to search on the topic of which units to use when designing your UI. The tutorial recommends mm
and conversion in code, but in practice most of us use px
. IMO the only reason to use mm
is when you’re faithfully cloning a hardware module that uses mm
in its design spec.
-
Case. Take care with the letter case of filenames, both on disk and referenced from code and makefiles. Make sure to match case exactly. If you’re developing on Windows, case mismatches will go unnoticed, but your plugin will have issues on Mac and Linux.
-
There are a few other common pitfalls and stumbling blocks that every new developer faces. If you run into something that’s taking a long time to figure out, search here and if you don’t find a solution, reach out here or on the VCV Discord. This is a friendly and helpful community.