MorsePlayerWAALight
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(params: Object) |
Method Summary
Public Methods | ||
public |
muteLight(mute: *) |
|
public |
|
|
public |
|
Private Methods | ||
private |
Set up the audio graph, connecting the splitter node to a JSNode in order to analyse the waveform |
|
private |
_off() |
|
private |
_on() |
|
private |
_processSound(event: *) |
Inherited Summary
From class MorsePlayerWAA | ||
public get |
|
|
public get |
frequency: * |
|
public set |
|
|
public get |
|
|
public get |
|
|
public get |
|
|
public get |
Return the index of the next note in the sequence to be scheduled. |
|
public get |
playMode: * |
|
public set |
Set the play mode (one of 'sine' and 'sample'). |
|
public get |
|
|
public set |
Set the volume for the player. |
|
public |
bandpassNode: * |
|
public |
endPadding: * |
|
public |
|
|
public |
isNote: *[] |
|
public |
|
|
public |
|
|
public |
onOffNode: * |
|
public |
|
|
public |
|
|
public |
splitterNode: * |
|
public |
startPadding: * |
|
public |
volumeNode: * |
|
private |
_cTimings: *[] |
|
private |
_endTimer: * |
|
private |
_frequency: * |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_playMode: * |
|
private |
_queue: *[] |
|
private |
|
|
private |
_startTimer: * |
|
private |
_stopTimer: * |
|
private |
_tZero: * |
|
private |
_timer: * |
|
private |
|
|
private |
_volume: * |
|
public |
|
|
public |
Load timing sequence, replacing any existing sequence. |
|
public |
this method was deprecated. - use queue() instead
Load timing sequence which will be played when the current sequence is completed (current queue is deleted). |
|
public |
Mutes or unmutes the audio (leaving the volume setting alone) |
|
public |
pause() Pause playback (resume with play()) |
|
public |
play() Starts or resumes playback of the loaded timing sequence. |
|
public |
Plays the loaded timing sequence from the start, regardless of whether playback is ongoing or paused. |
|
public |
Queue up a timing sequence (add to the end of the queue) |
|
public |
Called at the end of the last beep of a sequence. |
|
public |
Called at the point of the last notes of a sequence being scheduled. |
|
public |
Called to coincide with the start of the first note in a sequence. |
|
public |
Called when all sounds have definitely stopped. |
|
public |
stop() Stop playback (calling play() afterwards will start from the beginning) |
|
private |
Set up the audio graph. |
|
private |
Schedule notes that start before now + lookAheadTime. |
|
private |
_stop() Internal clean stop that doesn't destroy audiocontext |
Public Constructors
public constructor(params: Object) source
Override:
MorsePlayerWAA#constructorParams:
Name | Type | Attribute | Description |
params | Object | lots of optional parameters. |
|
params.defaultFrequency | number | fallback frequency (Hz) to use if the loaded sequence does not define any. |
|
params.startPadding | number | number of ms to wait before playing first note of initial sequence. |
|
params.endPadding | number | number of ms to wait at the end of a sequence before playing the next one (or looping). |
|
params.volume | number | volume of Morse. Takes range [0,1]. |
|
params.sequenceStartCallback | function() | function to call each time the sequence starts. |
|
params.sequenceEndingCallback | function() | function to call when the sequence is nearing the end. |
|
params.sequenceEndCallback | function() | function to call when the sequence has ended. |
|
params.soundStoppedCallback | function() | function to call when the sequence stops. |
|
params.soundOnCallback | function() | function to call when a note starts. |
|
params.soundOffCallback | function() | function to call when a note stops. |
|
params.onSample | string | URL of the sound file to play at the start of a note. |
|
params.offSample | string | URL of the sound file to play at the end of a note. |
|
params.playMode | string | play mode, either "sine" or "sample". |
Public Members
public jsNode: * source
public muteLightNode: * source
Private Members
Public Methods
public muteLight(mute: *) source
Params:
Name | Type | Attribute | Description |
mute | * |
public soundOffCallback() source
public soundOnCallback() source
Private Methods
private _initialiseAudio() source
Set up the audio graph, connecting the splitter node to a JSNode in order to analyse the waveform
Override:
MorsePlayerWAA#_initialiseAudioprivate _off() source
private _on() source
private _processSound(event: *) source
Params:
Name | Type | Attribute | Description |
event | * |