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.
This PR fixes two problems:
#1068: Previously, if a modulator had
src1
set to "No Controller" it would always cancelsrc2
.#1389: If any src was set to "No Controller", its input value would not be transformed.
Also, previously, some modulators received a "special treatment" during soundfont loading, by setting their amount to zero. This was to aid the magic done in
fluid_voice_get_lower_boundary_for_attenuation()
. After looking through that function again, I don't see the changes introduced influid_defsfont.c
will cause problems for thefluid_voice_get_lower_boundary_for_attenuation()
: Bipolar modulators are correctly accounted for. And ifsrc1
is set toFLUID_MOD_NONE
it will no longer cancel the modulator, hence it would trigger the else branch here:fluidsynth/src/synth/fluid_voice.c
Lines 1808 to 1812 in ce97c6d
The only theoretical problem that comes to my mind is if there was a modulator which sets both src1 and src2 to "No Controller", in which case it would never cause a "minimum" contribution.
But I might be missing something else. @mawe42 In case you have some time, could you have a look into the fluid_voice_get_lower_boundary_for_attenuation() as well?