I want to know how I can create custom sounds (using JavaScript) and stumbled upon following post by mozilla developer: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createPeriodicWave#example
This post shows, how to create the data for a sound and then play it, but sadly I don't know how the real and imaginary parts affect the sound.
What if, for example, I want to create a piano-like sound?
It would be nice if you could help me out and explain, how exactly I can create custom sounds by using pure JavaScript and maths.