code: function createCurve(amount) {
        var curve = new Float32Array(WS_CURVE_SIZE);
  
        var k = 2 * amount / (1 - amount);
        var x;
  
        for (var i = 0; i < WS_CURVE_SIZE; i++) {
          x = i * 2 / WS_CURVE_SIZE - 1;
          curve[i] = (1 + k) * x / (1 + k * Math.abs(x));
        }
  
        return curve;
      }
docs: http://stackoverflow.com/questions/7840347/web-audio-api-waveshapernode