Added a helper.py script to the Rack v1 repository for quickly creating new plugins and modules. Here’s an example session.
~/VCV/Rack/plugins ❯ ../helper.py createplugin MyPlugin
Plugin name [MyPlugin]: My Plugin
Version [1.0.0]:
License (if open-source, use license identifier from https://spdx.org/licenses/) [proprietary]: CC0-1.0
Author []: VCV
Author email (optional) []: contact@vcvrack.com
Author website URL (optional) []: https://vcvrack.com/
Plugin website URL (optional) []:
Manual website URL (optional) []:
Source code URL (optional) []:
Donate URL (optional) []:
Manifest created at MyPlugin/plugin.json
Created template plugin in MyPlugin/
Initialized empty Git repository in ~/VCV/Rack/plugins/MyPlugin/.git/
You may use `make`, `make clean`, `make dist`, `make install`, etc in the MyPlugin/ directory.
~/VCV/Rack/plugins ❯ cd MyPlugin
~/VCV/Rack/plugins/MyPlugin ❯ ls
Makefile plugin.json res src
~/VCV/Rack/plugins/MyPlugin ❯ mv ../MyModule.svg res/
~/VCV/Rack/plugins/MyPlugin ❯ ../../helper.py createmodule MyModule
Module name [MyModule]: My Module
One-line description (optional) []:
Tags (comma-separated, see https://github.com/VCVRack/Rack/blob/v1/src/plugin.cpp#L543 for list) []: vco, polyphonic
Added MyModule to plugin.json
Components extracted from res/MyModule.svg
Source file generated at src/MyModule.cpp
~/VCV/Rack/plugins/MyPlugin ❯ make
g++ -Wsuggest-override -std=c++11 -fPIC -I../../include -I../../dep/include -MMD -MP -g -O3 -march=nocona -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/plugin.cpp.o src/plugin.cpp
g++ -Wsuggest-override -std=c++11 -fPIC -I../../include -I../../dep/include -MMD -MP -g -O3 -march=nocona -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/MyModule.cpp.o src/MyModule.cpp
g++ -o plugin.so build/src/plugin.cpp.o build/src/MyModule.cpp.o -shared
~/VCV/Rack/plugins/MyPlugin ❯ ls
build Makefile plugin.json plugin.so res src
Instructions for creating panels are shown by running helper.py createmodule. Here’s a copy.
Instructions for creating a panel:
Note: This information is probably out of date. See https://vcvrack.com/manual/Panel.html
- Only Inkscape is supported by this script and Rack’s SVG renderer.
- Create a document with units in “mm”, height of 128.5 mm, and width of a multiple of 5.08 mm (1 HP in Eurorack).
- Design the panel.
- Create a layer named “widgets”.
- For each component, create a shape on the widgets layer.
- Use a circle to place a component by its center.
The size of the circle does not matter, only the center point.
A create*Centered() call is generated in C++.
- Use a rectangle to to place a component by its top-left point.
This should only be used when the shape’s size is equal to the component’s size in C++.
A create*() call is generated in C++.
- Set the color of each shape depending on the component’s type.
- Param: red
#ff0000
- Input: green
#00ff00
- Output: blue
#0000ff
- Light: magenta
#ff00ff
- Custom widgets: yellow
#ffff00
- Hide the widgets layer and save to
res/<module slug>.svg.