f('webkitAudioContext' in window) {
           audioContext = new webkitAudioContext();
        } else {
          audioContext = new AudioContext();
        }
        // create audio nodes
        let masterGain = audioContext.createGain();
        masterGain.gain.value = 1.0 / frequencies.length;
        masterGain.connect(audioContext.destination);

        let analyser = audioContext.createAnalyser();
        analyser.fftSize = 2048;
        analyser.smoothingTimeConstant = 0.0;
        analyser.minDeci