Interface DoubleADSR

All Superinterfaces:
AbstractClockedSignalSource, AbstractSignalSource, CompilableControlFlow, CompilableDataFlow, Component, DoubleClockedSignalSource, DoubleSignalSource, DoubleSupplier, Process

public interface DoubleADSR extends DoubleClockedSignalSource
  • Method Details

    • getOn

    • getPreState

      DoubleADSR.State getPreState()
    • getPostState

      DoubleADSR.State getPostState()
    • compile

      DoubleADSR compile()
      Description copied from interface: DoubleClockedSignalSource
      Returns 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:
      compile in interface DoubleClockedSignalSource
      Specified by:
      compile in interface Process
    • compileOn

    • newInstance

      static DoubleADSR newInstance(double attackRate, double decayRate, double sustainLevel, double releaseRate, BooleanSignalSource gate, Optional<ConstantRealtimeContext> context)