Members
(static, constant) defaultSettings
Default settings for the sonifier.
(static, constant) exports.resetSonifier
Resets the sonifier. Used when a current sonification response needs to be stopped.
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 |
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
|
|||||||||
settings |
Array.<string> | Settings for the sonfiied response. |
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. |
Returns:
- Calculated frequency for the data value.
- Type
- number