com.jsyn.unitgen
Class EnvelopeAttackDecay

java.lang.Object
  extended by com.jsyn.unitgen.UnitGenerator
      extended by com.jsyn.unitgen.UnitFilter
          extended by com.jsyn.unitgen.EnvelopeAttackDecay
All Implemented Interfaces:
UnitSink, UnitSource

public class EnvelopeAttackDecay
extends UnitFilter


Field Summary
 UnitInputPort amplitude
           
 UnitInputPort attack
          Time in seconds for the rising stage of the envelope to go from 0.0 to 1.0.
 UnitInputPort decay
          Time in seconds for the falling stage to go from 0 dB to -96 dB.
 UnitOutputPort output
           
static double THRESHOLD
           
 
Fields inherited from class com.jsyn.unitgen.UnitFilter
input
 
Fields inherited from class com.jsyn.unitgen.UnitGenerator
FALSE, TRUE
 
Constructor Summary
EnvelopeAttackDecay()
           
 
Method Summary
 void generate(int start, int limit)
          Perform essential synthesis function.
 
Methods inherited from class com.jsyn.unitgen.UnitFilter
getInput, getOutput
 
Methods inherited from class com.jsyn.unitgen.UnitGenerator
addPort, convertHalfLifeToMultiplier, flattenOutputs, generate, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, isEnabled, pullData, setCircuit, setFrameRate, setSynthesisEngine, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THRESHOLD

public static final double THRESHOLD
See Also:
Constant Field Values

attack

public UnitInputPort attack
Time in seconds for the rising stage of the envelope to go from 0.0 to 1.0. The attack is a linear ramp.


decay

public UnitInputPort decay
Time in seconds for the falling stage to go from 0 dB to -96 dB. The decay stage will stop at the sustain level. But we calculate the time to fall to -96 dB so that the decay rate will be unaffected by the sustain level.


amplitude

public UnitInputPort amplitude

output

public UnitOutputPort output
Constructor Detail

EnvelopeAttackDecay

public EnvelopeAttackDecay()
Method Detail

generate

public void generate(int start,
                     int limit)
Description copied from class: UnitGenerator
Perform essential synthesis function.

Specified by:
generate in class UnitGenerator
Parameters:
start - offset into port buffers
limit - limit offset into port buffers for loop