import MorseAdaptiveListener from 'morse-pro/src/morse-pro-listener-adaptive.js'
MorseAdaptiveListener
Extends:
Extension of the MorseListener class which automatically adapts to the dominant frequency.
Constructor Summary
Public Constructor | ||
public |
constructor(bufferDuration: number) Parameters are all the same as the MorseListener class with the addition of the bufferDuration. |
Member Summary
Public Members | ||
public |
|
|
public |
buffer: *[] |
|
public |
|
|
public |
bufferSize: * |
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
@access: private |
Inherited Summary
From class MorseListener | ||
public set |
Set the minimum and maximum frequency filter values to be closely surrounding a specific frequency. |
|
public get |
|
|
public set |
Set the maximum threshold on the frequency filter. |
|
public get |
|
|
public set |
Set the minimum threshold on the frequency filter. |
|
public get |
|
|
public set |
Set the maximum threshold on the volume filter. |
|
public get |
|
|
public set |
Set the minimum threshold on the volume filter. |
|
public get |
|
|
public set |
Set the threshold used to determine if an anlaysed region has sufficient sound to be "on". |
|
public |
analyserNode: * |
|
public |
audioContext: * |
|
public |
decoder: * |
|
public |
defaults: {"fftSize": number, "volumeFilterMin": *, "volumeFilterMax": *, "frequencyFilterMin": number, "frequencyFilterMax": number, "volumeThreshold": number} |
|
public |
fftSize: * |
|
public |
|
|
public |
|
|
public |
freqBins: * |
|
public |
freqStep: * |
|
public |
|
|
public |
input: * |
|
public |
jsNode: * |
|
public |
|
|
public |
maxFreq: * |
|
public |
|
|
public |
sampleRate: * |
|
public |
sourceNode: * |
|
public |
|
|
public |
timeStep: * |
|
private |
|
|
private |
|
|
private |
|
|
public |
|
|
public |
fileErrorCallback(error: *) |
|
public |
fileLoadCallback(audioBuffer: *) |
|
public |
flush(on: *) Flush the current ticks to the decoder. |
|
public |
frequencyFilterCallback(jsonData: *) |
|
public |
@access: private |
|
public |
loadArrayBuffer(arrayBuffer: ArrayBuffer) Load audio data from an ArrayBuffer. |
|
public |
micErrorCallback(error: *) |
|
public |
|
|
public |
Play a loaded audio file (through speakers) and decode it. |
|
public |
This ScriptProcessorNode is called when it is full, we then actually look at the data in the analyserNode node to measure the volume in the frequency band of interest. |
|
public |
recordOnOrOff(soundIsOn: *) Called each tick with whether the sound is judged to be on or off. |
|
public |
spectrogramCallback(jsonData: *) |
|
public |
Start the decoder listening to the microphone. |
|
public |
stop() Stop listening. |
|
public |
volumeFilterCallback(jsonData: *) |
|
public |
volumeThresholdCallback(volume: *) |
Public Constructors
public constructor(bufferDuration: number) source
Parameters are all the same as the MorseListener class with the addition of the bufferDuration.
Override:
MorseListener#constructorParams:
Name | Type | Attribute | Description |
bufferDuration | number |
|
How long in ms to look back to find the frequency with the maximum volume. |
Public Members
public averageVolume: * source
public buffer: *[] source
public bufferSize: * source
public frequencyFilter: * source
Set the minimum and maximum frequency filter values to be closely surrounding a specific frequency.