<commit_before>/**
 * Oscillator Instrument Pack,
 */
BandJS.loadPack('instrument', 'noises', function(name, audioContext) {
    var types = [
        'white',
        'pink',
        'brown',
        'brownian',
        'red'
    ];

    if (types.indexOf(name) === -1) {
        throw new Error(name + ' is not a valid noise sound');
    }

    return {
        createSound: function(destination) {
            switch (name) {
                case 'white':
                    return createWhileNoise(destination);
                case 'pink':
                    return createPinkNoise(destination);
                case 'brown':
                case 'brownian':
                case 'red':
                    return createBrownianNoise(destination);
            }
        }
    };

    function createWhileNoise(destination) {
        var bufferSize = 2 * audioContext.sampleRate,
            noiseBuffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate),<commit_msg>Change "whileNoise" to "whiteNoise"<commit_after>/**
 * Oscillator Instrument Pack,
 */
BandJS.loadPack('instrument', 'noises', function(name, audioContext) {
    var types = [
        'white',
        'pink',
        'brown',
        'brownian',
        'red'
    ];

    if (types.indexOf(name) === -1) {
        throw new Error(name + ' is not a valid noise sound');
    }

    return {
        createSound: function(destination) {
            switch (name) {
                case 'white':
                    return createWhiteNoise(destination);
                case 'pink':
                    return createPinkNoise(destination);
                case 'brown':
                case 'brownian':
                case 'red':
                    return createBrownianNoise(destination);
            }
        }
    };

    function createWhiteNoise(destination) {
        var bufferSize = 2 * audioContext.sampleRate,
            noiseBuffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate),
{'fraction_non_alphanumeric': 0.10989010989010989, 'fraction_numerical': 0.002997002997002997, 'mean_word_length': 1.7140921409214092, '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': '5605106', 'n_tokens_mistral': 554, 'n_tokens_neox': 511, 'n_words': 118}