line

From Pdpedia

Jump to: navigation, search
line
{{{example_image}}}
caption
Description: send a series of linearly stepped numbers
Abbreviation:  
Library: vanilla
Author(s): Miller S. Puckette and others
Developer(s):
Release version:
Release date: 2007
Status: active
Dependencies:
License: BSD
Website: http://crca.ucsd.edu/~msp/software.html
Programming Language:
Platform(s): GNU/Linux, Mac OS X, Windows
Language: English
Data type(s): message
Distribution(s): DesireData, PDa, Pd-extended, Pd-vanilla, puredata debian package, pure:dyne



GRAIN RATE

CONTINUOUS RAMPS

-- ramp generator

The "grain rate" of [line] is the rate at which it will output its values. The faster the grain is, the smoother the ramp will appear. While slower grain rates will produce a more disjunct ramp. Of course this setting will alter the amount of CPU that the [line] object will require. Higher rates require more computation.

[line] does not schedule its incoming messages. What this means is that if you send [line] a new target value mid-way through a ramp, a new ramp is immediatly created to the new target value starting from the "current" value.

These objects are offered in Pd only if you have downloaded and properly installed the appropriate library. These objects may or may not exist in a single library.

[line]'s left inlet defines the "target" value. The right inlet defines the "time" value. The "target, time" pair of numbers inform [line] to produce a numeric "ramp" from its current value (whatever that might be at any given moment) to the new value within the alloted time which is defined at the right inlet.

In other words, if [line] receives a message specifying some new target and time before reaching the previous target, it takes off from its current value.

The default grain rate is 20 milliseconds.This means simply that [line] will output a new value between its current value and your new value once every 20 milliseconds. [line]'s optional creation arguments can be used to reset the grain rate. However, the grain rate cannot be reset dynamically.

It is important to realize that [line] stores only the current value...it does not remember the defined "time" (duration of the ramp). Hence, the following works:


While this does NOT work unless you click "500" first.

First creation argument is the initial value: the starting point of the first ramp.

Due to this unique behavior, a common construct found in Pd patches includes the [pack] object as follows:

The second creation argument sets the grain rate. Observe the following two examples to see how the grain rate effects the output.

If [line] receives a new target value without an accompanying "time", it simply jumps to the new value...as in the example above on the right. In the example above on the left, you'll see that [line] will create a numeric ramp from 0 to 1000 over 1000 milliseconds. You should also note that if you click that [bng] again a second time, nothing happens. This is because [line] is already at 1000, so sending it new instructions to ramp to 1000 is meaningless and has no effect.

Having said all of that, let's just reiterate that it's important to send a "time" value to [line] before sending it a new "target" value...unless of course you WANT it to jump immediately to the new target.

[line] will accept a list of two numbers. The first in the list will be assigned as the new target, the second in the list will be the new time (duration of the ramp) as below:

[line] will also accept the "stop" message which effectively halt the current ramp.

ramp up.

ramp down.

jumps to this value immediately.

stops the current ramp.

More information about [line] can be found in the Pure Documentation folder doc/3.audio.examples.

[line] will accept a list of two numbers. The first in the list will be assigned as the new target, the second in the list will be the new time (duration of the ramp) as below:


Contents

[edit] Inlets

[edit] Outlets

[edit] Arguments

[edit] Messages

Personal tools