Namespace: VowelWorm

VowelWorm

Classes

Game
instance

Namespaces

Normalization

Members

static,constantVowelWorm.AUDIO

Representative of the current mode VowelWorm is in. In this case, an audio element

static,constantVowelWorm.DEFAULT_MAX_FORMANT_CHILDnumber

The maximum formant expected to be found for a female speaker
See:

static,constantVowelWorm.DEFAULT_MAX_FORMANT_FEMALEnumber

The maximum formant expected to be found for a female speaker
See:

static,constantVowelWorm.DEFAULT_MAX_FORMANT_MALEnumber

The maximum formant expected to be found for a male speaker
See:

static,constantVowelWorm.HANNING_SHIFTnumber

The amount the Hanning window needs to be shifted to line up correctly.
See:
TODO
  • This should be proportional to the window size.

static,constantVowelWorm.REMOTE_URL

Representative of the current mode VowelWorm is in. In this case, a remote URL turned into a source node

static,constantVowelWorm.STREAM

Representative of the current mode VowelWorm is in. In this case, a media stream

static,constantVowelWorm.VIDEO

Representative of the current mode VowelWorm is in. In this case, a video element

Methods

staticVowelWorm.convolve(m, y){Array.<number>}

Performs a convolution on two arrays
Name Type Description
m Array.<number>
y Array.<number>

staticVowelWorm.decibelsToLinear(dB){number}

Returns the linear magnitude of the given decibels value.
Name Type Description
dB number the value in dB to convert
TODO
  • — If we can find a generic representation somewhere of this algorithm, we can remove this license
Returns:
linear magnitude

staticVowelWorm.hann(vals, window_size){Array.<number>}

Applies a hanning window to the given dataset, returning a new array. You may want to shift the values to get them to line up with the FFT.
Name Type Description
vals Array.<number> The values to change
window_size number the size of the window
See:
Returns:
new values
Example
VowelWorm.hann([...], 75).shift(VowelWorm.HANNING_SHIFT);

staticVowelWorm.module(name, callback)

Adds a module to instances of VowelWorm.instance, as called by `new VowelWorm.instance(...);`
Name Type Description
name string the name of module to add
callback VowelWorm~createModule Called if successful. `this` references the module, so you can add properties to it. The instance itself is passed as the only argument, for easy access to core functions.
See:
  • attachModuleToInstance
  • modules
  • instances
Throws:
An Error when trying to create a module with a pre-existing property name

staticVowelWorm.removeModule(name)

Removes a module from all current and future VowelWorm instances. Used primarily for testing purposes.
Name Type Description
name string The name of the module to remove

staticVowelWorm.savitzkyGolay(y, window_size, order){Array.<number>}

Applies the Savitsky-Golay filter to the given array uses numeric javascript Adapted from http://wiki.scipy.org/Cookbook/SavitzkyGolay
Name Type Description
y Array.<number> The values to smooth
window_size number The window size.
order number The...? TODO
Returns:
plotted gives you a smooth curve version of an parameter array

Type Definitions

createModule(instance)

Callback used by VowelWorm.module
Name Type Description
instance window.VowelWorm.instance