Packageverlocity.components
Classpublic final class verSoundAnalyzer
InheritanceverSoundAnalyzer Inheritance Component Inheritance Singleton Inheritance Object

Preforms sound both real-time and pre-time sound analyzation. Real-time analysis includes beat detection, floating averages of overall volume, bass, mid, high, and harmonic. It relies on SoundMixer.computeSpectrum and the FrequencyAnalyzer class by Ben Stucki.



Public Properties
 PropertyDefined By
  AverageBass : Number
[read-only] Returns the current average bass.
verSoundAnalyzer
  AverageHarmonic : Number
[read-only] Returns the current average harmonic.
verSoundAnalyzer
  AverageHigh : Number
[read-only] Returns the current average high.
verSoundAnalyzer
  AverageMid : Number
[read-only] Returns the current average mid.
verSoundAnalyzer
  AverageVolume : Number
[read-only] Returns the current average volume.
verSoundAnalyzer
  BeatDelay : int
[read-only] Returns the beat delay (for beat detection).
verSoundAnalyzer
 InheritedclassName : Object
[read-only] Returns the class name of the component for dictionary registration.
Component
  CutOff : Number
[read-only] Returns the cut off (for beat detection).
verSoundAnalyzer
Protected Properties
 PropertyDefined By
 Inheritedstage : Stage
Component
Public Methods
 MethodDefined By
  
Constructor of the component.
verSoundAnalyzer
  
_Destruct():void
[override] Destructor of the component.
verSoundAnalyzer
 Inherited
_IsNotUpdating():Boolean
Returns if the component is not updating (paused).
Component
 Inherited
_IsValid():Boolean
Returns if this singleton is active/valid.
Singleton
 Inherited
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable.
Component
 Inherited
Updates the component, if possible.
Component
  
Beat():Boolean
Returns if there was a beat that occured.
verSoundAnalyzer
  
EnableAnalyzer(bEnabled:Boolean = true):void
Enables/disables the real-time analyzation.
verSoundAnalyzer
  
GetFrequency():Vector.<Number>
Returns the current audio FFT.
verSoundAnalyzer
Protected Methods
 MethodDefined By
 Inherited
Called if verConsole is enabled, used to create concommands for the component.
Component
  
_Update():void
[override] Updates the FFT and averages.
verSoundAnalyzer
Property Detail
AverageBassproperty
AverageBass:Number  [read-only]

Returns the current average bass. 20Hz - 200Hz


Implementation
    public function get AverageBass():Number
AverageHarmonicproperty 
AverageHarmonic:Number  [read-only]

Returns the current average harmonic. 630Hz - 800Hz


Implementation
    public function get AverageHarmonic():Number
AverageHighproperty 
AverageHigh:Number  [read-only]

Returns the current average high. 2kHz - 20kHz


Implementation
    public function get AverageHigh():Number
AverageMidproperty 
AverageMid:Number  [read-only]

Returns the current average mid. 630Hz - 2.5kHz


Implementation
    public function get AverageMid():Number
AverageVolumeproperty 
AverageVolume:Number  [read-only]

Returns the current average volume. 20Hz - 20kHz


Implementation
    public function get AverageVolume():Number
BeatDelayproperty 
BeatDelay:int  [read-only]

Returns the beat delay (for beat detection).


Implementation
    public function get BeatDelay():int
CutOffproperty 
CutOff:Number  [read-only]

Returns the cut off (for beat detection).


Implementation
    public function get CutOff():Number
Constructor Detail
verSoundAnalyzer()Constructor
public function verSoundAnalyzer()

Constructor of the component.

Method Detail
_Destruct()method
override public function _Destruct():void

Destructor of the component.

_Update()method 
override protected function _Update():void

Updates the FFT and averages.

Beat()method 
public final function Beat():Boolean

Returns if there was a beat that occured.

Returns
Boolean
EnableAnalyzer()method 
public final function EnableAnalyzer(bEnabled:Boolean = true):void

Enables/disables the real-time analyzation.

Parameters

bEnabled:Boolean (default = true)

GetFrequency()method 
public final function GetFrequency():Vector.<Number>

Returns the current audio FFT.

Returns
Vector.<Number>