Hello, tell me how to get the frequency from the getFloatFrequencyData method in Web Audio APi? Connected to the output, I get an array of the following form:
[-72.4644546508789, -50.16435241699219, -39.02543640136719, -37.38917541503906, -42.104286193847656, -47.633304595947266, -45.354637145996094, -31.857379913330078, -27.12179946899414, -30.678062438964844, ......] It is clear that the method returns float, then floating point numbers. Not all array elements have a nonzero value. In a word, I output an array from getFloatFrequencyData to the console, get an array. Now we need to get the frequency in Hz from this array. Initially it was assumed that the key of the array element is frequency, and the value is loudness in dB, but how can the loudness be negative?
this.bands = new Float32Array(this.analyser.frequencyBinCount); this.analyser.getFloatFrequencyData(this.bands) console.log(this.bands) And at the output of such an array ... Thank you in advance. ps I tried to check the melody of a known frequency (440MHz), did not achieve anything