Conversation
|
Contributor
Won't that hurt the performance? If the function was designed to handle blocks of data, won't calling it repeatedly with only one sample make it slower? |
Member
Author
|
I don't think so. The function is inherently serial, i.e. it cannot be vectorized. Hence, the most expensive part is reading the samples from memory, which is (hopefully) avoided with the current approach as the sample might be ideally located in a register. Ofc, you're free to benchmark this. |
DominusExult
added a commit
to DominusExult/fluidsynth-sans-glib
that referenced
this pull request
Dec 27, 2024
* master: (66 commits) Add portamento test files Restore discovery of libsndfile on Ubuntu (FluidSynth#1454) Fix crash on startup when there are no MIDI devices (FluidSynth#1447) Replace VERSIONINFO resource cmake macro (FluidSynth#1449) Fix filter processing order in DSP chain (FluidSynth#1444) Render the nervous filter with additional soundfonts Add Christian's SF2 spec test to regression tests Bump testdata ref Migrate test files from LFS to submodule Delete test files from Git LFS Bump to 2.4.1 Smooth linear filter parameter change (FluidSynth#1432) Reenable AWE32 NRPN 23 and 24 (FluidSynth#1430) indentation issue Disable chorus for Uplift - it's too noisy in the middle part Add Klerg's renderings of Altitude and Uplift updated cmake build system * debug output for libsndfile, quieter output for pulseaudio * enhanced build summary report * revised building win32 binaries without unicode support add cmake output for sndfile issues Fix CI builds (FluidSynth#1435) Add test files for AWE32 NRPN (FluidSynth#1434) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Previously, the IIR filter was applied after the gain of the volume envelope was applied to the signal. This could have caused audible clicks when a voice is turned off while its filter was using a high Q value, see #1427.
This PR fixes that by applying the filter on the interpolated signal but before the volEnv gain is applied. This also matches the processing order of the DSP chain closer to the diagram of section 9.1.8 in the sf2 specification.
fluid_iir_filter_apply()which is actually meant to process an array of samples is now used to process only a single sample. One might consider to define this function in header file to allow the compiler to inline it...Fixes #1427