Fix Sf2 Player's reverb and chorus effects#8274
Fix Sf2 Player's reverb and chorus effects#8274jlintgod1 wants to merge 2 commits intoLMMS:masterfrom
Conversation
|
Other than that this will probably break backward compatibility (I have absolutely made projects using the parameters assuming that they worked and failed to disable when they didn't, and I'm certain others have too, we will probably have to fix that), I do have a query. |
I didn't consider this, and I think it also brings up the question of how to handle it if someone had an effect enabled and it just happened to work for their soundfont.
From what I found in Polyphone (and probably the SoundFont specification too), the only control that a soundfont has (outside a file/sample with the effect baked in) is one generator/parameter for each effect to control the percentage of each effect. All of the other parameters for an effect (like reverb damping and amount of chorus voices) are within the program/player playing the soundfont (in this case, the Fluidsynth library used by Sf2 Player), rather than the soundfont itself. So they're actually just audio effects built into Sf2 Player, with the soundfont determining the effect amount. Not sure if it makes sense or if it's actually how it works though. |
https://discord.com/channels/203559236729438208/203559236729438208/1475444249955667998 |
Thanks for the information (and a explanation more concise than mine)! With this in mind though, I might add some new modes for reverb/chorus effects to better support Soundfonts that already have reverb effects. The four I have in mind:
If you or anyone else has any other feedback (before I think about adding it in), feel free to bring it up. |
|
I'm not entirely sure how it works, and it's possible some have fluidsynth's inbuilt set available for enabling as you mentioned. |
Added check to ensure older projects with effects enabled don't sound different (by disabling said effects). Additional TODO notes are in DataFile.
|
Does your commit run a backward compatibility check, or does it universally turn it off? |
|
This is not backward compatibility. |

This PR fixes Sf2 Player's built in reverb and chorus effects not working with most soundfonts by automatically setting some MIDI controllers that control them (controllers 91 and 93). From what I looked at in the SoundFont specification, controllers 91 and 93 add to soundfont generators/parameters for reverb and chorus effect sends. Some of the soundfonts I looked at (i.e. just the SGM soundfont) don't have anything set for those generators, resulting in a default value of 0 and no audio being sent or processed by any effects.
I typically use separate audio effects for reverb and chorus, but I think it's still useful for beginners who might not know about them yet (and see the ones in Sf2 Player).
Some other notes (might out of scope for this PR?)