Mr Stenzel, CEO of Waldorf Music GmbH, decided to disclose his excellent pseudo sinusoidal formula: .
Here is a plot of the function:
As you can see, this really looks like a sine wave! The following error plot reveals a maximum error of 0.056:
In terms of distortion, Mr. Stenzel is right. This function is 2.85 times better than the previous pseudo sine.
I needed a small routine to generate a cyclic waveform resembling sin(x) to test a CODEC board. This is what I came up with:
float pseudoSin(float x)
This produces the following waveform over the domain [-1,1]:
The derivative of the function is . The maximum and minimum occur at and , respectively. The function has maximum and minimum values of and .
The amplitude normalisation factor is approximately 2.5981. For completeness, here is the error of the function with respect to a real sin(x):
The error maximum is about 16.3%.