Skip to content

Dev FAQ for VCV Rack

Jon Williams edited this page Feb 1, 2018 · 66 revisions

Questions are sorted from just starting out up to sharing your modules.

How do I start making modules?

  • You need to get Rack build first before you can start building modules in the plugins dir. So see questions below.

  • Clone the tutorial module into Rack/plugins Read the README.md. I would keep modifying the Tutorial Module until I had something I liked. This is easier than starting from scratch.

  • Build your modules and create a new release on github. Try to build for the three main architectures, mac, windows, and linux. If you don't have access to all of those, ask for help, and somebody will do it for you.

  • Add your manifest file here when you are ready to release. (Then users can add your plugin on https://vcvrack.com and hit refresh plugins in rack)

How do I learn C++?

How do I learn DSP to generate audio or make effects?

  • Here are some good posts about Making Audio Plugins by Martin Finke. These can be used as a C++/DSP reference.

  • Here is another nice blog with visuals and detailed explanations: Lucid Mesh

  • You might also be interested in Vult which can generate high performance DSP Code.

How do I build Rack on windows?

Watch this video tutorial by Leonardo Laguna Ruiz

How do I build Rack on mac?

Watch this video tutorial by Leonardo Laguna Ruiz

How do I build Rack on linux?

You will need gcc, make, cmake, tar, unzip, and maybe more. Personally I had to install more packages than the Rack README.md says. So if you run into an error look for a package name, google it, and install it with apt-get.

NOTE: glibc 2.23 is required to run Rack binaries

Here is a good distro.

For Ubuntu based distributions you need to install these as well: libx11-dev libgl1-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev zlib1g-dev libasound-dev g++ libglu1-mesa-dev libgtk2.0-dev.

How do voltages work?

The values at inputs[MY_INPUT].value and outputs[MY_OUTPUT].value are simply numbers which act like voltages in a hardware system.

Read more about that

How do I know what size my module should be?

1HP == 15px

3U == 380px

#define RACK_GRID_WIDTH 15
#define RACK_GRID_HEIGHT 380

How do I detect when a wire is connected to an input or an output?

inputs[MY_INPUT].active
outputs[MY_OUTPUT].active

How do I make SVGs?

  • Inkscape is a free and open source alternative. Works perfect on Linux and Windows, in Mac it does not feel native.
  • Gravit Designer is another free editor that can be used online or on Mac/Win/Linux.
  • Affinity Designer it's a very affordable (around $50) alternative comparable to Illustrator. It works perfect on Mac and Windows. See how to export for VCV below.

How do I import images into SVGs?

File > Import. Then right click the image and click Trace Bitmap. Then play with the settings until you get the level of detail you want.

Why is my text not showing up on the Module?

Text needs to be converted to paths in SVG.

How do I use Adobe Illustrator to make SVGs?

From Michael Hetrick: "...Use Export As... instead of Save As... Then use the following settings: Inline Style, Convert to Outlines, Embed, Layer Name, 5. Disable Minify and Responsive. If that doesn't work for you, start with just MyModule.svg (the one in the tutorial repo) re-export it to verify that at least the basic file works. After that, add in your elements one by one and export each time until you figure out which element is broken."

How do I use Affinity Designer to make SVGs?

Use File->Export select SVG and click in More to define the following settings: Export Text as Curves active, Use relative coordinates active, and disable Set Viewbox. Save this preset for future use.

Can I use SVGs to generate C++ code?

Here is a gist by Andrew Belt

How do I debug?

make debug

This starts GDB

How do I build a zip to give to others?

If VERSION is defined in your Makefile like the Tutorial:

make dist

If VERSION is not defined in your Makefile like the old Tutorial:

make dist VERSION=0.5.0

This will make a zip file here dist/MyPlugin-0.5.0-myarch.zip

The name is based on the value inside the Makefile

How can I merge the zip files from each OS?

Download this gist and run this:

./zipmerge.sh MyPlugin-0.5.0.zip MyPlugin-0.5.0-*.zip

How can I remove mac os files from a zip?

zip -d MyPlugin-0.5.0-myarch.zip __MACOSX/*
zip -d MyPlugin-0.5.0-myarch.zip */.DS_Store

What do I do about this error about a missing LICENSE file?

touch LICENSE

...and at some point choose a license

What do I need to remember when updating modules?

  • Don't change the module slug. Only the name should be changed. If you change the slug, existing patches with your module will break.

  • Don't change the order of the parameters. Existing patches will be affected.

  • Update your manifest file here

How do I also make closed source modules like blank panels?

For example:

  1. Copy Tutorial to TutorialBlanks
  2. Change the slug in the new folder from Tutorial to TutorialBlanks (Don't change the manufacturer)
  3. Keep the builds separate. (Don't want to accidentally push closed source code)

How do I report problems with building or using Rack?

https://github.com/VCVRack/Rack/issues

How can I follow API Changes?

https://github.com/VCVRack/Rack/issues/258

How do I get rid of this harmless error on windows?

Error

': not a valid identifierline 89: export: `dashless

Run this:

mv /mingw64/bin/envsubst.exe /mingw64/bin/envsubst.exe.old

then install:

pacman -S gettext

Thanks to Iūstus Henryson's post here https://www.facebook.com/groups/vcvrack/permalink/138808273445992/

How do I statically link against a library?

Passing -lfoobar to the compiler will prefer linking against the dynamic version of a library. To link against a static version of a library pass the full path to the static version, e.g. /usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.a. If using a package that supports pkg-config, this make snippet might be helpful for determining the full path to a static library.

LDFLAGS +=$(shell pkg-config --variable=libdir libusb-1.0)/libusb-1.0.a