Codebox Operators gatetotrig

gatetotrig

A gate to trigger operator.

new gatetotrig([options])

Options

NameTypeDefaultDescription
edgeenumpos

The @edge attribute sets the trigger transition direction.

* 0 = positive (default)
* 1 = negative

Note: a negative edge trigger will be 1 sample late

Enum Values:
pos | neg

Methods

next(val): out1

Arguments

NameTypeDefaultDescription
valnumber

Returns

NameTypeDescription
out1number

Outputs a 1.0 as a float value only when a transition is detected, otherwise outputs a zero.
By default, only triggers on a positive transition.

reset(): void