That looks like a stand-alone STK-based app.
In principle a new Bela backend could be added to RtAudio.cpp
/RtAudio.h
, so this will help with porting this and other STK. However, there is also lots of GUI stuff in there (see displayFunc()
in rt_lpc.cpp
), that would not work on Bela, so there is stuff to be edited out there as well.
It seems that all the audio thread is doing (see cb()
) is simply copying input samples into g_audio_buffer[]
and then output samples from g_another_buffer[]
into outBuffy[]
, while the actual LPC computation is performed in the GUI thread (displayFunc()
), where (lines 930 to 952) the calls to lpc_analyze()
and lpc_synthesize()
take place.
I think that you could just add the relevant files (possibly just lpc.cpp
and lpc.h
to a Bela project (whatever you do, make sure you don't add a function called main()
, or it will take the place of Bela's one and nothing will work), call initialize_analysis()
in setup()
, lines 930to952 of rt_lpc.cpp
in an AuxiliaryTask
, and what is needed to pass data to the auxiliary task in render()
. Not straightforward, but doable.