Linen

object Linen extends ProductReader[Linen]

A linear ASR-type envelope generator UGen.

===Examples===

// repeated trigger
play {
 val gen = Linen.kr(Impulse.kr(2), 0.01, 0.6, 1.0)
 SinOsc.ar(440) * gen * 0.1
}
// play once and end the synth
play {
 val gen = Linen.kr(Impulse.kr(0), 0.01, 0.6, 1.0, doneAction = freeSelf)
 SinOsc.ar(440) * gen * 0.1
}
// play once and sustain
val x = play {
 val gen = Linen.kr("gate".kr(1), 0.01, 0.6, 1.0, doneAction = freeSelf)
 SinOsc.ar(440) * gen * 0.1
}

x.release(4)    // release envelope with given duration
// longer gate to sustain for a given duration
play {
 val gate = Trig.kr(1, dur = 2)
 val gen = Linen.kr(gate, 0.01, 0.6, 1.0, doneAction = freeSelf)
 SinOsc.ar(440) * gen * 0.1
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[Linen]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def kr: Linen
def kr(gate: GE, attack: GE, sustain: GE, release: GE, doneAction: GE): Linen
Value Params
attack

duration (seconds) of the attack segment

doneAction

action to be performed when the envelope reaches its end point.

gate

triggers the envelope and holds it open while greater than zero. A value of less than zero enforces a release with duration -1.0 - gate .

release

duration (seconds) of the release segment

sustain

level of the sustain segment

def read(in: RefMapIn, key: String, arity: Int): Linen