Packagecom.noteflight.standingwave2.filters
Classpublic class BiquadFilter
InheritanceBiquadFilter Inheritance AbstractFilter Inheritance Object

Infinite Impulse Response (IIR) linear filter based on the "Direct Form 1" filter structure, incorporating four delay lines from the two previous input and output values. This filter can be used in three ways: as a low-pass filter that attenuates frequencies higher than the frequency property, as a high-pass filter that attenuates frequencies lower than the center, or as a band-pass filter that attenuates frequencies that lie further from the center. In all three cases the resonance property controls the abruptness of the rolloff as a function of frequency. The type property determines which filter behavior is used.



Public Properties
 PropertyDefined By
 Inheriteddescriptor : AudioDescriptor
[read-only] The AudioDescriptor describing the audio characteristics of this source.
AbstractFilter
 InheritedframeCount : Number
[read-only] The number of sample frames in this source.
AbstractFilter
  frequency : Number
The center frequency of the filter in Hz.
BiquadFilter
 Inheritedposition : Number
[read-only] The position of the audio cursor in this source, as a frame index.
AbstractFilter
  resonance : Number
The resonance of the filter, which controls the degree of attenuation in its frequency response.
BiquadFilter
 Inheritedsource : IAudioSource
The underlying audio source for this filter.
AbstractFilter
  type : int
The type of the filter, which controls the shape of its frequency response.
BiquadFilter
Protected Properties
 PropertyDefined By
 Inherited_source : IAudioSource
The underlying source that acts as input to this filter.
AbstractFilter
Public Methods
 MethodDefined By
  
BiquadFilter(source:IAudioSource = null, type:int, frequency:Number = 1000, resonance:Number = 1)
Construct an instance of a BiquadFilter.
BiquadFilter
  
[override]
BiquadFilter
 Inherited
getSample(numFrames:Number):Sample
Retrieve a number of sample frames from this source as a Sample object, starting from the audio cursor position.
AbstractFilter
  
[override]
BiquadFilter
Protected Methods
 MethodDefined By
  
Called to force calculation of the derived coefficients.
BiquadFilter
  
Called when a property change invalidates the derived coefficients for the filter.
BiquadFilter
  
transformChannel(data:Vector.<Number>, channel:Number, start:Number, numFrames:Number):void
[override]
BiquadFilter
Public Constants
 ConstantDefined By
  BAND_PASS_TYPE : int = 2
[static] Band-pass filter type (constant peak, attenuated skirt)
BiquadFilter
  HIGH_PASS_TYPE : int = 1
[static] High-pass filter type
BiquadFilter
  LOW_PASS_TYPE : int = 0
[static] Low-pass filter type
BiquadFilter
Property Detail
frequencyproperty
frequency:Number

The center frequency of the filter in Hz.


Implementation
    public function get frequency():Number
    public function set frequency(value:Number):void
resonanceproperty 
resonance:Number

The resonance of the filter, which controls the degree of attenuation in its frequency response.


Implementation
    public function get resonance():Number
    public function set resonance(value:Number):void
typeproperty 
type:int

The type of the filter, which controls the shape of its frequency response.


Implementation
    public function get type():int
    public function set type(value:int):void
Constructor Detail
BiquadFilter()Constructor
public function BiquadFilter(source:IAudioSource = null, type:int, frequency:Number = 1000, resonance:Number = 1)

Construct an instance of a BiquadFilter. Parameters may be left as defaulted and/or changed later while the filter is in operation.

Parameters
source:IAudioSource (default = null) — the underlying audio source
 
type:int (default = NaN) — the type of filter desired
 
frequency:Number (default = 1000) — the center frequency of the filter
 
resonance:Number (default = 1) — the resonance characteristic of the filter, also known as "Q"
Method Detail
clone()method
override public function clone():IAudioSource

Returns
IAudioSource
computeCoefficients()method 
protected function computeCoefficients():void

Called to force calculation of the derived coefficients.

invalidateCoefficients()method 
protected function invalidateCoefficients():void

Called when a property change invalidates the derived coefficients for the filter.

resetPosition()method 
override public function resetPosition():void

transformChannel()method 
override protected function transformChannel(data:Vector.<Number>, channel:Number, start:Number, numFrames:Number):void

Parameters

data:Vector.<Number>
 
channel:Number
 
start:Number
 
numFrames:Number

Constant Detail
BAND_PASS_TYPEConstant
public static const BAND_PASS_TYPE:int = 2

Band-pass filter type (constant peak, attenuated skirt)

HIGH_PASS_TYPEConstant 
public static const HIGH_PASS_TYPE:int = 1

High-pass filter type

LOW_PASS_TYPEConstant 
public static const LOW_PASS_TYPE:int = 0

Low-pass filter type