line Reference

Linear event ramp generator

line

Examples

Arguments

initial [number]

Optional

Sets an initial value for the signal output. The default value is 0.

grain [number]

Optional

Sets an initial value for the grain: the time interval at which numbers are sent out. If the grain is not specified, line outputs a number every 20 milliseconds.

Inlets

target [list]

In left inlet: The first number specifies a target value and the second number specifies the ramp time (in milliseconds) in which line should reach the target value. In the specified amount of time, line generates a ramp signal from its current value to the target value.

The line object accepts target-time pairs in a list, to generate compound ramps. (An example would be 0 1000 1 1000, which would go from the current value to 0 in a second, then to 1 in a second.) Once one of the ramps has reached its target value, the next one starts. A subsequent list, float, or int in the left inlet clears all ramps yet to be generated.

A list consisting of a number, followed by a value of '0' will set an initial value for the ramp. An example would be 4.5 0 1 1000 which would set an initial value of 0, a new value of 1, and a target time of 1000 ms.

time [number]

Ramp time is the total amount of time (in milliseconds) in which line should reach the target value. This value is only used when a single value is input to the leftmost target inlet. Once a ramp has been completed, this value is set to 0 and must be set again.

grain [number]

Sets an initial value for the grain: the time interval at which numbers are sent out. If the grain is not specified, line outputs a number every 20 milliseconds.

Outlets

output [number]

The current destination value, or a ramp moving toward the destination value according to the currently stored value and the ramp time.

end [bang]

  • A bang is sent out the right outlet when line has finished generating all its ramps.

Fixed Attributes

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

initial [number] (default: 0)

Sets an initial value for the signal output. The default value is 0.

Dynamic Attributes

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

grain [number]

Sets an initial value for the grain: the time interval at which numbers are sent out. If the grain is not specified, line outputs a number every 20 milliseconds.

pause [bang]

Pauses the internal ramp but does not change the target value nor clear pending target-time pairs. line will continue outputting whatever value was its current value when the pause message was received, until either it receives a resume message or until a new ramp is input.

resume [bang]

Resumes the internal ramp and subsequent pending target-time pairs if the line object was paused.

set [number]

Sets the starting value of the next ramp without output.

stop [bang]

Stops line from sending out numbers, until a new target value is received.

target [list]

In left inlet: The first number specifies a target value and the second number specifies the ramp time (in milliseconds) in which line should reach the target value. In the specified amount of time, line generates a ramp signal from its current value to the target value.

The line object accepts target-time pairs in a list, to generate compound ramps. (An example would be 0 1000 1 1000, which would go from the current value to 0 in a second, then to 1 in a second.) Once one of the ramps has reached its target value, the next one starts. A subsequent list, float, or int in the left inlet clears all ramps yet to be generated.

A list consisting of a number, followed by a value of '0' will set an initial value for the ramp. An example would be 4.5 0 1 1000 which would set an initial value of 0, a new value of 1, and a target time of 1000 ms.

time [number]

Ramp time is the total amount of time (in milliseconds) in which line should reach the target value. This value is only used when a single value is input to the leftmost target inlet. Once a ramp has been completed, this value is set to 0 and must be set again.

See Also

Name Description
line~ Linear signal ramp generator
line Generate timed ramp
line~ Linear ramp generator
uzi send many bang messages