train Reference

Pulse train generator

train

Examples

Arguments

width [number]

Optional

Controls the pulse width or duty cycle. A value of 0 has the smallest "on" pulse size, while a value of 1 has the largest. A value of 0.5 makes a pulse with half the time at 1 and half the time at 0.

pulsephase [number]

Optional

Sets the phase of the onset of the "on" portion of the pulse. A value of 0 places the "on" portion at the beginning of the interval, while other values (up to 1, which is the same as 0) delay the "on" portion by a fraction of the total inter-pulse interval.

Inlets

interval [number]

Specifies the period (time interval between pulse cycles), in milliseconds, of the pulse train values sent out the left outlet.

width [number]

Controls the pulse width or duty cycle. A value of 0 has the smallest "on" pulse size, while a value of 1 has the largest. A value of 0.5 makes a pulse with half the time at 1 and half the time at 0.

pulsephase [number]

Sets the phase of the onset of the "on" portion of the pulse. A value of 0 places the "on" portion at the beginning of the interval, while other values (up to 1, which is the same as 0) delay the "on" portion by a fraction of the total inter-pulse interval.

Outlets

out1 [number]

A float value of either 0.0 or 1.0 representing the high and low phases of the pulse train having the specified interval, width, and phase.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

hot [bool] (default: false)

Trigger computation on all inlets.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

interval [number]

Specifies the period (time interval between pulse cycles), in milliseconds, of the pulse train values sent out the left outlet.

pulsephase [number]

Sets the phase of the onset of the "on" portion of the pulse. A value of 0 places the "on" portion at the beginning of the interval, while other values (up to 1, which is the same as 0) delay the "on" portion by a fraction of the total inter-pulse interval.

reset [bang] (default: 0)

Banging this attribute will reset the object to its default state.

width [number]

Controls the pulse width or duty cycle. A value of 0 has the smallest "on" pulse size, while a value of 1 has the largest. A value of 0.5 makes a pulse with half the time at 1 and half the time at 0.

See Also

Name Description
train~ Pulse train generator
<~ Is less than, comparison of two signals
>~ Is greater than, comparison of two signals
clip~ Clip an input to a range within an upper and lower bound.
sah~ Sample and hold operator (Schmitt trigger)
phasor~ Generate sawtooth signals