<commit_before>function addGuitarNote(v, t, f) {
  let fader = ac.createGain();
  fader.connect(reverb);

  let lnf = Math.log(f);
  let peakScale = (0.0529162 * lnf - 0.785209) * lnf + 3.57215
  let decayScale = 0.15;
  let frequencyCenter = 146.8;
  let filterOffset = 0.7 * (f - frequencyCenter);
  let filterScale = 1 * (v - 1) + 1;

  let attack = 0.001;
  let peakTime = t + attack;
  let sawPeak = 0.3 * peakScale;
  let sawDecay = 10;

  let filter = ac.createBiquadFilter();
  filter.connect(fader);
  filter.frequency.value =
    Math.max(1, (132 + filterOffset) * filterScale);
  filter.detune.setValueAtTime(2000, t);
  filter.detune.setTargetAtTime(0, peakTime, 4 * decayScale);

  let sawGain = ac.createGain();
  sawGain.connect(filter);
  sawGain.gain.setValueAtTime(0, t);
  sawGain.gain.linearRampToValueAtTime(sawPeak, peakTime);
  sawGain.gain.setTargetAtTime(0, peakTime, sawDecay * decayScale);

  let saw = ac.createOscillator();
  saw.type = "sawtooth";
  saw.frequency.value = f;
  saw.connect(sawGain);
  saw.start(t);

  let note = {
    fader: fader,
    oscillators: [saw],
    start: t,
    expiration: peakTime + sawDecay,<commit_msg>truncate guitar tail<commit_after>function addGuitarNote(v, t, f) {
  let fader = ac.createGain();
  fader.connect(reverb);

  let lnf = Math.log(f);
  let peakScale = (0.0529162 * lnf - 0.785209) * lnf + 3.57215
  let decayScale = 0.15;
  let frequencyCenter = 146.8;
  let filterOffset = 0.7 * (f - frequencyCenter);
  let filterScale = 1 * (v - 1) + 1;

  let attack = 0.001;
  let peakTime = t + attack;
  let sawPeak = 0.3 * peakScale;
  let sawDecay = 10;

  let filter = ac.createBiquadFilter();
  filter.connect(fader);
  filter.frequency.value =
    Math.max(1, (132 + filterOffset) * filterScale);
  filter.detune.setValueAtTime(2000, t);
  filter.detune.setTargetAtTime(0, peakTime, 4 * decayScale);

  let sawGain = ac.createGain();
  sawGain.connect(filter);
  sawGain.gain.setValueAtTime(0, t);
  sawGain.gain.linearRampToValueAtTime(sawPeak, peakTime);
  sawGain.gain.setTargetAtTime(0, peakTime, sawDecay * decayScale);

  let saw = ac.createOscillator();
  saw.type = "sawtooth";
  saw.frequency.value = f;
  saw.connect(sawGain);
  saw.start(t);

  let note = {
    fader: fader,
    oscillators: [saw],
    start: t,
    expiration: peakTime + 6,
{'fraction_non_alphanumeric': 0.13991416309012875, 'fraction_numerical': 0.04592274678111588, 'mean_word_length': 3.6341948310139167, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4058152', 'n_tokens_mistral': 978, 'n_tokens_neox': 889, 'n_words': 193}