Namespace: sonifier

sonifier

Source:

Members

(static, constant) defaultSettings

Default settings for the sonifier.

Source:

(static, constant) exports.resetSonifier

Resets the sonifier. Used when a current sonification response needs to be stopped.

Source:

Methods

(static) getOscillatorType(settings) → {string}

Constructs the oscillator type as per Tone.js library's specs

Parameters:
Name Type Description
settings Object

The settings for the sonifier

Source:
Returns:
  • The oscillator type for the Tone.js oscillator
Type
string

(static) sonifier(Tone, data, settings) → {Array.<Object>}

Generates the sonified respoonse.

Parameters:
Name Type Description
Tone Object

The instance from tonejs library.

data Object

The data from the viz.

Properties
Name Type Description
x Array.<string>

Values of the independent variable.

y Array.<string>

Values of the dependent variable.

settings Array.<string>

Settings for the sonfiied response.

Source:
Returns:
  • Oscillations in the sonified response.
Type
Array.<Object>

(static) toFrequency(value, minimumDataValue, maximumDataValue, minimumFrequency, maximumFrequency) → {number}

Maps the value to a frequency.

Parameters:
Name Type Description
value number

The data value to be mapped to a frequency.

minimumDataValue number

The minimum data point in the data set.

maximumDataValue number

The maximum data point in the data set.

minimumFrequency number

The minimum allowed frequency.

maximumFrequency number

The maximum allowed frequency.

Source:
Returns:
  • Calculated frequency for the data value.
Type
number