drunk Reference

Output random numbers within a step range.

drunk

Examples

Arguments

size [number]

Optional

Sets the maximum number produced.

stepsize [number]

Optional

Sets an initial limit on the size of random steps taken.

seed [number]

Optional

Seeds the object's random generator, which causes a specific (reproducible) sequence of pseudo-random numbers to occur. The number 0 uses the time elapsed since system startup (an unpredictable value) as the seed, ensuring an unpredictable sequence of numbers.

Inlets

trigger [bang, number]

bang outputs random step, number sets value

size [number]

Sets the maximum number produced.

stepsize [number]

Sets an initial limit on the size of random steps taken.

Outlets

out [number]

The number sent out the outlet is automatically limited between 0 and the specified maximum value, and differs from the previously stored number by less than the maximum step size.

Fixed Attributes

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

intmode [bool] (default: false)

Casts each output value as an integer instead of a floating point value

skipzero [bool] (default: false)

Skip zero in Integer Mode

Dynamic Attributes

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

seed [number]

Seeds the object's random generator, which causes a specific (reproducible) sequence of pseudo-random numbers to occur. The number 0 uses the time elapsed since system startup (an unpredictable value) as the seed, ensuring an unpredictable sequence of numbers.

size [number]

Sets the maximum number produced.

stepsize [number]

Sets an initial limit on the size of random steps taken.

trigger [bang, number]

bang outputs random step, number sets value

See Also

Name Description
drunk Output random numbers within a step range
random Generate random numbers
urn Generate random numbers without duplicates