Spec-Zone.ru › Haxe JavaScript

BiquadFilterNode

package js.html.audio

extends AudioNode › EventTarget

Доступно в js

Интерфейс представляет собой простой фильтр низкого порядка, создаваемый с помощью метода AudioContext.createBiquadFilter(). Он является AudioNode, который может представлять различные типы фильтров, устройств регулировки тембра и графических эквалайзеров.

Документация BiquadFilterNode от Авторов Mozilla, лицензирована по CC-BY-SA 2.5.

См. также:

  • https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode

Конструктор

new(context:BaseAudioContext, ?options:Null<BiquadFilterOptions>)

Выбрасывает:

null

DOMError

Переменные

read onlyQ:AudioParam

Представляет собой AudioParam a-скорости, двойное значение, представляющее фактор Q или фактор качества.

read onlydetune:AudioParam

Представляет собой AudioParam a-скорости, представляющее девиацию частоты в центах.

read onlyfrequency:AudioParam

Представляет собой AudioParam a-скорости, двойное значение, представляющее частоту в текущем алгоритме фильтрации, измеряемую в герцах (Гц).

read onlygain:AudioParam

Представляет собой AudioParam a-скорости, двойное значение, представляющее усиление, используемое в текущем алгоритме фильтрации.

type:BiquadFilterType

Является строковым значением, определяющим тип алгоритма фильтрации, реализуемого узлом.

The meaning of the different parameters depending of the type of the filter (detune has the same meaning regardless, so isn't listed below)

	<tr>
		<code>type</code>
		Description
		<code>frequency</code>
		<code>Q</code>
		<code>gain</code>
	</tr>


	<tr>
		<code>lowpass</code>
		<td>Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through; frequencies above it are attenuated.</td>
		<td>The cutoff frequency.</td>
		<td>Indicates how peaked the frequency is around the cutoff. The greater the value is, the greater is the peak.</td>
		<td>Not used</td>
	</tr>
	<tr>
		<code>highpass</code>
		<td>Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated; frequencies above it pass through.</td>
		<td>The cutoff frequency.</td>
		<td>Indicates how peaked the frequency is around the cutoff. The greater the value, the greater the peak.</td>
		<td>Not used</td>
	</tr>
	<tr>
		<code>bandpass</code>
		<td>Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated; the frequencies inside it pass through.</td>
		<td>The center of the range of frequencies.</td>
		<td>Controls the width of the frequency band. The greater the <code>Q</code> value, the smaller the frequency band.</td>
		<td>Not used</td>
	</tr>
	<tr>
		<code>lowshelf</code>
		<td>Standard second-order lowshelf filter. Frequencies lower than the frequency get a boost, or an attenuation; frequencies over it are unchanged.</td>
		<td>The upper limit of the frequencies getting a boost or an attenuation.</td>
		<td>Not used</td>
		<td>The boost, in dB, to be applied; if negative, it will be an attenuation.</td>
	</tr>
	<tr>
		<code>highshelf</code>
		<td>Standard second-order highshelf filter. Frequencies higher than the frequency get a boost or an attenuation; frequencies lower than it are unchanged.</td>
		<td>The lower limit of the frequencies getting a boost or an attenuation.</td>
		<td>Not used</td>
		<td>The boost, in dB, to be applied; if negative, it will be an attenuation.</td>
	</tr>
	<tr>
		<code>peaking</code>
		<td>Frequencies inside the range get a boost or an attenuation; frequencies outside it are unchanged.</td>
		<td>The middle of the frequency range getting a boost or an attenuation.</td>
		<td>Controls the width of the frequency band. The greater the <code>Q</code> value, the smaller the frequency band.</td>
		<td>The boost, in dB, to be applied; if negative, it will be an attenuation.</td>
	</tr>
	<tr>
		<code>notch</code>
		<td>Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through; frequencies inside it are attenuated.</td>
		<td>The center of the range of frequencies.</td>
		<td>Controls the width of the frequency band. The greater the <code>Q</code> value, the smaller the frequency band.</td>
		<td>Not used</td>
	</tr>
	<tr>
		<code>allpass</code>
		<td>Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies.</td>
		<td>The frequency with the maximal group delay, that is, the frequency where the center of the phase transition occurs.</td>
		<td>Controls how sharp the transition is at the medium frequency. The larger this parameter is, the sharper and larger the transition will be.</td>
		<td>Not used</td>
	</tr>

Методы

getFrequencyResponse(frequencyHz:Float32Array, magResponse:Float32Array, phaseResponse:Float32Array):Void

На основе текущих параметров фильтра этот метод вычисляет частотную характеристику для частот, указанных в предоставленном массиве частот.

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/audio/BiquadFilterNode.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API