Am 20.03.22 um 16:31 schrieb Will Godfrey:
Unfortunately I've hit a snag :(
When in Auto-Apply mode, if I increase the xFade time to more than about
300mS, on the next key press, and all future keys I get.
REJECT XFade... useCnt=1 old wavetable: 0x7fe3a9483040
Am 20.03.22 um 19:51 schrieb Ichthyostega:
This sounds interesting; seemingly the ref-count did not drop to zero, which
means there must be one note where the cross-fading wave interpolator must
have been destroyed before reaching the end of the fade time.
Indeed, there was a gap in my reasoning, attempting to package all of the
clean-up into a single (lambda) function. However, when a note ends while
the crossfade is still underway, this clean-up would then never be triggered
and thus the reference-count ends up corrupted.
The fix is to stick to the RAII pattern and do all ref-counting strictly
within the ctor and the detor of the interpolator objects.
Beyond that, I also experimented with a different mixing curve for the
crossfade (a classical S-shaped editing curve). I am not completely happy
with the results, but at least it seems more like "turning over" to a new
colour, and the marked decrease of volume during the transition is also
reduced. (Another idea might be to use a different curve for the fade-out
than for the fade-in?)
-- Hermann
PS: "padthread" branch also rebased on top of current master, as usual.
_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel