rorywalsh / cabbagerack Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
hello,
i tried to run it inside Rack2, but the build of CabbageRack is only for V1.
any plan to update it for V2 of Rack?
Regards
Poul
Rack (1.1.6) crashes when loading a Cabbage module containing a button
widget.
Steps to reproduce
button
widget<Cabbage> bounds(0, 0, 0, 0)
form caption("CabbageModule") size(100, 380), colour(255, 255, 255), pluginid("def1")
screw bounds(5, 10, 15, 15)
screw bounds(80, 10, 15, 15)
screw bounds(5, 360, 15, 15)
screw bounds(80, 360, 15, 15)
button bounds(8, 116, 80, 40) channel("button10004")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
</CsInstruments>
<CsScore>
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>
backtrace() returned 21 addresses
/usr/local/lib/libcsound64.so.6.0(+0x4c303) [0x7f23da00a303]
/lib/x86_64-linux-gnu/libc.so.6(+0x41040) [0x7f23dc676040]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_+0x2c) [0x7f23dcad317c]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZN13CabbageButtonC1E14CabbageControlPN4rack6engine6ModuleEi+0x351) [0x7f23da3f1251]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZN17CabbageRackWidgetC2EP17CabbageRackModule+0x2bf2) [0x7f23da3eab22]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZZN4rack11createModelI17CabbageRackModule17CabbageRackWidgetEEPNS_6plugin5ModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN6TModel18createModuleWidgetEv+0x38) [0x7f23da3ff77c]
./Rack() [0x599c60]
./Rack(_ZN4rack3app8ModelBox8onButtonERKNS_5event6ButtonE+0xc9) [0x59b623]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack2ui12ScrollWidget8onButtonERKNS_5event6ButtonE+0xfe) [0x57543a]
./Rack(_ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE+0xf4) [0x571184]
./Rack(_ZN4rack3app14BrowserOverlay8onButtonERKNS_5event6ButtonE+0x114) [0x59b7bc]
./Rack(_ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE+0xf4) [0x571184]
./Rack(_ZN4rack5event5State12handleButtonENS_4math3VecEiii+0x216) [0x56b800]
./Rack(_glfwPlatformPollEvents+0xc8e) [0x5f2dc9]
./Rack(_ZN4rack6Window3runEv+0x8e) [0x565fd0]
./Rack(main+0x448) [0x4e6298]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xd5) [0x7f23dc65d565]
./Rack(_start+0x29) [0x4eb1f9]
Csound tidy up: Segmentation fault
inactive allocs returned to freespace
end of score. overall amps: 0.00000 0.00000
overall samples out of range: 0 0
0 errors in performance
Elapsed time at end of performance: real: 0.254s, CPU: 0.257s
terminate called without an active exception
backtrace() returned 31 addresses
/usr/local/lib/libcsound64.so.6.0(+0x4c303) [0x7f23da00a303]
/lib/x86_64-linux-gnu/libc.so.6(+0x41040) [0x7f23dc676040]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f23dc675fbb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x116) [0x7f23dc65b864]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a31) [0x7f23dca2da31]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xad4fc) [0x7f23dca394fc]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xad567) [0x7f23dca39567]
./Rack() [0x54a335]
/lib/x86_64-linux-gnu/libc.so.6(+0x44147) [0x7f23dc679147]
/lib/x86_64-linux-gnu/libc.so.6(on_exit+0) [0x7f23dc6792f0]
/usr/local/lib/libcsound64.so.6.0(+0x4c3ff) [0x7f23da00a3ff]
/lib/x86_64-linux-gnu/libc.so.6(+0x41040) [0x7f23dc676040]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_+0x2c) [0x7f23dcad317c]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZN13CabbageButtonC1E14CabbageControlPN4rack6engine6ModuleEi+0x351) [0x7f23da3f1251]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZN17CabbageRackWidgetC2EP17CabbageRackModule+0x2bf2) [0x7f23da3eab22]
/home/bco/.Rack/plugins-v1/1_cabbage_patch/plugin.so(_ZZN4rack11createModelI17CabbageRackModule17CabbageRackWidgetEEPNS_6plugin5ModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN6TModel18createModuleWidgetEv+0x38) [0x7f23da3ff77c]
./Rack() [0x599c60]
./Rack(_ZN4rack3app8ModelBox8onButtonERKNS_5event6ButtonE+0xc9) [0x59b623]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE+0xd8) [0x56ca14]
./Rack(_ZN4rack2ui12ScrollWidget8onButtonERKNS_5event6ButtonE+0xfe) [0x57543a]
./Rack(_ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE+0xf4) [0x571184]
./Rack(_ZN4rack3app14BrowserOverlay8onButtonERKNS_5event6ButtonE+0x114) [0x59b7bc]
./Rack(_ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE+0xf4) [0x571184]
./Rack(_ZN4rack5event5State12handleButtonENS_4math3VecEiii+0x216) [0x56b800]
./Rack(_glfwPlatformPollEvents+0xc8e) [0x5f2dc9]
./Rack(_ZN4rack6Window3runEv+0x8e) [0x565fd0]
./Rack(main+0x448) [0x4e6298]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xd5) [0x7f23dc65d565]
./Rack(_start+0x29) [0x4eb1f9]
Csound tidy up: Aborted
When exporting for VCV Rack, CabbageRack prepares a directory structure that contains a single module:
It is conventional for Rack modules to be distributed in "packs" of multiple modules, as can be seen in plugin.json
:
...
"modules": [ ... ]
...
When modifying the modules
array in plugin.json
, the CabbageRack module fails to register with VCV Rack.
cabbage_test
)cabbage_test.csd
as cabbage_test_two.csd
modules
array in plugin.json
to include the new cabbage_test_two
{
"slug": "cabbage_test",
"name": "Cabbage Test",
"version": "1.0.0",
"license": "GPL",
"brand": "Cabbage Test",
"author": "Rory Walsh",
"authorEmail": "",
"authorUrl": "cabbageaudio.com",
"pluginUrl": "",
"manualUrl": "",
"sourceUrl": "",
"donateUrl": "",
"modules": [
{
"slug": "cabbage_test",
"name": "cabbage_test",
"description": "VCV Rack interface for Cabbage",
"tags": [
"Csound",
"Cabbage"
]
},
{
"slug": "cabbage_test_two",
"name": "cabbage_test_two",
"description": "VCV Rack interface for Cabbage",
"tags": [
"Csound",
"Cabbage"
]
}
]
}
When following the build instructions in the README, I get the following error:
Makefile:20: ../plugin.mk: No such file or directory
make: *** No rule to make target '../plugin.mk'. Stop.
hello,
i just try to compile CabbageRack with the latest Rack-SDK as described here.
compiling starts, but breaks with the following error.
Any idea?
`
g++ -I /usr/include/csound -std=c++11 -Wsuggest-override -fPIC -I/home/held/src/Rack-SDK/include -I/home/held/src/Rack-SDK/dep/include -fno-gnu-unique -MMD -MP -g -O3 -march=nehalem -funsafe-math-optimizations -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/CabbageRackWidget.cpp.o src/CabbageRackWidget.cpp
In Datei, eingebunden von src/CabbageRackWidget.cpp:3:
src/CabbageWidgets.hpp: In Konstruktor »CabbageRotarySlider::CabbageRotarySlider(CabbageControl, rack::engine::Module*, int)«:
src/CabbageWidgets.hpp:91:25: Fehler: »paramQuantity« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »getParamQuantity«?
91 | paramQuantity = mod->paramQuantities[id];
| ^~~~~~~~~~~~~
| getParamQuantity
src/CabbageWidgets.hpp:109:32: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »minValue«?
109 | currentValue = dirtyValue;
| ^~~~~~~~~~
| minValue
src/CabbageWidgets.hpp: In Elementfunktion »virtual void CabbageRotarySlider::draw(const rack::widget::Widget::DrawArgs&)«:
src/CabbageWidgets.hpp:132:44: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »minValue«?
132 | const float sliderValue = (dirtyValue+abs(min))/(abs(maxValue));
| ^~~~~~~~~~
| minValue
src/CabbageWidgets.hpp: In Konstruktor »CabbageButton::CabbageButton(CabbageControl, rack::engine::Module*, int)«:
src/CabbageWidgets.hpp:213:25: Fehler: »paramQuantity« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »getParamQuantity«?
213 | paramQuantity = mod->paramQuantities[id];
| ^~~~~~~~~~~~~
| getParamQuantity
src/CabbageWidgets.hpp: In Elementfunktion »virtual void CabbageButton::draw(const rack::widget::Widget::DrawArgs&)«:
src/CabbageWidgets.hpp:256:21: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht definiert
256 | if (dirtyValue==0)
| ^~~~~~~~~~
src/CabbageWidgets.hpp:268:131: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht definiert
268 | 2)-(11.f/2.f)-int(value), FramebufferWidget::box.size.x-int(dirtyValue), text[int(dirtyValue)].c_str(), NULL);
| ^~~~~~~~~~
src/CabbageWidgets.hpp: In Konstruktor »CabbageCombobox::CabbageCombobox(CabbageControl, rack::engine::Module*, int)«:
src/CabbageWidgets.hpp:286:25: Fehler: »paramQuantity« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »getParamQuantity«?
286 | paramQuantity = mod->paramQuantities[id];
| ^~~~~~~~~~~~~
| getParamQuantity
src/CabbageWidgets.hpp:294:17: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht definiert
294 | dirtyValue = control.value;
| ^~~~~~~~~~
src/CabbageWidgets.hpp: In Elementfunktion »virtual void CabbageCombobox::draw(const rack::widget::Widget::DrawArgs&)«:
src/CabbageWidgets.hpp:324:89: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht definiert
324 | rgs.vg, 0, (box.size.y/2)-(11.f/2.f), box.size.x, text[(int(dirtyValue-1) < 0 ? 0 : int(dirtyValue-1))].c_str(), NULL);
| ^~~~~~~~~~
src/CabbageWidgets.hpp: In Konstruktor »CabbageCheckbox::CabbageCheckbox(CabbageControl, rack::engine::Module*, int)«:
src/CabbageWidgets.hpp:342:25: Fehler: »paramQuantity« wurde in diesem Gültigkeitsbereich nicht deklariert; meinten Sie »getParamQuantity«?
342 | paramQuantity = mod->paramQuantities[id];
| ^~~~~~~~~~~~~
| getParamQuantity
src/CabbageWidgets.hpp: In Elementfunktion »virtual void CabbageCheckbox::draw(const rack::widget::Widget::DrawArgs&)«:
src/CabbageWidgets.hpp:370:21: Fehler: »dirtyValue« wurde in diesem Gültigkeitsbereich nicht definiert
370 | if (dirtyValue==0)
| ^~~~~~~~~~
make: *** [/home/held/src/Rack-SDK/compile.mk:72: build/src/CabbageRackWidget.cpp.o] Fehler 1
`
When exporting a Rack module with rslider
widget, the Rack module slider has several differences:
Of the three differences noted above, only the line thickness seems substantive, as it can cause differences in the module layout and necessary width.
However, it would seem important for there to be visual consistency between the original and export.
Currently, only a subset of Cabbage widgets have been reproduced for Rack. This is mainly due to the work involved in creating GUI widgets in two different frameworks.
This issue can serve as a roadmap, of sorts, to identify widgets that aren't supported by CabbageRack and prioritize development.
usefulness
/ development complexity
development complexity
/ usefulness
?usefulness
** development complexity
? 🚀The following list tracks progress to reproduce 🥬 each Cabbage widget for VCV
After running make
, how do we install CabbageRack in a location where Cabbage can find it? E.g. we would typically run make install
, which produces the following output:
$ make install
rm -rf dist
mkdir -p dist/"CabbageRack"
cp plugin.so dist/"CabbageRack"/
strip -s dist/"CabbageRack"/plugin.so
cp -r --parents LICENSE.txt res README.md plugin.json dist/"CabbageRack"/
cd dist && zip -q -9 -r "CabbageRack"-"1.0.0"-lin.zip "CabbageRack"
cp dist/"CabbageRack"-"1.0.0"-lin.zip /home/bco/.Rack/plugins-v1/
Related to rorywalsh/cabbage#125
Otherwise where is rack/plugins supposed to be then? As far as I know there is no such directory unless you build rack from source.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.