Josh,
There seems to be a bug in the FluidSynth logic that controls the ADSR
envelope when it is modified during playback (through a modulator or
NRPN). In the example I used for testing, the bug occurs when I play a
note with the decay set high (sustain is 0), and then I set the decay
to 0 while holding the note. This realtime change should cause the
note to instantly decay to 0 at that point. Instead, when the decay is
set to 0, FluidSynth sustains the volume at the point it had decayed to
before the decay was set to 0. The code you discovered is a fix for
this behavior.
-~Chris
Josh Green wrote:
Hello Chris,
I'm just now getting around to having some time to put in FluidSynth.
The modifications you made to FluidSynth look really good, but I noticed
one change that you didn't mention in your PDF.
At the top of fluid_voice_write():
// If we're switching envelope stages from decay to sustain, force the value to be the end value of the previous stage
if (env_data && voice->volenv_section == FLUID_VOICE_ENVDECAY)
{
voice->volenv_val = env_data->min * env_data->coeff;
}
Any info on this would be great. I'm in the position where its
difficult for me to tell how correct your changes are, since I don't
have an overall view of the code base, although your rational for the
changes make sense. I'm going to apply the changes and do some tests.
It would be good to verify FluidSynth synthesis to a SB Live! card or
something of the sort. I've done this once before by routing audio from
FluidSynth to one channel and a SB Live! to the other and listened with
headphones.
Thanks for the attention you have given FluidSynth. Its been difficult
for me to be a decent maintainer for FluidSynth and attend to my other
projects (Swami, libinstpatch, etc) also. I've suspected many synthesis
issues with FluidSynth, but haven't had much time to investigate them.
Much appreciation and praise to you! :)
Josh
On Sun, 2008-08-17 at 15:22 -0500, S. Christian Collins wrote:
Dear FluidSynth developers,
I have found another bug that I would like to add to my official bug
report. Here is the updated report:
http://www.schristiancollins.com/temp/20080817_changes.pdf
The bug discovered is listed under item 6: Modulator Transform
Calculation Errors.
You can also download a copy of the code with all the changes already
made from here:
http://www.schristiancollins.com/temp/fluidsynth-1.0.8-scc4.tar.gz
The only change mentioned in my report that is not a part of the
linked source code is Pedro Lopez-Cabanillas' Windows patch.
-~Chris
S. Christian Collins wrote:
Dear FluidSynth developers,
I have updated the compilation of changes that I have made to the
FluidSynth code. Please disregard my previous report
(20080711_changes.pdf), as it is now outdated. You can view the
changes in PDF format by downloading from this link:
http://www.schristiancollins.com/temp/20080808_changes.pdf
I would like to propose that these changes be implemented in the
next version of FluidSynth (1.0.9?). I would like to publish
SoundFonts designed for FluidSynth, but my SoundFonts will require
some of these changes in order to function 100% as designed. I hope
you will agree that these changes are for the better of FluidSynth
and consider their inclusion in the project.
I cannot take full credit for these changes, however, as I had an
audio programmer make the actual changes to the code (I just told
him what needed to be changed). The programmer, however, prefers to
remain anonymous.
Thank You,
S. Christian Collins
_______________________________________________
fluid-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/fluid-dev
|