Am 14.03.22 um 02:36 schrieb Ichthyostega:
... more detailed timing measurements, and these show a slow-down (degraded
performance) on short notes, seemingly caused somewhere within the
"padthread" refactorings. The very broad changes to FFT memory management can
not be the reason, since these are also shared with all OscilGen + ADDSynth,
and these show same (even slightly better) timings.


Hi Yoshimi-developers,

decided to postpone the above mentioned investigation to get the crossfade
functionality done first; and so there is a first working implementation on
the "padthread" branch now: set the crossfade time to something slower,
turn the "bandwith" wheel and the sound evaporates...


Well.
This whole topic seems to be challenging and damn nasty, if you take a closer
look. At first sight, just adding a crossfade seems easy. Put a second wavetable
alongside, have some status variable and then fade over. Unfortunately it is
not that easy, there were various problems to overcome...

 - the PADsynth wavetables are huge, so adding "another one" would
   just happily double the memory consumption of each PADSynth part.

 - which means: dynamic allocation, lifetime tracking, you name it.

 - Next nasty thing is: the background build can be ready at any time.
   We pick up the results at the start of some note, but this isn't
   necessarily the first of N playing notes. Thus some notes will notice
   the crossfade only on the next turn. This makes using a global crossfade
   state rather difficult.

 - then the wavetable interpolation itself is performance critical, and
   thus it is dangerous to work in the crossfade logic into the standard case.

Thus, after weighting various options, I went for a decentralised and dynamic
approach. Each playing note possibly detects a changed table, and inserts a
cross-fading delegate, which in turn uses the existing ("old") interpolator
as well as a new interpolator for the new wavetable, and mixes both results,
until the fade is done. After that, the delegate detaches itself and installs
the new interpolator instead -- so there is no overhead for crossfade logic
in the regular use case (other than calling through a virtual function, which
does not seem to cause any measurable difference here).

-- Hermann



_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to