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
), thegate
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. Ifgate
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.
- Alphabetic
- By Inheritance
- EnvGen
- Serializable
- HasDoneFlag
- HasSideEffect
- SingleOut
- SomeOut
- Lazy
- GE
- UGenSource
- Expander
- Lazy
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
), thegate
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. Ifgate
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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val doneAction: GE
- val envelope: GE
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val gate: GE
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- lazy val hashCode: Int
- Definition Classes
- UGenSource → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val levelBias: GE
- val levelScale: GE
- def makeUGen(_args: Vec[UGenIn]): UGenInLike
- Attributes
- protected
- Definition Classes
- EnvGen → UGenSource
- def makeUGens: UGenInLike
Abstract method which must be implemented by creating the actual
UGen
s during expansion. - final def name: String
- Definition Classes
- UGenSource
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val rate: Rate
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeScale: GE
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated