Thanks alot for the help. It looks like setting the PGA input level to 0 matches the peak of the zoom with bela's peak.
If I want to make the project a standalone, should I use a command in the setup function or something, to set the PGA gain to zero or will bela remember the settings from the IDE?
edit: with a closer look it seems like bela is still peaking earlier than zoom does. I am using the following code to track the maximum value. When signal max = 0.99997 i guess that the signal has probably peaked. This happens when zoom still says it is at about -6 db as shown in the screen.
void render(BelaContext *context, void *userData)
{
static int gCount = 0;
static float max_signal = 0, Signal = 0;;
//float Signal_last = Signal;
if (gCount%13000 == 5) max_signal = 0; // clear max every ~5 seconds
max_signal = max(Signal,max_signal);
for (unsigned int n=0; n < context->audioFrames; n++){
for (unsigned int ch=0; ch < context->audioInChannels; ch++){
Signal = audioRead(context, n, ch);
audioWrite(context,n,ch,Signal);
}
}
if (gCount%2000 == 0) rt_printf("MAX IS %f\n",max_signal);
gCount++;
}
Additionally the PGA gain cannot go below zero to try to normalize the situation. maybe lowering the ADC level could work similarly?