I found this library: http://codebase.es/riffwave/ that generate sounds on the fly in javascript.
I want to have a function that generates a sine wave of a certain frequency.
But the way we use the library is a lot of math, and I could not get it to work.
I tried
for(var i=0;i<10000;i++)data.push(127*(Math.sin(2*Math.PI*f*i)));
but it didn’t work.
How can i do this?
source share