-
Notifications
You must be signed in to change notification settings - Fork 259
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
voice with high filter Q killed too early, causing audible click #1427
Comments
Thanks again for the report. I didn't found time to look into this, but here are two thoughts:
We wanted to in #319, but it didn't happen. On the other hand, there is that logic around "noise floor" that might explain the effect observed here: fluidsynth/src/rvoice/fluid_rvoice.c Line 52 in 168183c
Yes, because the SF spec asks for a gain compensation dependent on Q, which we currently do here: fluidsynth/src/rvoice/fluid_iir_filter.c Lines 204 to 215 in 168183c
But it's amount is only half of Q's peaks. I need to investigate how both are related to explain the observed effect here. |
That's an additional gain. it doesn't mention anywhere that only the Q Gain should be applied to the filter, but according to the diagram, it shows that the filter is affected both by Q and volEnv. It honestly makes sense and doing that does not cause any clicks since the ringing gets attenuated too. Not to mention that:
It does explicitly state that the final gain amplifier is the Q Gain added to the volEnv gain from the filtered input. |
FluidSynth version
Affects 2.3 (and presumably older) and 2.4 versions of FluidSynth including current master and iir-tests branches.
Describe the bug
By default FluidSynth cuts off a voice after the volume envelope release has reached -96 dB (as I recall... I'm going off of memory here). Normally the volume envelope being at -96 dB would be an inaudible cutoff, but when high filter Q is used, the filter hasn't stopped "ringing" at this point, and so the still audible sound is abruptly cut off, resulting in a click.
Steps to reproduce
high_Q_note_cutoff_test.zip
fluidsynth_iir-tests.flac
showing the result of this test using FluidSynth's current iir-tests branch.Current behavior
The voice cuts off while the filter is still resonating, causing an audible click. You can see this quite clearly by viewing the waveform in Audacity:
Expected behavior
The voice shouldn't be cut off until the filter output has also reached -96 dB.
Additional context
Related to bug #1415.
The text was updated successfully, but these errors were encountered: