<commit_before>

SineWave = function(context) {
  var that = this;
  this.x = 0; // initial samples
  this.context = context;
  this.freq = 440;
  this.amplitude = 0.5;
  this.node = context.createScriptProcessor(1024, 1, 1);
  this.node.onaudioprocess = function(event) { that.process(event) };
  this.sampleRate = this.context.sampleRate;


}

SineWave.prototype.process = function(event) {
  var data = event.outputBuffer.getChannelData(0);
  for (var i = 0; i < data.length; ++i){
    data[i] = this.amplitude * Math.sin( this.x++ / ( this.sampleRate / ( this.freq * 2 * Math.PI )));
  }
}
<commit_msg>update sin model<commit_after>

SineWave = function(context) {
  var that = this;
  this.x = 0; // initial samples
  this.context = context;
  this.freq = 440;
  this.amplitude = 0.5;
  this.playing = false;
  this.node = context.createScriptProcessor(1024, 1, 1);
  this.node.onaudioprocess = function(event) { that.process(event) };
  this.sampleRate = this.context.sampleRate;


}

SineWave.prototype.process = function(event) {
  var data = event.outputBuffer.getChannelData(0);
  for (var i = 0; i < data.length; ++i){
    data[i] = this.amplitude * Math.sin( this.x++ / ( this.sampleRate / ( this.freq * 2 * Math.PI )));
  }
}

{'fraction_non_alphanumeric': 0.15738498789346247, 'fraction_numerical': 0.024213075060532687, 'mean_word_length': 3.5090909090909093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3585876', 'n_tokens_mistral': 480, 'n_tokens_neox': 442, 'n_words': 94}