<commit_before><!DOCTYPE html>
<html>
<head>
  <script src="theremin.js"></script>
  <style>
    input[type=range] {
      width: 100%;
    }
  </style>
</head>
<body>

  <input id="theremin_tone_slider" type="range" name="points" min="1" max="1000">
  <input id="theremin_gain_slider" type="range" name="points" min="0" max="1" step="0.001">

  <h1>Wouldn't It Be Nice?</h1>
  <a id="play" class="player_control" href="">play</a>
  <a id="pause" class="player_control" href="">pause</a>

  <script>
    window.onload = function() {

      var context = Theremin.setContext(new AudioContext());

      //Theremin
      var oscillator = context.createOscillator();
      var gain = context.createGain();
      var theremin_tone_slider = document.getElementById("theremin_tone_slider");
      var theremin_gain_slider = document.getElementById("theremin_gain_slider");

      theremin_tone_slider.addEventListener('input', function() {
        oscillator.frequency.value = this.value;
      }, true);

      theremin_gain_slider.addEventListener('input', function() {
        gain.gain.value = this.value;
      }, true);

      oscillator.connect(gain);
      gain.connect(context.destination);

      oscillator.frequency.value = theremin_tone_slider.value;
      gain.gain.value = theremin_gain_slider.value;
      // oscillator.start(0);

      // Wouldn't It Be Nice
      var wouldnt_it_be_nice_player = new Theremin.Player();
      wouldnt_it_be_nice_player.loadBuffer("wouldnt_it_be_nice.mp3");

      var player_controls = document.querySelectorAll(".player_control");

      for (var i = 0; i < player_controls.length; i++) {
        player_controls[i].addEventListener('click', function(e) {
          e.preventDefault();
          wouldnt_it_be_nice_player[this.id]();
        });
      }
    };<commit_msg>comment theremin code<commit_after><!DOCTYPE html>
<html>
<head>
  <script src="theremin.js"></script>
  <style>
    input[type=range] {
      width: 100%;
    }
  </style>
</head>
<body>

  <!--
  <input id="theremin_tone_slider" type="range" name="points" min="1" max="1000">
  <input id="theremin_gain_slider" type="range" name="points" min="0" max="1" step="0.001">
  -->

  <h1>Wouldn't It Be Nice?</h1>
  <a id="play" class="player_control" href="">play</a>
  <a id="pause" class="player_control" href="">pause</a>

  <script>
    window.onload = function() {

      // Wouldn't it be nice
      var context = Theremin.setContext(new AudioContext());
      var wouldnt_it_be_nice_player = new Theremin.Player();
      var player_controls = document.querySelectorAll(".player_control");

      wouldnt_it_be_nice_player.loadBuffer("wouldnt_it_be_nice.mp3");

      for (var i = 0; i < player_controls.length; i++) {
        player_controls[i].addEventListener('click', function(e) {
          e.preventDefault();
          wouldnt_it_be_nice_player[this.id]();
        });
      }

      //Theremin
      // var oscillator = context.createOscillator();
      // var gain = context.createGain();
      // var theremin_tone_slider = document.getElementById("theremin_tone_slider");
      // var theremin_gain_slider = document.getElementById("theremin_gain_slider");

      // theremin_tone_slider.addEventListener('input', function() {
      //   oscillator.frequency.value = this.value;
      // }, true);

      // theremin_gain_slider.addEventListener('input', function() {
      //   gain.gain.value = this.value;
      // }, true);

      // oscillator.connect(gain);
      // gain.connect(context.destination);

      // oscillator.frequency.value = theremin_tone_slider.value;
      // gain.gain.value = theremin_gain_slider.value;
      // oscillator.start(0);
    };
{'fraction_non_alphanumeric': 0.15449134199134198, 'fraction_numerical': 0.010281385281385282, 'mean_word_length': 3.308857808857809, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1712983', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1157, 'n_words': 198}