I recently started to use Bela platform in order to implement some basic system for research at my faculty. This program has two parts: first is some calculation and the second one is standard Bela real-time program with setup(), render() and cleanup() function as usual. I run first part separately from second part, and I get what I want (point is-it works). I run it in visual studio. It has some classes, it has .h and .cpp files...
Problem occurs when I want to combine those two programs, and first run first part (i copied .cpp and .h files in BelaIDE, and I need to put main() somewhere) and then the second part which sholud be real-time. I tried to put whole main function in setup() function, then I tried to put that whole function above setup(), I even tried to make another function (eg m() and put all content of my original main in that function) and to call that function from setup(). But none of those works.
Could you help me, please?