Cabbage Logo
Back to Cabbage Site

Does Cabbage Support VCV Rack 2.0?

I have followed the instructions in the manual, and also downloaded the example Cabbage Rack Module from GitHub. But it simply will not appear in the VCV Rack module browser. Am I doing something wrong? I tried exporting the basic “Gain” module, and I made sure it was in the Rack Modules dictionary. But it just never appears? :thinking:

I’ve no idea to be honest, I kind of lost interest in supporting VCV Rack modules. Maybe @brylie can shed some light on this?

Thankfully I don’t believe it’d be too difficult to do. The guide on the VCV website seems pretty straight forward.

https://vcvrack.com/manual/Migrate2

Since Cabbage is open source. Maybe if I get the time I’ll see if I can’t possibly recompile the VCV Module version. Bbuutt my C++ knowledge is limited. So that’s doubtful.

I tried simply changing the json file to 2.0 but didn’t work.

I will try to get around to this in the next week or so. It doesn’t look like much work, but I’ve been burning by version updates before with VCV Rack. That’s one of the reasons I lost interest in it. I’ll let you know when I get around to it. If you want to have a go about recompiling you need only close the CabbageRack repo and run the make commands. It should be pretty straightforward once you have your dev env set up.

Hi Rory, I thought I’d take a look at the Rack 2.0 issue. I started by followed all the directions set up the Rack dev environment and proceeded to build the Rack default plugin, which seems to have succeeded.

But now I am stuck trying to follow the CabbageRack build instructions. I’m in Win11 with msys2. When I run “make -f Makefile.win” in /plugins/CabbageRack, I get the error

dave@hopper MINGW32 /c/Users/dave/Documents/GitHub/Rack/plugins/CabbageRack
$ make -f Makefile.win
Makefile.win:22: "D:/a/Rack-SDK/plugin.mk": No such file or directory
make: *** No rule to make target '"D:/a/Rack-SDK/plugin.mk"'.  Stop.

The path does not exist on my system, so I changed the last line of the makefile to

include "/c/Rack-SDK/plugin.mk"

which is correct for my system. Now I get

Makefile.win:23: "/c/Rack-SDK/plugin.mk": No such file or directory
make: *** No rule to make target '"/c/Rack-SDK/plugin.mk"'.  Stop.

despite

$ ls -al /c/Rack-SDK/plugin.mk
-rw-r--r-- 1 dave None 2329 Jan 15 03:58 /c/Rack-SDK/plugin.mk

Any ideas?

I think you need to set the RACK_DIR env to point to the Rack-SDK dir?

Just realized I’m in the 32-bit shell, will try again with 64-bit.

1 Like

Yes, I have RACK_DIR set up. I got past this by changing the last list of Makefile.win to

include $(RACK_DIR)/plugin.mk

This gets the compile started, but it stops with this:

src/CabbageWidgets.hpp: In member function 'virtual void CabbageCheckbox::draw(const rack::widget::Widget::DrawArgs&)':
src/CabbageWidgets.hpp:370:21: error: 'dirtyValue' was not declared in this scope
  370 |                 if (dirtyValue==0)
      |                     ^~~~~~~~~~
make: *** [/c/Rack-SDK/compile.mk:72: build/src/CabbageRackWidget.cpp.o] Error 1

And indeed, VS Code can find no declaration for “dirtyValue” in the code

dirtyValue was a member of the widget classes. Looks like this has changed. Maybe try the new ParamQuantity stuff. So where you see an assignment for dirtyValue use getParamQuantity().

float dirtyValue = getParamQuantity()->getValue();

And in places where I was setting dirtyValue you might try:

getParamQuantity()->setValue(control.value);

:man_shrugging:

p.s. thanks for taking the time to investigate Dave :+1:

Thank Rory, that worked. Next issue (related), I had to comment out blocks like this

        // if (mod)
        // {
        //    paramQuantity = mod->paramQuantities[id];
        // }

Now it builds without errors, but I don’t know if it will behave properly. Maybe this is redundant in v2? Anyway, that’s all I have time and energy to do at this point…

It could well be. I wrote the original version of this with what was a relatively new API. I think it was versions 0.n. I imagine the whole thing could do with a complete rewrite at this point. I imagine the entire SDK has got better in the intervening years.