Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammond chorus loop out of range #21

Open
jpcima opened this issue May 3, 2021 · 4 comments
Open

Hammond chorus loop out of range #21

jpcima opened this issue May 3, 2021 · 4 comments
Labels
Bristol-issue Issue reported originally to Bristol Project Bugs synth/hammond Hammond Organ

Comments

@jpcima
Copy link

jpcima commented May 3, 2021

This loop accesses 1 item out of range in tapfilt, which is of size TAPS.
The other accesses are in tables of size TAPS+1 so these are fine.

I don't know yet what should be the proper solution for this problem, just noticed.

for (j = 0; j <= TAPS; j++)

@nomadbyte
Copy link
Owner

Nice catch, thanks!

From the usage in the hammondchorus context, it looks like the phase is never being referenced beyond phase[TAPS-1] (by definition of [a-f,z]tap indexes, which are limited to 8 = TAPS-1). Not sure if the intended behavior was fully implemented.

Meanwhile and given the scope, it would make sense to limit this loop to < TAPS for proper bounds. Maybe some other usage for the phase[TAPS] memory would pop in the debugger.

Did you notice any audible distortions in the current chorus rendering for Hammond? So we could rely on some test case for this.

@nomadbyte
Copy link
Owner

nomadbyte commented May 7, 2021

Tested the output with < TAPS applied: There's a noticeable difference in fullness of the vibrato-chorus -- sound is "thinner". So, indeed, the phase[TAPS] is being incorporated into the resulting sound somehow. This fix does not do it right.

Tried to apply the alternative fix -- expanded the tapfilt and tapgain arrays to TAPS+1. Seems to produce the same output sound as from the original vibrato-chorus. I guess, will settle on this fix. This should clear the compiler warning too.

@jpcima
Copy link
Author

jpcima commented May 7, 2021

Sorry that I haven't answered earlier, simply I didn't get opportunity to test bristol on its own and had other tasks.
I did only some source-level work but not tested anything at all.
I was still stuck at a vast number of bristol linking issues, but I could provide a PR of these later.

@nomadbyte
Copy link
Owner

nomadbyte commented May 7, 2021

Fixed in 871831a

Bristol-Bug: 96

@nomadbyte nomadbyte added the synth/hammond Hammond Organ label May 7, 2021
@nomadbyte nomadbyte added the Bristol-issue Issue reported originally to Bristol Project Bugs label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bristol-issue Issue reported originally to Bristol Project Bugs synth/hammond Hammond Organ
Projects
None yet
Development

No branches or pull requests

2 participants