RNBO Objects & Operators train~
Open Help

train~

Pulse train generator

Description

Generates a pulse signal whose period is specifiable in terms of samples (see <~ for a method of making a pulse wave at a specified frequency) with pulse-width and phase offset control. Can be used for timing and sync operations or as a gate in conjunction with rnbo_sah~. At very short intervals it can be a sound generator. For an anti-aliased rectangular wave pulse generator, see rnbo_rect~.

Arguments

interval [auto]

Optional

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

width [auto]

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 [auto]

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 [auto]

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

width [auto]

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 [auto]

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 [signal]

A pulse (square) wave train having the specified interval, width, and phase.

Dynamic Attributes

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

interval [auto]

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

pulsephase [auto]

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 [auto]

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~
<~
>~
clip~ Clip an input to a range within an upper and lower bound.
sah~ Sample and hold operator (Schmitt trigger)
phasor~ Generate sawtooth signals