JavaScript Web Synth from scratch — Step 1

const getSineWave = (frequency, x) => 
Math.sin(Math.PI * 2 * (frequency) * x / sampleRate) * amplitude
let sound = [];for (let x = 0; x < sampleRate; x++) {
sound[x] = getSineWave(frequency, x);
}
sound[x] = getSineWave(frequency, x) + getSineWave(frequency / 2, x) 

I love music, climbing and I am a full stack web developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store