Closed rtoy closed 5 years ago
So basically an input vs. output graph to show how the shaping transfer function is produced from the curve array, and then an input waveform to output waveform example to show the effect of the shaping? That looks like a relatively easy graphic.
Also am I reading this right, that a curve with a single value is allowed, and results in a transfer curve which is a horizontal line (resulting in a straight DC output)?
Paragraph 4 in https://webaudio.github.io/web-audio-api/#WaveShaperNode-attributes explicitly disallows curves of one (or fewer) elements.
Not sure where the best place to put this picture. Maybe add a new subsection at the end of the WaveShaper section, kind of like what we do for Biquads, IIRs, and Oscillators?
The description of the WaveShaperNode says linear interpolation is used (see also #87). But the fine details are a bit lacking.
Perhaps a formula and/or picture would make it clearer on how it's done. At least for the case of
oversample
=none
. The oversampling cases are purposely rather loose so you can do the up-sampling and down-sampling in whatever way. But the application of the curve is basically the same. in all cases.