Open ggggggggg opened 3 hours ago
Good idea. Are you suggesting that you'll do this? I am happy to, and I was the one just digging into the filter designs this week.
I am not suggesting that I'll do this. I just thought I'd try having chatGPT write up a refactoring as a quick test. I spent 20-30 mins having it revise. Then once I'd done that, it was clear it wasn't good enough to drop right in, but good enough to make a good issue.
The filter code is written in poor style in a variety of ways
Here is an example (incomplete) refactoring that avoid the use of mutation, limits code repetition, and generalizes over the differences between filters (noconst, baseline, etc). Moving the code in this direction is desireable. Now all the core math lives in just a few lines in
compute_filter
andcompute_fourier_filter
.with example usage