WaveShaper phases

I have been using WaveShaper (Value) to create waveforms that are at the end of the chain ending up as audio.
I have noticed one thing about the phase of the output and I don’t think it is consistent, first of if you input 0 and have selected Sine you get 1… where you should get 0.5
Secondly if you look at the output as waveforms, it is a bit weird that Sine, Triangle and Rect are all out of phase by different amounts.

I also find it strange that Inverse is the inverse of the triangle and not Linear, it should in my mind be so since you can phase shift the inverted triangle to the non inverted triangle (Phase = 0.5) whereas you can not do that with Linear (Which behaves like a sawtooth wave)

I think this other behavior would be more consistent, and with a phase pin on the waveform it would be easy to revert back to the original behavior.

I think the relative phases should be like this: https://en.wikipedia.org/wiki/Sawtooth_wave#/media/File:Waveforms.svg from

I can see that this is probably an excellent beginners project for VL, but since we can not have enumerations from VL yet I wuold still suggest that the regular Waveshaper is updated

see patch for animated explanation

Sune

WaveshaperPhases.v4p (45.5 kB)

I made this module to fix these issues: waveshaper-(value-phase)