Thanks giuliomoro !
I've managed to establish communication between Python code on PC and Bela, but the frames I'm receiving on PC end seem jumbled
Here is my function as it is now
//Auxiliary task that sends buffer to remoteIP via osc
void oscBuffer(void*) {
unsigned int numItems = gAnalogFrames * gAnalogInChannels;
float buf[numItems];
int ret;
while((ret = oscPipe.readNonRt(buf, numItems) ) > 0)
{
std::cout << std::setprecision(5) << ret << '\n';
oscSender.newMessage("/fmcw_print").add(&buf[0],ret).send();
}
}
And my Python code at the moment simply tries to print on the other end for a given packet sent, but all I get is this:
b'\x8a\xd3^\xbd,\xe1B<\x80E\xf1\xbbeb\xfd\xba6\xc8\xb3\xbd\xdb56=\xc7\xd6\x08\xbd\xa5\x1b\xa7\xbb\xc1\x8e\x9d\xbd\x83\xf35=\xeblJ\xbd\xa4\xc1\xf6\xbb\x16\x1f+\xbd\x85{\x19=\xfa}X\xbdT-\r\xbc\xe6&\xef\xbc\x07\xb3F=\xd3F\x17\xbdA \xa0\xbb\x17\x92#\xbcm\xdar=\x9e\x1b\x89\xbc\xca\x11\x00\xbb\x075\x1c<\xbd>{=\xd8\xde:;\x8b\x1a\xef9?\x9d\x03=V)\x94=h\x83\x0f<]\xb0\x0b;VBy=on\xa1=\xec7O<\x8fj?;\xcf\xdd\x8c=3{\x8c=\n\\\xaf<\x05\x1fO;\x13\xbf}=O\x03\x0c=\x12\x1c\xe6;\xb6\xba\xa89\x0b\xf9?=\xdd\x92\xe2\xbb\x9e _\xbc\xae\xa9,\xbb\xa7\x1f\xe2<\xd7\x10\xe6\xbc\x0bU\xa2\xbchVd\xbbT|7<_\xc8\xc6\xbc\xce\xb2\x18\xbd\x8f\xd9\xdf\xbb\x02\xc4.\xbc)ID\xbc\xcdfP\xbda|\xff\xbb\x15\xc9\xf3\xbc\x9f5\x99;\xb3D5\xbdG:\xb5\xbb'
Part of the problem is I'm not quite sure what the conditions of the while loop are doing in the above function. I tried adapting the writeBuffer function to perform this task but perhaps it requires some more tweaking.
Some of my IDE settings in case they're relevant:
gAnalogInChannels = 4;
gAnalogSampleRate = 44100; //Operating at 15-22kHz
gAnalogFrames = 64; //To keep under 1500 bytes as recommended in prev response
Lastly,
This has been bugging me, what is significance of rt vs non-rt? seeing them appended to end of read and write calls in bela examples. Not having success finding explanation online