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

Convert attenuation from centibels to decibels #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spazzylemons
Copy link

Attenuation is currently used as a decibel value. However, the SoundFont Technical Specification describes initialAttenuation as being in centibels. Due to this, regions with a nonzero attenuation value are much quieter than they should be. This simple fix divides the attenuation by 10 when calculating note gain to perform the conversion.

Note how the lead organ in this MIDI (about 20 seconds in) is far quieter before the change, but after the change, it much more closely resembles FluidSynth's output.

Before fix:

tsf_before.mp4

After fix:

tsf_after.mp4

FluidSynth for reference:

fluidsynth.mp4

Spirrwell pushed a commit to Spirrwell/eduke32-mirror that referenced this pull request Mar 17, 2024
Incorporates this upstream PR which has yet to be merged.

schellingb/TinySoundFont#85
dibollinger pushed a commit to dibollinger/amcduke32 that referenced this pull request Apr 6, 2024
Incorporates this upstream PR which has yet to be merged.

schellingb/TinySoundFont#85
dibollinger pushed a commit to dibollinger/amcduke32 that referenced this pull request May 18, 2024
Incorporates this upstream PR which has yet to be merged.

schellingb/TinySoundFont#85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant