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
"<code>peaking</code>", "<code>notch</code>", "<code>allpass</code>". The meaning
39
-
of the other options depends on the value of this one. The defaults for all are as
40
-
follows:
41
-
<ul>
42
-
<li><code>Q</code>: <code>1</code></li>
43
-
<li><code>detune</code>: <code>0</code></li>
44
-
<li><code>frequency</code>: <code>350</code></li>
45
-
<li><code>gain</code>: <code>0</code></li>
46
-
</ul>
47
-
</li>
48
-
</ul>
49
-
50
-
<p><code>lowpass</code>: (Default) Allows frequencies below a cutoff frequency to pass
51
-
through, and attenuates frequencies above the cutoff. This is a standard
52
-
second-order resonant lowpass filter with 12dB/octave rolloff.</p>
53
-
54
-
<ul>
55
-
<li><code>Q</code>: Controls how peaked the response will be at the cutoff
56
-
frequency. A large value makes the response more peaked. Please note that for this
57
-
filter type, this value is not a traditional Q, but is a resonance value in
58
-
decibels.</li>
59
-
<li><code>frequency</code>: The cutoff frequency.</li>
60
-
<li><code>gain</code>: Not used.</li>
61
-
</ul>
62
-
</dd>
63
-
<dd>
64
-
<p><code>highpass</code>: A highpass filter is the opposite of a lowpass filter.
65
-
Frequencies above the cutoff frequency are passed through, but frequencies below the
66
-
cutoff are attenuated. It implements a standard second-order resonant highpass
67
-
filter with 12dB/octave rolloff.</p>
68
-
69
-
<ul>
70
-
<li><code>Q</code>: Controls how peaked the response will be at the cutoff
71
-
frequency. A large value makes the response more peaked. Please note that for this
72
-
filter type, this value is not a traditional Q, but is a resonance value in
73
-
decibels.</li>
74
-
<li><code>frequency</code>: The cutoff frequency.</li>
75
-
<li><code>gain</code>: Not used.</li>
76
-
</ul>
77
-
</dd>
78
-
<dd>
79
-
<p><code>bandpass</code>: A bandpass filter allows a range of frequencies to pass
80
-
through and attenuates the frequencies below and above this frequency range. It
81
-
implements a second-order bandpass filter.</p>
82
-
83
-
<ul>
84
-
<li><code>Q</code>: Controls the width of the band. The width becomes narrower as
85
-
the Q value increases.</li>
86
-
<li><code>frequency</code>: The center of the frequency band.</li>
87
-
<li><code>gain</code>: Not used.</li>
88
-
</ul>
89
-
</dd>
90
-
<dd>
91
-
<p><code>lowshelf</code>: The lowshelf filter allows all frequencies through, but adds
92
-
a boost (or attenuation) to the lower frequencies. It implements a second-order
93
-
lowshelf filter.</p>
94
-
95
-
<ul>
96
-
<li><code>Q</code>: Not used.</li>
97
-
<li><code>frequency</code>: The upper limit of the frequencies where the boost, or
98
-
attenuation, is applied.</li>
99
-
<li><code>gain</code>: The boost, in dB, to be applied. If the value is negative,
100
-
the frequencies are attenuated.</li>
101
-
</ul>
102
-
</dd>
103
-
<dd>
104
-
<p><code>highshelf</code>: The highshelf filter is the opposite of the lowshelf filter
105
-
and allows all frequencies through, but adds a boost to the higher frequencies. It
106
-
implements a second-order highshelf filter.</p>
107
-
108
-
<ul>
109
-
<li><code>Q</code>: Not used.</li>
110
-
<li><code>frequency</code>: The lower limit of the frequencies where the boost, or
111
-
attenuation, is applied.</li>
112
-
<li><code>gain</code>: The boost, in dB, to be applied. If the value is negative,
113
-
the frequencies are attenuated.</li>
114
-
</ul>
115
-
</dd>
116
-
<dd>
117
-
<p><code>peaking</code>: The peaking filter allows all frequencies through, adding a
118
-
boost, or attenuation, to a range of frequencies.</p>
119
-
120
-
<ul>
121
-
<li><code>Q</code>: The width of the band of frequencies that are boosted. A large
122
-
value implies a narrow width.</li>
123
-
<li><code>frequency</code>: The center frequency of the boost range.</li>
124
-
<li><code>gain</code>: The boost, in dB, to be applied. If the value is negative,
125
-
the frequencies are attenuated.</li>
126
-
</ul>
127
-
</dd>
128
-
<dd>
129
-
<p><code>notch</code>: The notch filter (also known as a band-stop, or band-rejection
130
-
filter) is the opposite of a bandpass filter. It allows all frequencies through,
131
-
except for a set of frequencies.</p>
132
-
133
-
<ul>
134
-
<li><code>Q</code>: The width of the band of frequencies that are attenuated. A
135
-
large value implies a narrow width.</li>
136
-
<li><code>frequency</code>: The center frequency of the attenuation range.</li>
137
-
<li><code>gain</code>: Not used.</li>
138
-
</ul>
139
-
</dd>
140
-
<dd>
141
-
<p><code>allpass</code>: An allpass filter allows all frequencies through, but changes
142
-
the phase relationship between the various frequencies. It implements a second-order
143
-
allpass filter.</p>
144
-
145
-
<ul>
146
-
<li><code>Q</code>: The sharpness of the phase transition at the center frequency. A
147
-
larger value implies a sharper transition and a larger group delay.</li>
148
-
<li><code>frequency</code>: The frequency where the center of the phase transition
149
-
occurs. Viewed another way, this is the frequency with maximal group delay.</li>
150
-
<li><code>gain</code>: Not used.</li>
151
-
</ul>
34
+
<dd><p>An object with the following properties:</p>
35
+
<dl>
36
+
<dt><code>type</code></dt>
37
+
<dd><p>One of the following strings. The meaning
38
+
of the other options depends on the value of <code>type</code>.</p>
39
+
<dl>
40
+
<dt><code>lowpass</code></dt>
41
+
<dd>
42
+
<p>The default. Allows frequencies below a cutoff frequency to pass through, and attenuates frequencies above the cutoff. This is a standard second-order resonant lowpass filter with 12dB/octave rolloff. With this type of filter, the meaning of the other options are as follows:</p>
43
+
<ul>
44
+
<li><code>Q</code>: controls how peaked the response will be at the cutoff frequency. A large value makes the response more peaked. Please note that for this filter type, this value is not a traditional Q, but is a resonance value in decibels.</li>
45
+
<li><code>frequency</code>: the cutoff frequency.</li>
46
+
<li><code>gain</code>: not used.</li>
47
+
</ul>
48
+
</dd>
49
+
<dt><code>highpass</code></dt>
50
+
<dd>
51
+
<p>A highpass filter is the opposite of a lowpass filter.
52
+
Frequencies above the cutoff frequency are passed through, but frequencies below the cutoff are attenuated. It implements a standard second-order resonant highpass filter with 12dB/octave rolloff. With this type of filter, the meaning of the other options are as follows:</p>
53
+
<ul>
54
+
<li><code>Q</code>: controls how peaked the response will be at the cutoff frequency. A large value makes the response more peaked. Please note that for this filter type, this value is not a traditional Q, but is a resonance value in decibels.</li>
55
+
<li><code>frequency</code>: the cutoff frequency.</li>
56
+
<li><code>gain</code>: not used.</li>
57
+
</ul>
58
+
</dd>
59
+
<dt><code>bandpass</code></dt>
60
+
<dd>
61
+
<p>A bandpass filter allows a range of frequencies to pass
62
+
through and attenuates the frequencies below and above this frequency range. It implements a second-order bandpass filter. With this type of filter, the meaning of the other options are as follows:</p>
63
+
<ul>
64
+
<li><code>Q</code>: controls the width of the band. The width becomes narrower as the Q value increases.</li>
65
+
<li><code>frequency</code>: the center of the frequency band.</li>
66
+
<li><code>gain</code>: not used.</li>
67
+
</ul>
68
+
</dd>
69
+
<dt><code>lowshelf</code></dt>
70
+
<dd>
71
+
<p>The lowshelf filter allows all frequencies through, but adds
72
+
a boost (or attenuation) to the lower frequencies. It implements a second-order lowshelf filter. With this type of filter, the meaning of the other options are as follows:</p>
73
+
<ul>
74
+
<li><code>Q</code>: not used.</li>
75
+
<li><code>frequency</code>: the upper limit of the frequencies where the boost, or attenuation, is applied.</li>
76
+
<li><code>gain</code>: the boost, in dB, to be applied. If the value is negative, the frequencies are attenuated.</li>
77
+
</ul>
78
+
</dd>
79
+
<dt><code>highshelf</code></dt>
80
+
<dd>
81
+
<p>The highshelf filter is the opposite of the lowshelf filter
82
+
and allows all frequencies through, but adds a boost to the higher frequencies. It implements a second-order highshelf filter. With this type of filter, the meaning of the other options are as follows:</p>
83
+
<ul>
84
+
<li><code>Q</code>: not used.</li>
85
+
<li><code>frequency</code>: the lower limit of the frequencies where the boost, or attenuation, is applied.</li>
86
+
<li><code>gain</code>: the boost, in dB, to be applied. If the value is negative, the frequencies are attenuated.</li>
87
+
</ul>
88
+
</dd>
89
+
<dt><code>peaking</code></dt>
90
+
<dd>
91
+
<p>The peaking filter allows all frequencies through, adding a
92
+
boost, or attenuation, to a range of frequencies. With this type of filter, the meaning of the other options are as follows:</p>
93
+
<ul>
94
+
<li><code>Q</code>: the width of the band of frequencies that are boosted. A large value implies a narrow width.</li>
95
+
<li><code>frequency</code>: the center frequency of the boost range.</li>
96
+
<li><code>gain</code>: the boost, in dB, to be applied. If the value is negative, the frequencies are attenuated.</li>
97
+
</ul>
98
+
</dd>
99
+
<dt><code>notch</code></dt>
100
+
<dd>
101
+
<p>The notch filter (also known as a band-stop, or band-rejection filter) is the opposite of a bandpass filter. It allows all frequencies through, except for a set of frequencies. With this type of filter, the meaning of the other options are as follows:</p>
102
+
<ul>
103
+
<li><code>Q</code>: the width of the band of frequencies that are attenuated. A large value implies a narrow width.</li>
104
+
<li><code>frequency</code>: the center frequency of the attenuation range.</li>
105
+
<li><code>gain</code>: not used.</li>
106
+
</ul>
107
+
</dd>
108
+
<dt><code>allpass</code></dt>
109
+
<dd>
110
+
<p>An allpass filter allows all frequencies through, but changes
111
+
the phase relationship between the various frequencies. It implements a second-order allpass filter. With this type of filter, the meaning of the other options are as follows:</p>
112
+
<ul>
113
+
<li><code>Q</code>: the sharpness of the phase transition at the center frequency. A larger value implies a sharper transition and a larger group delay.</li>
114
+
<li><code>frequency</code>: the frequency where the center of the phase transition occurs. Viewed another way, this is the frequency with maximal group delay.</li>
115
+
<li><code>gain</code>: not used.</li>
116
+
</ul>
117
+
</dd>
118
+
</dl>
119
+
</dd>
120
+
<dt><code>Q</code></dt>
121
+
<dd>Defaults to 1. The meaning of this option depends on the value of <code>type</code>.</dd>
122
+
<dt><code>detune</code></dt>
123
+
<dd>Defaults to 0.</dd>
124
+
<dt><code>frequency</code></dt>
125
+
<dd>Defaults to 350.</dd>
126
+
<dt><code>gain</code></dt>
127
+
<dd>Defaults to 0. The meaning of this option depends on the value of <code>type</code>.</dd>
128
+
</dl>
152
129
</dd>
153
130
</dl>
154
131
132
+
155
133
<h3id="Return_value">Return value</h3>
156
134
157
135
<p>A new {{domxref("BiquadFilterNode")}} object instance.</p>
<dd>Can be used to return a new <code><ahref="/en-US/docs/Web/API/CSSUnitValue">CSSUnitValue</a></code> with a value of the parameter number of the units of the name of the factory function method used.</dd>
44
-
<dd>
43
+
<dd><p>Can be used to return a new <code><ahref="/en-US/docs/Web/API/CSSUnitValue">CSSUnitValue</a></code> with a value of the parameter number of the units of the name of the factory function method used.</p>
<dd>Returns a CSS property name by its index, or the empty string if the index is out-of-bounds.</dd>
53
-
<dd>An alternative to accessing <code>nodeList[<var>i</var>]</code> (which instead returns <code>undefined</code> when <code><var>i</var></code> is out-of-bounds). This is mostly useful for non-JavaScript DOM implementations.</dd>
<dd>The object to deliver to the main thread; this will be in the data field in the event delivered to the {{domxref("Worker.onmessage")}} handler. This may be any value or JavaScript object handled by the <ahref="/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm">structured clone</a> algorithm, which includes cyclical references.</dd>
<dd>An optional <ahref="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">array</a> of {{domxref("Transferable")}} objects to transfer ownership of. If the ownership of an object is transferred, it becomes unusable in the context it was sent from and it becomes available only to the main thread it was sent to.</dd>
30
-
<dd>Only {{domxref("MessagePort")}} and {{jsxref("ArrayBuffer")}} objects can be transferred.</dd>
29
+
<dd><p>An optional <ahref="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">array</a> of {{domxref("Transferable")}} objects to transfer ownership of. If the ownership of an object is transferred, it becomes unusable in the context it was sent from and it becomes available only to the main thread it was sent to.</p>
30
+
<p>Only {{domxref("MessagePort")}} and {{jsxref("ArrayBuffer")}} objects can be transferred.</p></dd>
0 commit comments