Interface FloatADSR

All Superinterfaces:
AbstractClockedSignalSource, AbstractSignalSource, CompilableControlFlow, CompilableDataFlow, Component, FloatClockedSignalSource, FloatSignalSource, FloatSupplier, Process

public interface FloatADSR extends FloatClockedSignalSource
  • Method Details

    • getOn

    • getPreState

      FloatADSR.State getPreState()
    • getPostState

      FloatADSR.State getPostState()
    • compile

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

    • newInstance

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