com.softsynth.jsyn
Class SelectUnit

java.lang.Object
  extended by java.util.Observable
      extended by com.softsynth.jsyn.SynthObject
          extended by com.softsynth.jsyn.SynthSound
              extended by com.softsynth.jsyn.SynthUnit
                  extended by com.softsynth.jsyn.SelectUnit

public class SelectUnit
extends SynthUnit

SelectUnit unit.

Select InputA or InputB based on value on Select port.

output = ( select > 0.0 ) ? inputB : inputA;

(Note that this was incorrectly documented in V14.2 and earlier. A and B were switched.)

Version:
JSyn Version 010
Author:
(C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
See Also:
LatchUnit

Field Summary
 SynthInput inputA
           
 SynthInput inputB
           
 SynthOutput output
           
 SynthInput select
           
 
Constructor Summary
SelectUnit()
           
SelectUnit(SynthContext synthContext)
          Create a SynthUnit that runs at Synth.RATE_AUDIO.
SelectUnit(SynthContext synthContext, int calculationRate)
           
 
Method Summary
 
Methods inherited from class com.softsynth.jsyn.SynthSound
addPort, addPort, findNamedPort, getName, getNumPorts, getPortAt, getPriority, setPriority, setStage, setStage, start, start, stop, stop
 
Methods inherited from class com.softsynth.jsyn.SynthObject
delete, deleteAll, enableDeletionByGarbageCollector, enableTracking, getPeer, getSynthContext, isTrackingEnabled, toString, track
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputA

public SynthInput inputA

inputB

public SynthInput inputB

select

public SynthInput select

output

public SynthOutput output
Constructor Detail

SelectUnit

public SelectUnit(SynthContext synthContext,
                  int calculationRate)
           throws SynthException
Throws:
SynthException

SelectUnit

public SelectUnit(SynthContext synthContext)
           throws SynthException
Create a SynthUnit that runs at Synth.RATE_AUDIO.

Throws:
SynthException - If name does not match list of valid units. Note that match is case sensitive.

SelectUnit

public SelectUnit()
           throws SynthException
Throws:
SynthException