On the theme suggested by giuliomoro, here is an example of injecting an impulse into a filter and performing an FFT on the impulse response:
http://cackleberrypines.net/transmogrifox/src/bela/inductor_wah_C_src/Analysis/
The sets of plots in that directory were created by importing the raw data into a spreadsheet and graphing.
Either way this keeps the whole operation within a C program that spits out the data. This would be a first step to see how your filter itself performs -- you don't need to do realtime processing for this. You can also run this code on Bela if you are concerned about how the hardware handles the computations (just log in via ssh and run from console).
If you want to test the magnitude response in real-time, here is some frequency sweep code. Works sort of like a vector frequency analyzer:
https://github.com/transmogrifox/Bela_Misc/tree/master/frequency_sweep
I have the "some day" intention to add phase detection, but for now you can loop your filter through it and it will save a text output of the frequency sweep as well as displaying the frequency response as a periodic waveform on the oscilloscope (a hack that helps you monitor the status of the sweep on the scope).
Let me know if you want help using it.
Here's a crash course
Look at https://github.com/transmogrifox/Bela_Misc/blob/master/frequency_sweep/render.cpp
void render(BelaContext *context, void *userData)
{
for(unsigned int n = 0; n < context->audioFrames; n++) {
Here instead of reading with audioRead() you would write the output of your filter into rx0[] and/or rx1[]
rx0[n] = audioRead(context, n, 0);
rx1[n] = audioRead(context, n, 1);
}
//tick analyzes rx path and overwrites new samples onto tx path
fra_tick_n(fra0, rx0, tx0, context->audioFrames);
fra_tick_n(fra1, rx1, tx1, context->audioFrames);
for(unsigned int n = 0; n < context->audioFrames; n++)
{
Here is where you could choose to send it out to your filter. Instead of audioWrite(), send tx0[n] into your filter. If you are processing buffers then you would move this outside the loop.
audioWrite(context, n, 0, tx0[n]);
audioWrite(context, n, 1, tx1[n]);
I was wrong, this is just writing the signal to the scope. I did have a hack somewhere in which the frequency response was being written out periodically so you could see the shape on the periodic waveform on the scope.
scope.log(tx0[n], rx0[n]);
if(fra0->sweep_finished)
{
Bela_scheduleAuxiliaryTask(WriteOutTaskCh0);
fra0->sweep_finished = false;
}
if(fra1->sweep_finished)
{
Bela_scheduleAuxiliaryTask(WriteOutTaskCh1);
fra1->sweep_finished = false;
}
}
}