On Tue, 22 Mar 2022 03:37:02 +0100 Ichthyostega <p...@ichthyostega.de> wrote:
>> 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. This seems fine now. I can mess about as much as I like - and not an Xrun in sight. It also plays nice with Undo/Redo. e.g. Set fade time to 2 seconds Set waveform type to Power Undo then immediately Redo Result: smooth fade back to Sine, then smooth fade again to Power :) -- Will J Godfrey https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. _______________________________________________ Yoshimi-devel mailing list Yoshimi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/yoshimi-devel