leeton I am thinking about if my code has some problems. I attached it here:
// instantiate the scope
Scope scope;
bool setup(BelaContext *context, void *userData)
{
// tell the scope how many channels and the sample rate
scope.setup(context->analogInChannels, context->audioSampleRate);
return true;
}
void render(BelaContext *context, void *userData)
{
// process the audio channels
// for(unsigned int n = 0; n < context->audioFrames; ++n)
// {
// for(unsigned int ch = 0; ch < context->audioOutChannels; ++ch)
// {
// float audio_in = audioRead(context, n, ch);
// }
// }
// process the analog channels
float analog_in[context->analogInChannels];
for(unsigned int n = 0; n < context->analogFrames; ++n)
{
for(unsigned int ch = 0; ch < context->analogInChannels; ++ch)
{
analog_in[ch] = analogRead(context, n, ch);
}
// log the three oscillators to the scope
scope.log(analog_in);
}
}
void cleanup(BelaContext *context, void *userData)
{
}