Class: LinearFunction

Environment: Siren
Superclass: Siren.Function
Category: Music-Functions
Indexed variables: objects

Instances of LinearFunction are line-segment functions of one free variable.

Example:
LinearFunction from: #((0 0) (0.1 1) (0.2 0.6) (0.9 0.4) (1 0))

processing

normalize
Normalize the receiver to the range and domain of 0-1, inclusive.

scaleBy: scalePt
Scale the receiver's points by the given scale.

updateRange

accessing

add: anItem
Add the argument to the receiver's point collection.

at: anIndex
Answer the value at the given index in my range--do linear interpolation.

size
Answer the size of the receiver's collection of breakpoints.

MetaClass: LinearFunction class

instance creation

a: att d: dec s: sus r: rel
Answer an ADSR envelope.

default
Answer a default instance of the receiver class - an ADSR shape.

fromLorisData: data size: siz duration: dur
Create a linear envelope from the given Loris linear envelope.

examples

exampleEnvelope
Answer a LinSeg of a typical envelope function.

linearExample
Make a LinSeg and answer a value.

linearViewExample
Make an ADSR-shaped LinSeg and open a view on its form.