com.jsyn.instruments
Class WaveShapingVoice

java.lang.Object
  extended by com.jsyn.unitgen.UnitGenerator
      extended by com.jsyn.unitgen.Circuit
          extended by com.jsyn.instruments.WaveShapingVoice
All Implemented Interfaces:
UnitSource, UnitVoice

public class WaveShapingVoice
extends Circuit
implements UnitVoice

Waveshaping oscillator with envelopes.


Field Summary
 UnitInputPort amplitude
           
 UnitInputPort frequency
           
 UnitFunctionPort function
           
 UnitInputPort range
           
 
Fields inherited from class com.jsyn.unitgen.UnitGenerator
FALSE, TRUE
 
Constructor Summary
WaveShapingVoice()
           
 
Method Summary
 SegmentedEnvelope getAmpEnvelope()
           
 UnitOutputPort getOutput()
           
 SegmentedEnvelope getRangeEnvelope()
           
 void noteOff(TimeStamp timeStamp)
           
 void noteOn(TimeStamp timeStamp, double freq, double amp)
           
 void setAmpEnvelope(SegmentedEnvelope ampEnvelope)
          Set envelope that controls the amplitude.
 void setRangeEnvelope(SegmentedEnvelope rangeEnvelope)
          Set envelope that controls the range of the driving oscillator.
 
Methods inherited from class com.jsyn.unitgen.Circuit
add, flattenOutputs, generate, setSynthesisEngine
 
Methods inherited from class com.jsyn.unitgen.UnitGenerator
addPort, convertHalfLifeToMultiplier, generate, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, isEnabled, pullData, setCircuit, setFrameRate, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

range

public UnitInputPort range

frequency

public UnitInputPort frequency

amplitude

public UnitInputPort amplitude

function

public UnitFunctionPort function
Constructor Detail

WaveShapingVoice

public WaveShapingVoice()
Method Detail

getOutput

public UnitOutputPort getOutput()
Specified by:
getOutput in interface UnitSource

getRangeEnvelope

public SegmentedEnvelope getRangeEnvelope()

setRangeEnvelope

public void setRangeEnvelope(SegmentedEnvelope rangeEnvelope)
Set envelope that controls the range of the driving oscillator.


getAmpEnvelope

public SegmentedEnvelope getAmpEnvelope()

setAmpEnvelope

public void setAmpEnvelope(SegmentedEnvelope ampEnvelope)
Set envelope that controls the amplitude.


noteOn

public void noteOn(TimeStamp timeStamp,
                   double freq,
                   double amp)
Specified by:
noteOn in interface UnitVoice

noteOff

public void noteOff(TimeStamp timeStamp)
Specified by:
noteOff in interface UnitVoice