[GH-ISSUE #30] Bugfix Infinity2 algorithm #24

Closed
opened 2026-05-05 22:02:03 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @sjaehn on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/airwindows/airwindows/issues/30

In the block
https://github.com/airwindows/airwindows/blob/master/plugins/MacAU/Infinity2/Infinity2.cpp#L263-L277 (and the respective lines in the VSTs) the lines 263 and 271 are the same. I think it should be K = tan(M_PI * biquadB[0]); for the line 271. Makes sense (at least for me) and sounds much better. I think it was simply a typo?

Originally created by @sjaehn on GitHub (May 28, 2021). Original GitHub issue: https://github.com/airwindows/airwindows/issues/30 In the block https://github.com/airwindows/airwindows/blob/master/plugins/MacAU/Infinity2/Infinity2.cpp#L263-L277 (and the respective lines in the VSTs) the lines 263 and 271 are the same. I think it should be `K = tan(M_PI * biquadB[0]);` for the line 271. Makes sense (at least for me) and sounds much better. I think it was simply a typo?
Author
Owner

@sjaehn commented on GitHub (May 28, 2021):

... and the same in Infity1 and MatrixVerb.

<!-- gh-comment-id:850719702 --> @sjaehn commented on GitHub (May 28, 2021): ... and the same in Infity1 and MatrixVerb.
Author
Owner

@airwindows commented on GitHub (May 28, 2021):

Well spotted! However:
biquadC[0] = biquadB[0] = biquadA[0] = ((pow(GetParameter( kParam_One ),2)*9900.0)+100.0) / GetSampleRate();

It's functionally the same. But well spotted! Even though they are the same number, they might not have been. Good eye :)

<!-- gh-comment-id:850727435 --> @airwindows commented on GitHub (May 28, 2021): Well spotted! However: biquadC[0] = biquadB[0] = biquadA[0] = ((pow(GetParameter( kParam_One ),2)*9900.0)+100.0) / GetSampleRate(); It's functionally the same. But well spotted! Even though they are the same number, they might not have been. Good eye :)
Author
Owner

@sjaehn commented on GitHub (May 29, 2021):

Yes, you are right. They are the same. There shouldn't be an audible difference. Hmmm. I don't trust my ears anymore ;-).

Anyway, if all three biquadX[0] values are the same, then K only needs to be calculated once. And two of those expensive tan can be removed. I'll try. It shouldn't make a big difference on systems with a big buffer size. But for those with a small one. And I have to run it inside my effect sequencer with inFramesToProcess = 1. This was the reason why I stumbled on it.

<!-- gh-comment-id:850732344 --> @sjaehn commented on GitHub (May 29, 2021): Yes, you are right. They are the same. There shouldn't be an audible difference. Hmmm. I don't trust my ears anymore ;-). Anyway, if all three `biquadX[0]` values are the same, then K only needs to be calculated once. And two of those expensive `tan` can be removed. I'll try. It shouldn't make a big difference on systems with a big buffer size. But for those with a small one. And I have to run it inside my effect sequencer with `inFramesToProcess = 1`. This was the reason why I stumbled on it.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/airwindows#24
No description provided.