This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
Use non-linear scaling for high volume levels #532
Merged
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.
As discussed in #531, there is a good argument in favor of the music volume slider behaving like vanilla Doom but modified to smoothly transition when approaching maximum volume. This is so the user can perceive differences between higher volume slider settings which was a shortcoming of vanilla Doom. Source ports that prefer staying faithful to vanilla Doom should continue using the vanilla Doom approach. Other than that, both solutions are pretty similar.
Here's a plot I made from the previous PR. PrBoom+ targets the yellow line now:
Here's a capture of the MIDI output as the music volume slider is adjusted from 0 to 15:
So all SysEx messages are correct. As before, if a MIDI file tries to change the master volume, the message will be intercepted and scaled appropriately to the current volume slider and now with a correction factor applied as well.
I'll leave this as a draft so others can provide feedback.