Output random numbers in a moving range
drunk will perform a "drunk" walk by outputting random numbers within a moving specified range.
|maximum-value and step-size
|| The first argument sets an initial value for the maximum number which can be output by drunk. The second argument sets an initial limit on the size of random steps taken by drunk; the absolute value of the step size will always be less than the absolute value of this limit. If a negative value is specified as a step size, steps of size zero are never generated. If there are no typed-in arguments, the maximum value is set to 128 and the step size limit is set to 2 (movement up or down by no more than 1).
|| In left inlet: Causes drunk to take a step of random size up or down from its currently stored value. It updates the stored value and sends it out the outlet.
|| In left inlet: The number replaces the stored value and is sent out the outlet.
|| In middle inlet: The number is stored as the maximum value that can be output by drunk. (Note: If the specified maximum is less than 0 it is set to .)
|| In right inlet: The number limits the step size taken in response to a
in the left inlet. The step (up or down) will always be less than the absolute value of this number. |
|| Converted to
|| In left inlet: The word drunk object's ran\dom generator, which causes a specific (reproducible) sequence of pseudo-random numbers to occur. The number uses the time elapsed since system startup (an unpredictable value) as the seed, ensuring an unpredictable sequence of numbers. This unpredictable seed is used by default when the drunk object is created.
, followed by a number, "seeds" the |
|| In left inlet: The word drunk to that number without triggering output. The stored value is initially set in the center of the total range (1/2 the maximum value).
, followed by a number, sets the stored value of |
Numbers vary aimlessly in small steps taken within the total range