<commit_before>import sampleCombine from 'xstream/extra/sampleCombine';
import { diff, toHertz } from '../utils';

function createOscillator(audioContext, destination, note) {
  return (config) => {
    const gainNode = createGain(audioContext)(config);
    const oscillator = audioContext.createOscillator();

    oscillator.type = config.waveform;
    oscillator.detune.value = config.detune;
    oscillator.frequency.value = toHertz(440)(note);

    oscillator.connect(gainNode);
    gainNode.connect(destination);
<commit_msg>Brings tones down one octave<commit_after>import sampleCombine from 'xstream/extra/sampleCombine';
import { diff, toHertz } from '../utils';

function createOscillator(audioContext, destination, note) {
  return (config) => {
    const gainNode = createGain(audioContext)(config);
    const oscillator = audioContext.createOscillator();

    oscillator.type = config.waveform;
    oscillator.detune.value = config.detune;
    oscillator.frequency.value = toHertz(440)(note - 12);

    oscillator.connect(gainNode);
    gainNode.connect(destination);

{'fraction_non_alphanumeric': 0.1175925925925926, 'fraction_numerical': 0.007407407407407408, 'mean_word_length': 4.93956043956044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1980852', 'n_tokens_mistral': 334, 'n_tokens_neox': 324, 'n_words': 63}