You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frequency attribute is allowed to be any finite float. I think this should probably be limited to the range from 0 Hz to the Nyquist frequency.
The detune attribute is likewise allowed to be any finite float. This should probably be limited a smaller range like for OscillatorNode.detune.
The gain attribute is any finite float. But since it's in dB, the
range is actually much smaller since it would cause an overflow once it gets larger than about 770.
Finally, Q is a bit messy. First, for lowpass and highpass filters, Q is in dB, but is a linear value for other filter types.. Right now you can only tell if you look at the filter characterics to see how Q is used to determine the filter coefficients. We should make a note of that in the description of Q. It can be negative or positive in that case.
However, for the other filters such as bandpass, Q is a linear value. But negative values don't seem to be allowed. From https://www.w3.org/2011/audio/audio-eq-cookbook.html we can see that in this case, the Q value is related to the bandwidth for bandpass, notch, or peaking filters. Bandwidth is generally a non-negative number, so Q should be too.
Thus, we should make a note that Q is in dB for lowpass and highpass filters and can be positive or negative. For other filters, Q is linear and should be positive.
The text was updated successfully, but these errors were encountered:
As mentioned in the bug, we are
- limiting the frequency from 0 to Nyquist,
- limiting the gain parameter is limited so that it won't cause overflow in the
formulas
- limiting the detune values as done for the Oscillator.detune
- add some additiona text to mention Q is in dB for lowpass and
highpass filters and that for the other filters Q, negative values
of Q are clamped to 0.
Describe the issue
A few minor issues I noticed in the spec when I was looking at how some filters behave (at https://googlechromelabs.github.io/web-audio-samples/archive/demos/mag-phase.html).
range is actually much smaller since it would cause an overflow once it gets larger than about 770.
Finally, Q is a bit messy. First, for lowpass and highpass filters, Q is in dB, but is a linear value for other filter types.. Right now you can only tell if you look at the filter characterics to see how Q is used to determine the filter coefficients. We should make a note of that in the description of Q. It can be negative or positive in that case.
However, for the other filters such as bandpass, Q is a linear value. But negative values don't seem to be allowed. From https://www.w3.org/2011/audio/audio-eq-cookbook.html we can see that in this case, the Q value is related to the bandwidth for bandpass, notch, or peaking filters. Bandwidth is generally a non-negative number, so Q should be too.
Thus, we should make a note that Q is in dB for lowpass and highpass filters and can be positive or negative. For other filters, Q is linear and should be positive.
The text was updated successfully, but these errors were encountered: