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

modulation envelope attack is wrong curve and duration #94

Open
mrbumpy409 opened this issue Oct 14, 2024 · 0 comments
Open

modulation envelope attack is wrong curve and duration #94

mrbumpy409 opened this issue Oct 14, 2024 · 0 comments

Comments

@mrbumpy409
Copy link

I ran the SoundFont Spec Implementation Test and found an issue with TinySoundFont's modulation envelope. Here are the details for the modulation envelope test, copied from the test documentation:

Test #2: Modulation envelope

This test uses all six envelope stages, each lasting exactly 1 second. The stages are delay, attack, hold, decay, sustain, and release. The attack should be a convex curve, while the remaining envelope stages should all be linear. You should hear the note's pitch change according to the following envelope shape:

        ____
       /    \
      /      \____
     /            \
____/              \

I viewed the test recording in Audacity using spectrogram view (TinySoundFont on top, FluidSynth on bottom):

image

This is zoomed in to show the attack, hold, and decay phases. You can see by the time ruler at the top, FluidSynth's attack is a convex curve and lasts for exactly one second (10.5 to 11.5), which is correct. TinySoundFont, however, uses a linear curve, and only lasts for about 0.14 seconds. The hold and decay phases are the correct durations, but due to the shortened length of the attack curve, they now occur too early in the sound.

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

No branches or pull requests

1 participant