line~ Reference

Linear ramp generator

line~

Examples

Arguments

value [number]

Optional

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

time [number]

Optional

Ramp time is the total amount of time (in milliseconds) in which line~ should reach the target value

Inlets

segments [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 up to 128 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' and up to 128 target-time pairs, 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

Outlets

out [signal]

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

target [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.

value [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

segments [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 up to 128 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' and up to 128 target-time pairs, 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

See Also

Name Description
line~ Linear signal ramp generator
line Generate timed ramp
adsr~ Attack-Decay-Sustain-Release envelope generator
click~ Sample accurate click.
curve~ Exponential ramp generator
click~ Sample accurate click.
line Linear event ramp generator
transport transport