charton API / @chart-on/core / index / SonifierOptions
Interface: SonifierOptions
Defined in: packages/core/src/sonify.ts:47
Options for a sonifier: the series to play, how long and over which pitch range, the sound of each bar, volume, cues, and crosshair and keyboard behaviour.
Properties
announce
announce:
boolean
Defined in: packages/core/src/sonify.ts:72
Read the stepped bar's values in a polite live region. Skipped while the chart's crosshairReadout already reads them. Default true.
createAudioContext?
optionalcreateAudioContext?: () =>SonifyAudioContext
Defined in: packages/core/src/sonify.ts:74
Makes the audio context, on first use. Default: the browser's AudioContext. Tests pass a fake.
Returns
cues
cues:
SonifyCues
Defined in: packages/core/src/sonify.ts:62
Which events get a cue.
durationMs
durationMs:
number
Defined in: packages/core/src/sonify.ts:51
Time to play the whole visible range, ms. Each bar gets an equal share, 10 to 500 ms. Default 4000.
followCrosshair
followCrosshair:
boolean
Defined in: packages/core/src/sonify.ts:64
Move the crosshair along with the sound. Default true.
keyboard
keyboard:
boolean
Defined in: packages/core/src/sonify.ts:70
With the plot focused: P plays or pauses, Escape stops, and the crosshair step keys (Ctrl+Left and Ctrl+Right) sound the bar they reach. Default true.
mode
mode:
SonifyMode
Defined in: packages/core/src/sonify.ts:58
close: one steady tone at the close. range: a glide across the bar's low and high, rising on up bars and falling on down bars. Default close.
pitchRange
pitchRange:
object
Defined in: packages/core/src/sonify.ts:53
Frequencies (Hz) for the lowest and the highest value in view. Default 220 to 880 (two octaves).
high
high:
number
low
low:
number
series?
optionalseries?:SonifiedSeries
Defined in: packages/core/src/sonify.ts:49
The series to play. Default: the chart's main series.
volume
volume:
number
Defined in: packages/core/src/sonify.ts:60
Loudness, 0 to 1. Default 0.2.