Class: SynthPatch

Highcharts. SynthPatch

new SynthPatch(audioContext, options)

The SynthPatch class. This class represents an instance and configuration of the built-in Highcharts synthesizer. It can be used to play various generated sounds.

Parameters:
Name Type Description
audioContext AudioContext

The AudioContext to use.

options Highcharts.SynthPatchOptionsObject

Configuration for the synth.

Requires:
  • module:modules/sonification
Try it

Requires

  • module:modules/sonification

Methods

cancelScheduled()

Cancel any scheduled actions

connect(destinationNode)

Connect the SynthPatch output to an audio node / destination.

Parameters:
Name Type Description
destinationNode AudioNode

The node to connect to.

Returns:
AudioNode .

The destination node, to allow chaining.

mute()

Mute sound immediately.

silenceAtTime(time)

Mute sound at time (in seconds). Will still run release envelope. Note: If scheduled multiple times in succession, the release envelope will run, and that could make sound.

Parameters:
Name Type Description
time number

Time offset from now, in seconds

silenceAtTime(time, frequency, noteDuration)

Play a frequency at time (in seconds). Time denotes when the attack ramp starts. Note duration is given in milliseconds. If note duration is not given, the note plays indefinitely.

Parameters:
Name Type Description
time number

Time offset from now, in seconds

frequency number

The frequency to play at

noteDuration number | undefined

Duration to play, in milliseconds

startSilently()

Start the oscillators, but don't output sound.

stop()

Stop the synth. It can't be started again.