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

Fix modLfoToVol behavior #1377

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Fix modLfoToVol behavior #1377

merged 1 commit into from
Sep 19, 2024

Conversation

derselbst
Copy link
Member

Previously, modLfoToVol never caused the volume to increase, because amplitude calculation is performed in fluid_cb2amp() which previously forbids negative values. This PR changes this behavior and permits negative values. I believe this is a rare case, hence I'm calculating the values on the fly rather than using lookup tables as we usually do in such cases

Fixes #1374.

@derselbst derselbst added the bug label Sep 8, 2024
@derselbst derselbst added this to the 2.4 milestone Sep 8, 2024
@derselbst
Copy link
Member Author

@mrbumpy409 FYI. Seems like test case column nr. 5 should have been red previously ;)

Copy link

sonarqubecloud bot commented Sep 8, 2024

@mrbumpy409
Copy link

@mrbumpy409 FYI. Seems like test case column nr. 5 should have been red previously ;)

Good point, haha! At the time, I saw the same volume clamping with Audigy 2 when the track volume was set to 127, so I figured FluidSynth was emulating that behavior.

With CC7 = 127 and velocity = 127, the modLfoToVol test on Audigy 2 ZS looks like this (note, my newer, yet-to-be-published version of this test uses a sine instead of saw wave):
image

Anyway, I actually understand the SoundFont 0dB voice volume ceiling now, and future versions of my test will properly account for that.

@derselbst derselbst merged commit f9236fe into master Sep 19, 2024
72 of 78 checks passed
@derselbst derselbst deleted the issue1374 branch September 19, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModLfoToVolume incorrect - the volume doesn't rise
2 participants