Skip to main content

SquareGenerator Node

Generates a square wave with the given frequency, amplitude and duty cycle.


Configuration​

This object does not provide any configuration options.


Properties​

Inherits properties from its parents, Node, SwitchboardObject.

amplitude​

Type: Float

Default: 1.0
Range: 0.0 to 1.0

The amplitude of the square wave in the range of [0, 1].

dutyCycle​

Type: Float

Default: 0.5
Range: 0.0 to 1.0

The fraction of each period the square wave is high, in the range of [0, 1].

frequency​

Type: Float

Default: 440.0
Range: 0.0 to 22000.0

The frequency of the square wave in Hz.

sweepDurationMs​

Type: Int

Default: 1000
Minimum: 0

The duration of a sweep in milliseconds.

sweepEndFrequency​

Type: Float

Default: 20000.0
Range: 0.0 to 22000.0

The frequency a sweep ends at in Hz.

sweepStartFrequency​

Type: Float

Default: 20.0
Range: 0.0 to 22000.0

The frequency a sweep starts from in Hz.


Actions​

Inherits actions from its parent, SwitchboardObject.

startSweep​

Sweeps the frequency linearly from sweepStartFrequency to sweepEndFrequency over sweepDurationMs, then holds the end frequency. frequency reports the current frequency during the sweep, and setting it cancels the sweep.

Parameters​

None.

Return Value​

None.


Events​

This object does not provide any events.