line~
Linear ramp generator
Description
Linear signal-ramp generator. The
object is an alias to , with the attribute set to 'true'.Arguments
value [number]
Sets an initial value for the signal output. The default value is 0.
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. To keep the last received ramp, see the
attribute (or use fade~ object alias).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. To keep the last received ramp, see the
attribute (or use the fade~ object alias).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. 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. To keep the last received ramp, see the
attribute (or use fade~ object alias).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
keepramp [bool] (default: false)
When enabled, the last received ramp time will be kept and used when a single value is received in the left inlet. The
alias to sets the attribute to 'true' by default.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. To keep the last received ramp, see the
attribute (or use the fade~ object alias).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. 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. To keep the last received ramp, see the
attribute (or use fade~ object alias).See Also
Name | Description |
---|---|
line~ | |
line | |
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 |