Skip to content Skip to sidebar Skip to footer

The Index Is Not In The Allowed Range

I'm currently having an issue with the Tone.Analyzer in Safari 10.1. When initializing the Tone.Analyzer with a size > Math.pow(2, 10) (1024) I get the following error: IndexSiz

Solution 1:

An early version of the WebAudio spec said that 2048 was the largest FFT size for the AnalyserNode. Later versions made the limit at least 32k, Safari still implements the old limit.

Solution 2:

I have similar issue. Not using Tone.js but Safari 11 AudioContext.analyser.fftSize does appear to be limited to 2048 and no more. I actually need the maximum of 32K. The same code, does however, work perfectly fine in Chrome on an Apple Desktop.

Alternative (regrettably) appears to require importing an open source JS FFT (I like https://github.com/audioplastic/ooura although I have not tried the JS version...C version is excellent). Would much rather webRTC do the heavy lifting of both the Time domain and Frequency domain sampling and computing. Would be much more future proof not to mention lighter solution.

Post a Comment for "The Index Is Not In The Allowed Range"