- Edited
So here's a summary HOW-TO, for posterity:
- add this project to your Bela projects: http://github.com/giuliomoro/OSC2OLED4Bela . If you use a different project name, replace
OSC2OLED4Bela
with your project name in all the steps below. - open the project and build it. When running, it will not emit any audio, but you should be able to send it OSC messages on
bela.local:7562
from the host computer. You can run it like this for testing. - to see what messages and formats are supported, see the
parseMessage()
function inrender.cpp
. For instance, you can send/osc-test
followed by afloat
,/tr
followed by afloat
(ignored) and/or astring
,/param1
followed by afloat
. You can edit the program to change or add support for OSC messages - when you have a reliable way of sending OSC messages to it from the host, create a file
/lib/systemd/system/osc2oled.service
with this content:
[Unit]
Description=OSC to IC2 Screen Launcher
After=network-online.target
[Service]
ExecStart=/root/Bela/projects/OSC2OLED4Bela/OSC2OLED4Bela
Type=simple
Restart=always
RestartSec=1
WorkingDirectory=/root/Bela/projects/OSC2OLED4Bela
Environment=HOME=/root
KillMode=process
[Install]
WantedBy=default.target
This can be done from the terminal or by creating a file osc2oled.service
in your project (make sure the file includes only the text above and none of the automatically-generated content in the file you create) and then linking it into place by running ln -s /root/Bela/projects/OSC2OLED4Bela/osc2oled.service /lib/systemd/system/osc2oled.service
in the Bela IDE console.
- start the process in the background with
systemctl start osc2oled
, stop it withsystemctl stop osc2oled
. - while running in the background, you can visualise the process's output with
journalctl -fu osc2oled
(if executing the command from the Bela IDE console, usejournalctl -n 20 -u osc2oled | cat
instead) - once you verify it is working, you can open a different Bela project and try to send OSC to it from the Bela project instead of the host
- once you are happy, you can enable the
osc2oled
process to start automatically in the background at boot withsystemctl enable osc2oled
. Later you can disable it withsystemctl disable osc2oled
- caveat: when running at startup, the
osc2oled
service will probably start after the Bela program has started, so if you send OSC to it too early when your program starts, some content may not be visualised on the screen.