Cabbage Logo
Back to Cabbage Site

CabbageRack

I’ve made a start at a VCV Rack interface for Cabbage. Details here. It’s Linux only for the moment, but should be relatively simple to build for Windows and OSX too.

This is obviously a very minimal implementation, and I’ve not yet added export functions to the main Cabbage IDE, but I will do so once I get around to adding more functionality. Please read the notes about usage before trying it out :wink: For anyone using it, I would encourage you to focus on the audio side of things for now, as the GUI sides of things are still a little raw. I have to rewrite everything using the VCV API. It’s a pain and means that there will most likely be some differences between how things look here and how they do in native Cabbage, but it’s a price worth paying I think.

p.s. let’s keep this to the forum for now. Once it’s a little more developed we can start spreading the word.

Hi Rory, tried to build it under windows… Does not work.
It seems that there is a problem with a # define FLOAT_somthing in csound. Mingw 64.mobile-gws-serp is complaining. Vcv rack does not see the Dll once it is built.

Can you pull again? And this time run

make ARCH=win

I’ve updated some code and #ifdef-ed a few things. Hopefull it will do the trick. Btw, if you are using the very latest 6.10 for Windows you shouldn’t be getting an float version error. Might be worth updating just to be sure. I updated the windows package a few weeks ago so it no longer gives these errors. You can copy and paste the output if it continues to fail.

Try this makefile.

# Must follow the format in the Naming section of https://vcvrack.com/manual/PluginDevelopmentTutorial.html
SLUG = CabbageRack

# Must follow the format in the Versioning section of https://vcvrack.com/manual/PluginDevelopmentTutorial.html
VERSION = 0.5.0

# FLAGS will be passed to both the C and C++ compiler
FLAGS +=
CFLAGS +=

CSOUND_INCLUDE ?= "c:\PROGRA~1\Csound6_x64\include\csound"
CSOUND_LIBRARY ?= "c:\PROGRA~1\Csound6_x64\lib\csound64.lib"
CXXFLAGS += -I $(CSOUND_INCLUDE)
LDFLAGS += $(CSOUND_LIBRARY)

# Add .cpp and .c files to the build
SOURCES += $(wildcard src/*.cpp)

# Add files to the ZIP package when running `make dist`
# The compiled plugin is automatically added.
DISTRIBUTABLES += $(wildcard LICENSE*) res

# If RACK_DIR is not defined when calling the Makefile, default to two levels above
RACK_DIR ?= ../..

# Include the VCV Rack plugin Makefile framework
include $(RACK_DIR)/plugin.mk

Or just try this one which I just built:
CabbageRackWin.zip (735.0 KB)

hello Rory,
it compiles flawlessly ! Sound is weird… but it makes sound !
New horizons are opening… :slight_smile:

Sound is weird? That’s not good!

i’m getting a failure on linux too
do i need to have cabbage working first? doing a fresh install
shree@shree-linux2:~/Rack/plugins/CabbageRack$ ./build.sh
./build.sh: line 1: cd: /home/shree/sourcecode/Rack/plugins/CabbageRack: No such file or directory
rm -rfv build plugin.so dist
removed ‘build/src/CabbageRack.cpp.o’
removed ‘build/src/CabbageRack.cpp.d’
removed ‘build/src/Cabbage.cpp.d’
removed ‘build/src/Cabbage.cpp.o’
removed directory ‘build/src’
removed directory ‘build’
g++ -I /usr/local/include/csound -Wsuggest-override -std=c++11 -fPIC -I…/…/include -I…/…/dep/include -DSLUG=CabbageRack -DVERSION=0.5.0 -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/Cabbage.cpp.o src/Cabbage.cpp
g++ -I /usr/local/include/csound -Wsuggest-override -std=c++11 -fPIC -I…/…/include -I…/…/dep/include -DSLUG=CabbageRack -DVERSION=0.5.0 -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/CabbageRack.cpp.o src/CabbageRack.cpp
In file included from /usr/local/include/csound/csound.h:2459:0,
from /usr/local/include/csound/csound.hpp:40,
from src/Cabbage.hpp:5,
from src/Cabbage.cpp:1:
/usr/local/include/csound/version.h:27:0: warning: “VERSION” redefined
#define VERSION “6.11”
^
:0:0: note: this is the location of the previous definition
In file included from /usr/local/include/csound/csound.h:2459:0,
from /usr/local/include/csound/csound.hpp:40,
from src/Cabbage.hpp:5,
from src/CabbageRack.cpp:1:
/usr/local/include/csound/version.h:27:0: warning: “VERSION” redefined
#define VERSION “6.11”
^
:0:0: note: this is the location of the previous definition
In file included from src/Cabbage.cpp:1:0:
src/Cabbage.hpp:16:0: warning: “VERSION” redefined
#define VERSION “1.0”
^
In file included from /usr/local/include/csound/csound.h:2459:0,
from /usr/local/include/csound/csound.hpp:40,
from src/Cabbage.hpp:5,
from src/Cabbage.cpp:1:
/usr/local/include/csound/version.h:27:0: note: this is the location of the previous definition
#define VERSION “6.11”
^
In file included from src/CabbageRack.cpp:1:0:
src/Cabbage.hpp:16:0: warning: “VERSION” redefined
#define VERSION “1.0”
^
In file included from /usr/local/include/csound/csound.h:2459:0,
from /usr/local/include/csound/csound.hpp:40,
from src/Cabbage.hpp:5,
from src/CabbageRack.cpp:1:
/usr/local/include/csound/version.h:27:0: note: this is the location of the previous definition
#define VERSION “6.11”
^
In file included from src/CabbageRackWidgets.hpp:11:0,
from src/Cabbage.hpp:6,
from src/CabbageRack.cpp:1:
src/CabbageParser.hpp: In static member function ‘static std::__cxx11::string CabbageParser::trim(const string&, const string&)’:
src/CabbageParser.hpp:180:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (start == std::string::npos)
^
src/CabbageParser.hpp: In static member function ‘static std::vector CabbageParser::getCabbageControlVector(std::__cxx11::string)’:
src/CabbageParser.hpp:235:11: warning: unused variable ‘argIndex’ [-Wunused-variable]
int argIndex = 0;
^
src/CabbageRack.cpp: In constructor ‘MyModuleWidget::MyModuleWidget()’:
src/CabbageRack.cpp:15:32: error: no matching function for call to ‘rack::ModuleWidget::ModuleWidget()’
MyModuleWidget::MyModuleWidget()
^
In file included from …/…/include/rack.hpp:9:0,
from src/Cabbage.hpp:4,
from src/CabbageRack.cpp:1:
…/…/include/app.hpp:63:2: note: candidate: rack::ModuleWidget::ModuleWidget(rack::Module*)
ModuleWidget(Module module);
^
…/…/include/app.hpp:63:2: note: candidate expects 1 argument, 0 provided
…/…/include/app.hpp:53:8: note: candidate: rack::ModuleWidget::ModuleWidget(const rack::ModuleWidget&)
struct ModuleWidget : OpaqueWidget {
^
…/…/include/app.hpp:53:8: note: candidate expects 1 argument, 0 provided
src/CabbageRack.cpp:18:18: error: ‘setModule’ was not declared in this scope
setModule(module);
^
src/CabbageRack.cpp:67:45: warning: ‘TScrew
rack::createScrew(rack::Vec) [with TScrew = rack::ScrewSilver]’ is deprecated [-Wdeprecated-declarations]
addChild(createScrew(Vec(0, 0)));
^
In file included from src/Cabbage.hpp:4:0,
from src/CabbageRack.cpp:1:
…/…/include/rack.hpp:41:20: note: declared here
DEPRECATED TScrew createScrew(Vec pos) {
^
src/CabbageRack.cpp:68:59: warning: ‘TScrew
rack::createScrew(rack::Vec) [with TScrew = rack::ScrewSilver]’ is deprecated [-Wdeprecated-declarations]
addChild(createScrew(Vec(box.size.x - 16, 0)));
^
In file included from src/Cabbage.hpp:4:0,
from src/CabbageRack.cpp:1:
…/…/include/rack.hpp:41:20: note: declared here
DEPRECATED TScrew createScrew(Vec pos) {
^
src/CabbageRack.cpp:69:78: warning: ‘TScrew
rack::createScrew(rack::Vec) [with TScrew = rack::ScrewSilver]’ is deprecated [-Wdeprecated-declarations]
addChild(createScrew(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
^
In file included from src/Cabbage.hpp:4:0,
from src/CabbageRack.cpp:1:
…/…/include/rack.hpp:41:20: note: declared here
DEPRECATED TScrew createScrew(Vec pos) {
^
src/CabbageRack.cpp:70:92: warning: ‘TScrew
rack::createScrew(rack::Vec) [with TScrew = rack::ScrewSilver]’ is deprecated [-Wdeprecated-declarations]
addChild(createScrew(Vec(box.size.x - 16, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
^
In file included from src/Cabbage.hpp:4:0,
from src/CabbageRack.cpp:1:
…/…/include/rack.hpp:41:20: note: declared here
DEPRECATED TScrew createScrew(Vec pos) {
^
src/CabbageRack.cpp: In member function ‘virtual void CabbageRack::step()’:
src/CabbageRack.cpp:160:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0 ; i < audioInputChannels.size() ; i++)
^
src/CabbageRack.cpp:162:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0 ; i < audioOutputChannels.size() ; i++)
^
In file included from src/CabbageRackWidgets.hpp:11:0,
from src/Cabbage.hpp:6,
from src/Cabbage.cpp:1:
src/CabbageParser.hpp: In static member function ‘static std::__cxx11::string CabbageParser::trim(const string&, const string&)’:
src/CabbageParser.hpp:180:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (start == std::string::npos)
^
src/CabbageParser.hpp: In static member function ‘static std::vector CabbageParser::getCabbageControlVector(std::__cxx11::string)’:
src/CabbageParser.hpp:235:11: warning: unused variable ‘argIndex’ [-Wunused-variable]
int argIndex = 0;
^
src/Cabbage.cpp: In function ‘void init(rack::Plugin
)’:
src/Cabbage.cpp:27:94: warning: ‘rack::Model* rack::createModel(std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, Tags …) [with TModuleWidget = MyModuleWidget; Tags = {rack::ModelTag}; std::__cxx11::string = std::__cxx11::basic_string]’ is deprecated [-Wdeprecated-declarations]
el(createModel(“CabbageAudio”, “CabbageRack”, pluginName, BLANK_TAG));
^
In file included from src/Cabbage.hpp:4:0,
from src/Cabbage.cpp:1:
…/…/include/rack.hpp:23:19: note: declared here
DEPRECATED Model *createModel(std::string manufacturer, std::string slug, std::string
^
In file included from src/CabbageRackWidgets.hpp:11:0,
from src/Cabbage.hpp:6,
from src/CabbageRack.cpp:1:
src/CabbageParser.hpp: In static member function ‘static std::__cxx11::string CabbageParser::getParameter(std::__cxx11::string, std::__cxx11::string)’:
src/CabbageParser.hpp:174:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
…/…/compile.mk:56: recipe for target ‘build/src/CabbageRack.cpp.o’ failed
make: *** [build/src/CabbageRack.cpp.o] Error 1
make: *** Waiting for unfinished jobs…

i think from my paste i see the error …duh

Did you get it sorted? I pushed some changes through today that should make things run a little faster than before.

yes, i got it to build sounds nice too!
I’ll be updating/ please keep it working with v0.5 for a while longer because v0.6 is not done yet.
While i was doing a fresh install the rtmidi stuff broke because i was installing w/o a sound card [only pulse for now] and it was a little more involved than i had hoped but everything regarding cabbage built easy

:slight_smile:

I’ve no intention of moving to .6 any time soon. I’m happy for people to give it a good test run before doing any updating. :wink:

1 Like

I’m just about to pushsome changes to the repo, better that you don’t update just yet. I@ll let you know when it’s safe :wink:

Thanks for your patience. Git is now good to go again. I’ve updated everything, fixed a few bugs, added lights and updated the example. I think this is about as far as I will take this for now. The Rack API is rather simple. It would take a lot of time to add more advanced features. If anyone develops any instruments please share the recipes :wink:

Hey
I’m on break for 10 days so if i can help in anyway testing please let me know

pp

on OSX i get this
make: *** No rule to make target /usr/local/include/csound/csound.hpp', needed bybuild/src/Cabbage.cpp.o’. Stop.

i do not have csound headers in /usr/local/include as the installation for csound from the csound site
fails so i have a brew installed version
is there a way to install csound properly on OSX so i get the headers etc. in the proper places?

You need to run

make -f Makefile.osx

I had to create makefiles for each platform.

Btw, there are pre-release builds available here.

Hey Rory, I had no troubles building and loading the module, but I’m getting a pretty terrible graphics lag. It’s very slow to respond, as though there’s a lot of buffering going on for the graphics. Any advice/suggestions to speed up performance ?

Are you using the latest build from the master branch? I thought things were better now than before?