{"size": 620, "ext": "js", "max_stars_repo_path": "udemy-music-box-tutorial/musicbox.js", "max_stars_repo_name": "taijusanagi/sandbox-generative-music-nft", "max_stars_repo_stars_event_min_datetime": "2022-03-13T22:35:20.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-13T22:35:20.000Z", "max_issues_repo_path": "udemy-music-box-tutorial/musicbox.js", "max_issues_repo_name": "taijusanagi/sandbox-generative-music-nft", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "udemy-music-box-tutorial/musicbox.js", "max_forks_repo_name": "taijusanagi/sandbox-generative-music-nft", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.6666666667, "max_line_length": 77, "alphanum_fraction": 0.5887096774}
window.onload = function () {
  var bufferLoader = new BufferLoader(
    Audio.audioContext,
    [
      "A4.mp3",
      "A5.mp3",
      "C4.mp3",
      "C5.mp3",
      "D4.mp3",
      "D5.mp3",
      "E4.mp3",
      "E5.mp3",
      "G4.mp3",
      "G5.mp3",
    ],
    finishedLoading
  );
  bufferLoader.load();

  function finishedLoading(bufferList) {
    Audio.init(bufferList);

    var canvas = document.getElementById("canvas");
    var view = new View(canvas);

    canvas.addEventListener("mousedown", view.handleClick.bind(view), false);
    setInterval(view.updateDisplay.bind(view), view.frameRate);
  }
};
