Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless mode doesn't work #357

Closed
Nek opened this issue Aug 31, 2022 · 8 comments
Closed

Headless mode doesn't work #357

Nek opened this issue Aug 31, 2022 · 8 comments

Comments

@Nek
Copy link

Nek commented Aug 31, 2022

It's possible to run the VCV Rack with -h option to run it headless.
If I try to do the same with Cardinal it gives me:

nek@raspberrypi:~ $ ./Cardinal -h
Cardinal self-contained executable, based on UnZipSFX
Launching: '/tmp/Cardinal/Cardinal -h'
libjack.so.0 loaded successfully!
[0.000 info CardinalPlugin.cpp:235 Initializer] Cardinal JACK/Standalone v2.1.2
[0.000 info CardinalPlugin.cpp:236 Initializer] Linux 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l
[0.000 info CardinalPlugin.cpp:237 Initializer] Binary filename: /tmp/Cardinal/Cardinal
[0.000 info CardinalPlugin.cpp:238 Initializer] Bundle path: /tmp/Cardinal
[0.000 info CardinalPlugin.cpp:239 Initializer] System directory: /tmp/Cardinal/resources
[0.000 info CardinalPlugin.cpp:240 Initializer] User directory: /tmp/Cardinal/resources
[0.000 info CardinalPlugin.cpp:241 Initializer] Template patch: /tmp/Cardinal/resources/template.vcv
[0.000 info CardinalPlugin.cpp:242 Initializer] System template patch: /tmp/Cardinal/resources/template.vcv
[0.001 info CardinalPlugin.cpp:256 Initializer] Initializing plugins
[0.094 info CardinalPlugin.cpp:259 Initializer] Initializing plugin browser DB
[0.109 info Rack/src/window/Svg.cpp:28 loadFile] Loaded SVG /tmp/Cardinal/resources/ComponentLibrary/Rail.svg
assertion failure: "world != nullptr" in file src/ApplicationPrivateData.cpp, line 67
Failed to create Pugl view, everything will fail!
Segmentation fault

It would be fantastic to be able to run it in headless mode on Raspberry Pi or anywhere else. My use case is audiovisual installations.

@falkTX
Copy link
Contributor

falkTX commented Aug 31, 2022

Cardinal is not Rack, you cant expect them to work in the same way.

The regular build requires X11, if you want headless build do it with make HEADLESS=true which will skip all OpenGL and X11 calls altogether. They are intentionally separate builds, because the headless one is made in a way so that everything GUI related is optimized out, instead of being there and only optionally being enabled (or not).

@falkTX falkTX closed this as completed Aug 31, 2022
@Nek
Copy link
Author

Nek commented Aug 31, 2022

This is actually even better. Thanks for the guidance.

@falkTX
Copy link
Contributor

falkTX commented Aug 31, 2022

note you cant pass a project file to load on the command line, but it is possible to connect to this embed/headless instance via OSC.
Currently the IP a regular Cardinal tries to talk to is hardcoded, see discussion in #249

@Nek
Copy link
Author

Nek commented Aug 31, 2022

Thanks! Is there an example of or documentation for OSC API?

@falkTX
Copy link
Contributor

falkTX commented Aug 31, 2022

no, it is still quite experimental. the idea is for one cardinal instance to talk to another.
the code is the docs, until things settle down for it. related code at https://github.com/DISTRHO/Cardinal/blob/main/src/CardinalPlugin.cpp#L288

@Nek
Copy link
Author

Nek commented Aug 31, 2022

The code makes sense!
What does the blob contain in osc_load_handler?

@falkTX
Copy link
Contributor

falkTX commented Aug 31, 2022

the entire vcv patch file

@Nek
Copy link
Author

Nek commented Aug 31, 2022

Got it. I got confused a bit but then remembered that Cardinal is built around VCV and not a fork.
Looking at the VCV API docs and have no more questions.
Thanks again! I have enough info to at least try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants