Interface DoubleADSR
- All Superinterfaces:
AbstractClockedSignalSource,AbstractSignalSource,CompilableControlFlow,CompilableDataFlow,Component,DoubleClockedSignalSource,DoubleSignalSource,DoubleSupplier,Process
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface eu.bandm.sig.adlib2.DoubleClockedSignalSource
DoubleClockedSignalSource.AbstractRandomNested classes/interfaces inherited from interface eu.bandm.sig.adlib2.Process
Process.Proxy -
Field Summary
Fields inherited from interface eu.bandm.sig.adlib2.AbstractClockedSignalSource
STREAM_CHARACTERISTICS, STREAM_SIZE -
Method Summary
Modifier and TypeMethodDescriptioncompile()Returns a new signal source that realizes the same behavior as this signal source with specialized code.getOn()static DoubleADSRnewInstance(double attackRate, double decayRate, double sustainLevel, double releaseRate, BooleanSignalSource gate, Optional<ConstantRealtimeContext> context) Methods inherited from interface eu.bandm.sig.adlib2.compile.CompilableDataFlow
compileDataFlowTo, hasDataFlowIOMethods inherited from interface eu.bandm.sig.adlib2.DoubleClockedSignalSource
after, drain, drain, during, spliterator, streamMethods inherited from interface eu.bandm.sig.adlib2.DoubleSignalSource
abs, add, asDouble, asFloat, asInt, ceil, compileDataFlow, compileMainSignalSource, DEBUG, defined, delayed, delayed, divide, equal, floor, getAsDouble, getConstantAsDouble, getValueClass, glidingAverage, glidingStandardDeviation, glidingSum, glidingVariance, greaterOrEqual, greaterThan, guard, hasConstantAsDouble, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, notANumber, positive, power, probe, publishStoredValueVariable, relateWith, sampleAndHold, selectAffine, series, sqrt, stored, subtract, zero, zeroCrossing, zipWithMethods inherited from interface eu.bandm.sig.adlib2.Process
afterEvery, andThen, compileAsMainProcess, compileControlFlow, compileInitialization, every, every, getProcess, hasControlFlowIO, hasInitializationIO, init, setRealtimeContext, step
-
Method Details
-
getOn
BooleanSignalSource getOn() -
getPreState
DoubleADSR.State getPreState() -
getPostState
DoubleADSR.State getPostState() -
compile
DoubleADSR compile()Description copied from interface:DoubleClockedSignalSourceReturns a new signal source that realizes the same behavior as this signal source with specialized code.The resulting object displays the same long-term behavior (reaction with output values to realtime events) as this signal source. Its internal state is undefined phase until initialized properly.
Specialized JVM byte code is generated, and a new class is loaded for the implementation. It can be expected to execute more efficiently than the original after a warm-up phase, subject to the usual conditions of JVM just-in-time compilation. Hence compilation is recommended for components to be used in tight long-running loops, but not for one-off or infrequent computations.
The original and the compiled instance do not share state phase or memory; their life cycles are independent except for shared non-compilable components. For the latter reason, it is recommended not to use both instances concurrently.
- Specified by:
compilein interfaceDoubleClockedSignalSource- Specified by:
compilein interfaceProcess
-
compileOn
Consumer<CompilationContext> compileOn() -
newInstance
static DoubleADSR newInstance(double attackRate, double decayRate, double sustainLevel, double releaseRate, BooleanSignalSource gate, Optional<ConstantRealtimeContext> context)
-