<!DOCTYPE html>
<html>
  <head>
    <title>
      waveshaper.html
    </title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <script>

      const sampleRate = 44100;
      const lengthInSeconds = 4;
      const numberOfRenderFrames = sampleRate * lengthInSeconds;
      const numberOfCurveFrames = 65536;

      let context;
      let inputBuffer;
      let waveShapingCurve;

      function generateInputBuffer() {
    