this is not well documented. Some old instructions are here https://github.com/BelaPlatform/Bela/wiki/Developing-for-the-IDE but things have changed a fair bit since.
What I do normally when developing on the host after installing relevant modules:
If instead you want to run the IDE on the board, after installing relevant modules, do:
- rename or remove
IDE/ide-dev.js
to something else so it is doesn't affect the behaviour of the board if it is mistakenly copied to it
- in a dedicated terminal, from
IDE/
, run gulp
, leave it running
- in a dedicated terminal, from
IDE/frontend-dev
, run gulp
, leave it running
- open a browser on bela.local/ . On source file changes, built files are copied to the board, the backend will be restarted if needed and the frontend needs to be refreshed (there are hooks for the livereload plugin, not sure they work).
As for the GUI, it currently expects a websocket at location.host:5555/gui_control
, which on connection should send a new-connection
event with event.detail.projName
set to the project name, which in turn is used to load the sketch.js file from that project's canonical path. Look at IDE/public/gui/js/BelaControl.js
and IDE/public/gui/js/GuiHandler.js
(which is where I got this information from): you should be able to change them so that it loads the sketch from a given path so you don't need the websocket connection. In fact, looking at the code it would seem that you can already pass via query string project=MYPROJECT
instead of expecting autodetection via the socket.
1) is there is a way to set up a local dev environment to test P5JS guis without having to upload the sketch to Bela. I couldn't find any reference on how to do that, but it would definitely speed up the process.
Why is it that it would speed up the process ? What is your workflow currently and what is slowing you down?