expand

Polynomial

Wave
Spectrum

    

Starting with a phasor, we can map the wave using a polynomial function to create a custom wave shape. By changing the polynomial, you can create all kinds of wave shapes.

BE CAREFUL when using polynomials as the output can get big very fast, so you can produce all kinds of loud sounds. You should always clip your output sound to prevent this from happening. By default, this library clips all sounds at 0.5 amplitude to protect your ears.

To smooth the sound, try adding a low pass filter to the sound before clipping it.