Delay

Library for delay processing.

Available Functions


samples(signal, delay, initial)

Delay a signal by some amount of “samples”

Usage

core.delay.samples(signal, delay);
core.delay.samples(signal, delay, initial);

Arguments

signal
[any] raw value
delay
[number] number of samples to delay the output
initial
[any] (optional) value to use for the first delay seconds (defaults to first received value)

time(signal, delay, initial)

Delay a signal by some amount of time

Usage

core.delay.time(signal, delay);
core.delay.time(signal, delay, initial);

Arguments

signal
[any] raw value
delay
[number] time, in seconds, to delay the output
initial
[any] (optional) value to use for the first delay seconds (defaults to first received value)

timeToTrue(signal, delay)

Delay the rising edge of a signal for delay seconds. Falling edges are passed through without delay. The output takes the value of the input after delay seconds from the last rising edge. So if the input is false at delay seconds, the output stays false.

Usage

core.delay.timeToTrue(signal, delay);

Arguments

signal
[boolean] raw value
delay
[number] time, in seconds, to delay the output rising edge

timeToFalse(signal, delay)

Delay the falling edge of a signal for delay seconds. Rising edges are passed through without delay. The output takes the value of the input after delay seconds from the last rising edge. So if the input is true at delay seconds, the output stays true.

Usage

core.delay.timeToFalse(signal, delay);

Arguments

signal
[boolean] raw value
delay
[number] time, in seconds, to delay the output falling edge