Open olofson opened 10 years ago
Might nick some code or ideas from the 'env' unit for this...? The cosine spline mode seems particularly appropriate; probably better than the proposed cubic step.
However, the LUT based design doesn't lend itself very well to matching initial and final derivates, as suggested for the "cubic spline" mode... I suppose one could adjust the start and end points, but it kind of feels like an ordinary cubic spline solution is more appropriate for that.
We now have a DC generator with discrete stepping and linear ramping modes. (See #182.) This idea originally came up as a tool for replacing the hardcoded builtin wave rendering code in the core (see #152), but this unit could be (ab)used for a lot of other things.
However, only pulse and linear ramps makes it a bit limited, and there is also an issue with aliasing distorsion when generating continuous audio. The latter is due to transients not being band limited (same problem as when "abusing" wtosc; see #167 and #222), but both of these issues could be addressed to great extent by adding higher degree curves, as alternatives to the current STEP and LINEAR modes.
Some ideas: