Web Audio Frequency Limit?

My goal is to generate audio at a specific frequency, and then check at what frequency the FFT result is used.

function speak() {
  gb.src = gb.ctx.createOscillator();
  gb.src.connect(gb.ctx.destination);
  gb.src.start(gb.ctx.currentTime);
  gb.src.frequency.value = 1000;
}

function listen() {
    navigator.getUserMedia = (navigator.getUserMedia
            || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia);

    navigator.getUserMedia({
        audio : true,
        video : false
    }, function(stream) {
        gb.stream = stream;
        var input = gb.ctx.createMediaStreamSource(stream);
        gb.analyser = gb.ctx.createAnalyser();
        gb.analyser.fftSize = gb.FFT_SIZE;
        input.connect(gb.analyser);

        gb.freqs = new Uint8Array(gb.analyser.frequencyBinCount);
        setInterval(detect, gb.BIT_RATE / 2);
    }, function(err) {
        console.log('The following gUM error occured: ' + err);
    });
}

See a working example at http://codepen.io/Ovilia/full/hFtrA/ . You may need to place a microphone next to the speaker to see the effect.

The problem is that when the frequency is somewhere above 15000 (for example, 16000), it seems that there is no reaction in the high frequency region anymore.

Is there any frequency limit with Web Audio, or is it the limit of my device?

What is the unit of each item when I receive from getByteFrequencyData?

+4
source share
4

- Web Audio, ?

, WebAudio . , . , , .

(Kurzweil KS40A). (Zoom H4). 1 .

Analyzer data at 5kHzAnalyzer data at 15kHzAnalyzer data at 17kHzAnalyzer data at 19kHz

, / .

, Zoom H4. , KS40a.

- , , , .

, getByteFrequencyData?

getByteFrequencyData FFT, , dBFS maxDecibles minDecibles AnalyserNode. , 0 minDecibles ( - -100dBFS) , 255 maxDecibles ( - -30dBFS) .

+3

- - 44,1 - , 22050 , , - . @Ovilia , , , Audacity, FFT - Audacity, , Analyze → ... , FFT, Spectrogram - , FFT, Sonic Visualizer - , FFT -?

+2

, , - 80 1100

, , , !

+1

, ( ), Fs/2, , ( ).

. 2 .

+1

All Articles