Packages

final case class EnvGen(rate: Rate, envelope: GE, gate: GE = 1, levelScale: GE = 1.0f, levelBias: GE = 0.0f, timeScale: GE = 1.0f, doneAction: GE = doNothing) extends SingleOut with HasSideEffect with HasDoneFlag with Product with Serializable

An envelope generator UGen. It uses a break point description in its envelope input, typically coming from an Env object. The envelope may be re-triggered using the gate input. Upon start and upon re-triggering, the envelope , levelScale , levelBias and timeScale parameters are polled and remain constant for the duration of the envelope.

To construct a manual envelope without the use of the Env class, the format should be as follows:

val env = Seq[GE](startLevel, numSegments, releaseNode, loopNode,
targetLevel1, duration1, curveType1, curvature1,
targetLevel2, duration2, curveType2, curvature2,
...)

Where the curve-type is one of Curve.step.id , Curve.lin.id , Curve.exp.id , etc. The curvature values are only relevant for the parametric curve type. The releaseNode and loopNode parameters are segment indices or the special value -99 indicating that there are no release or loop segments.

Note: The actual minimum duration of a segment is not zero, but one sample step for audio rate and one block for control rate. This may result in asynchronicity when in two envelopes of different number of levels, the envelope times add up to the same total duration. Similarly, when modulating times, the new time is only updated at the end of the current segment; this may lead to asynchronicity of two envelopes with modulated times.

envelope

the description of the envelope break-points. Typically you pass an instance of Env which will then automatically expand to the correct format.

gate

triggers the envelope and holds it open while greater than zero. If the envelope is of fixed duration (e.g. Env.linen , Env.perc ), the gate argument is used as a simple trigger. If it contains a sustained segment (e.g. Env.adsr , Env.asr ), the envelope is held open until the gate becomes 0, at which point is released. If gate is less than zero, a release is enforced with duration -1.0 - gate .

levelScale

amplitude factor with which the nominal envelope is multiplied.

levelBias

amplitude offset which is added to the nominal envelope.

timeScale

time scale factor with which the envelope segment durations are multiplied.

doneAction

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

See also

Env

IEnvGen

Line

XLine

Linen

Decay

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EnvGen
  2. Serializable
  3. HasDoneFlag
  4. HasSideEffect
  5. SingleOut
  6. SomeOut
  7. Lazy
  8. GE
  9. UGenSource
  10. Expander
  11. Lazy
  12. Product
  13. Equals
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EnvGen(rate: Rate, envelope: GE, gate: GE = 1, levelScale: GE = 1.0f, levelBias: GE = 0.0f, timeScale: GE = 1.0f, doneAction: GE = doNothing)

    envelope

    the description of the envelope break-points. Typically you pass an instance of Env which will then automatically expand to the correct format.

    gate

    triggers the envelope and holds it open while greater than zero. If the envelope is of fixed duration (e.g. Env.linen , Env.perc ), the gate argument is used as a simple trigger. If it contains a sustained segment (e.g. Env.adsr , Env.asr ), the envelope is held open until the gate becomes 0, at which point is released. If gate is less than zero, a release is enforced with duration -1.0 - gate .

    levelScale

    amplitude factor with which the nominal envelope is multiplied.

    levelBias

    amplitude offset which is added to the nominal envelope.

    timeScale

    time scale factor with which the envelope segment durations are multiplied.

    doneAction

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. val doneAction: GE
  7. val envelope: GE
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. val gate: GE
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. lazy val hashCode: Int
    Definition Classes
    UGenSource → AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val levelBias: GE
  14. val levelScale: GE
  15. def makeUGen(_args: Vec[UGenIn]): UGenInLike
    Attributes
    protected
    Definition Classes
    EnvGenUGenSource
  16. def makeUGens: UGenInLike

    Abstract method which must be implemented by creating the actual UGens during expansion.

    Abstract method which must be implemented by creating the actual UGens during expansion. This method is at most called once during graph expansion

    returns

    the expanded object (depending on the type parameter U)

    Attributes
    protected
    Definition Classes
    EnvGenExpander
  17. final def name: String
    Definition Classes
    UGenSource
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. val rate: Rate
    Definition Classes
    EnvGenGE
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. val timeScale: GE
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from HasDoneFlag

Inherited from HasSideEffect

Inherited from SingleOut

Inherited from SomeOut

Inherited from GE.Lazy

Inherited from GE

Inherited from UGenSource[UGenInLike]

Inherited from Expander[UGenInLike]

Inherited from Lazy

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped