Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As @Federerer mentioned on #193, the iterations parameter is of questionable utility. I did some experiments and found that performance was actually better with more iterations in some cases. I think this is because the simulation state is closer to converged for the next sample if we don't stop iterating too early.
I also reduced the default oversample parameter from 8 to 2. I read somewhere ages ago (I can't remember where) that simulating audio circuits needed a high oversampling factor to avoid aliasing harmonics in an audible way, and the author recommended 8x. But, I've never once been able to notice a difference with any oversampling factor in terms of audio quality. Maybe this not an issue because our numerical integration is higher quality or something. We're also just doing a box downsample at the end anyways, perhaps this is negating any advantage from oversampling. 2 is what the VST plugin has been doing all along, and I don't think that has caused any issues. Most people are probably using the VST plugin anyways.
Opening this PR for discussion, more testing is probably needed.