Still, this is just another brute-force method Don't get me wrong, I know that IIR filter design is not exactly elementary school math. I just hoped there would be a way to figure out the whole thing - without having to try out one conversion equation after another...
I've already modified the previous script to generate f to cutoff frequency table, it's way off from that in AICA docs. So it seems that at least we can't use the filter value directly as the f coefficient (I've tried this too by the way). This script is more accurate because I was to lazy to actualy solve the transfer function, rather I just made the loop do 1000 points and waited for it to dive below -3dB.
That does not address the main issue I have now - is the filter itself correct or not. This is what little I understand:
Basic 1-pole filter: out = f * in - (1 - f) * prev_out
Basic 1-pole filter with negative feedback: out = f * in - (1 - f) * prev_out - q * prev_out
In the end q * (prev_out - prev_prev_out) is just a slightly more convoluted way of introducing feedback - or am I wrong? This feedback will cause resonance, though (if I get this right) q in AICA can also have negative values, causing a dip first - very dangerous with f close to 1 as it will tend to amplify and overload.
The problem is I never found anyone doing actual filtering with this kind of feedback - though I've stumbled upon statement that resonance is not really used much except in synthesiers (which AICA is). I'm going to run more tests on Dreamcast this weekend. Perhaps FEG is much more closely tied to AEG than I initially thought... With my luck it's going to turn out this is not a filter problem at all, but something entierly else - just like it was with the DSP