com.jsyn.unitgen
Class ParabolicEnvelope

java.lang.Object
  extended by com.jsyn.unitgen.UnitGenerator
      extended by com.jsyn.unitgen.ParabolicEnvelope

public class ParabolicEnvelope
extends UnitGenerator

ParabolicEnvelope unit. Output goes from zero to amplitude then back to zero in a parabolic arc.

Generate a short parabolic envelope that could be used for granular synthesis. The output starts at zero, peaks at the value of amplitude then returns to zero. This unit has two states, IDLE and RUNNING. If a trigger is received when IDLE, the envelope is started and another trigger is sent out the triggerOutput port. This triggerOutput can be used to latch values for the synthesis of a grain. If a trigger is received when RUNNING, then it is ignored and passed out the triggerPass port. The triggerPass can be connected to the triggerInput of another ParabolicEnvelope. Thus you can implement a simple grain allocation scheme by daisy chaining the triggers of ParabolicEnvelopes.

The envelope is generated by a double integrator method so it uses relatively little CPU time.

See Also:
EnvelopeDAHDSR

Field Summary
 UnitInputPort amplitude
           
 UnitInputPort frequency
          Fastest repeat rate of envelope if it were continually retriggered in Hertz.
 UnitOutputPort output
           
 UnitInputPort triggerInput
          True value triggers envelope when in resting state.
 UnitOutputPort triggerOutput
          Trigger output when envelope started.
 UnitOutputPort triggerPass
          Input trigger passed out if ignored for daisy chaining.
 
Fields inherited from class com.jsyn.unitgen.UnitGenerator
FALSE, TRUE
 
Constructor Summary
ParabolicEnvelope()
           
 
Method Summary
 void generate(int start, int limit)
          Perform essential synthesis function.
 
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

frequency

public UnitInputPort frequency
Fastest repeat rate of envelope if it were continually retriggered in Hertz.


triggerInput

public UnitInputPort triggerInput
True value triggers envelope when in resting state.


amplitude

public UnitInputPort amplitude

triggerOutput

public UnitOutputPort triggerOutput
Trigger output when envelope started.


triggerPass

public UnitOutputPort triggerPass
Input trigger passed out if ignored for daisy chaining.


output

public UnitOutputPort output
Constructor Detail

ParabolicEnvelope

public ParabolicEnvelope()
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