Closed DerozerDSP closed 9 months ago
If I understood you correctly, yes, for isnan val = 0.0, and for the rest to be hard clipped to +- 1, and for all these case to continue filtering.
@DerozerDSP If you want, please, create a pull request.
@DerozerDSP actually this will not help, the filter just becomes unstable for some high input and the resonance configuration ... hardcliping will just make the value to stay 1 until the end because the next value depends of the previous... better to be 0.
@iurienistor not sure I follow you? I can't see any bad on this:
if (std::isnan(input)) {
input = 0.0f;
}
if (input > 1.0f) {
input = 1.0f;
}
if (input < -1.0f) {
input = -1.0f;
}
it clip signal and just continue to process filtering, without delay and glitch towards 0 with high signal. Tried with a high signal as input, seems almost ok? On which settings do you get the filter unstable?
@DerozerDSP I tested with the above modifications, and yes, it seems to work better, and makes sense. I'll commit this change. Thank you!
But regarding the unstable issue. Run Geonkick, and don't change any control, enable osc1 filter, and turn the cutoff in the high frequency end... almost until the end. You''ll get this... You can export the sound and see what you'll get. The above modifications will not affect this issue, and I don't know if it can be solved, and I am not an expert on DSPs.
@iurienistor well, thats due to higher freq set for this kind of filter topology, not the input level.
Its a limit of the Chamberlin version; you can read more about this topic on Nigel page: https://www.earlevel.com/main/2003/03/02/the-digital-state-variable-filter/
It becomes usually unstable for cutoff freq one-sixth of sample rate. How is it configured Geonkick? Can't see any min/max freq bounds for the filter section...
@DerozerDSP Thanks for the link. No, it doesn't have a limits. I have tried to run the same sample twice... and it increases the frequency... but also depends of the Q factor. I'll try to revisit the filer, to check if it can be improved.
Hi,
its seems that with high input signal, the filter mute sample (and skip filter) instead of hard clip and follow filtering: https://github.com/Geonkick-Synthesizer/geonkick/blob/main/src/dsp/src/filter.c#L231
I don't think this is desidered? Lots of glitch and additional delay with input at higher level?
Thanks for a feedback.