com.softsynth.jsyn
Class SynthMixer

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.SynthCircuit
                  extended by com.softsynth.jsyn.SynthMixer

public class SynthMixer
extends SynthCircuit

SynthMixer class for Java Audio Synthesis.

Constructs an NxM array of gain elements using MultiPlyAddUnits. Extra outputs can be created and used for "effect sends".
Connect the output of the mixer to a LineOut to hear the mixed results, or send some output channels to effects processors.

Version:
JSyn Version 007
Author:
(C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
See Also:
Synth, BusReader, MultiplyAddUnit, LineOut

Field Summary
 
Fields inherited from class com.softsynth.jsyn.SynthCircuit
output
 
Constructor Summary
SynthMixer(int numInputs, int numOutputs)
           
SynthMixer(SynthContext synthContext, int numInputs, int numOutputs)
          Construct a mixer with numInputs and numOutputs.
 
Method Summary
 void connectInput(int inputIndex, SynthOutput port, int partNum)
          Connect a SynthOutput port to an input of the mixer.
 void connectOutput(int outputIndex, SynthInput port, int partNum)
          Connect an output of the mixer to a SynthInput port.
 SynthOutput getOutput(int outputIndex)
          Get the output port associated with the given index.
 void setGain(int inputIndex, int outputIndex, double gain)
          Specify the amount of the indexed input that is added to the indexed output.
 void setGain(int time, int inputIndex, int outputIndex, double gain)
          Specify the amount of the indexed input that is added to the indexed output at the specified time.
 
Methods inherited from class com.softsynth.jsyn.SynthCircuit
add, compile, delete, getPeer, loadByName
 
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
deleteAll, enableDeletionByGarbageCollector, enableTracking, 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
 

Constructor Detail

SynthMixer

public SynthMixer(int numInputs,
                  int numOutputs)
           throws SynthException
Throws:
SynthException

SynthMixer

public SynthMixer(SynthContext synthContext,
                  int numInputs,
                  int numOutputs)
           throws SynthException
Construct a mixer with numInputs and numOutputs. The mixer consists of a two-dimensional array of MultiplyAddUnits. The amount that each input contributes to each output can be controlled individually.

Throws:
SynthException - If allocation fails.
Method Detail

connectInput

public void connectInput(int inputIndex,
                         SynthOutput port,
                         int partNum)
                  throws SynthException
Connect a SynthOutput port to an input of the mixer.

Throws:
SynthException - If index or partNum are out of range.

getOutput

public SynthOutput getOutput(int outputIndex)
Get the output port associated with the given index.


connectOutput

public void connectOutput(int outputIndex,
                          SynthInput port,
                          int partNum)
                   throws SynthException
Connect an output of the mixer to a SynthInput port.

Throws:
SynthException - If index or partNum are out of range.

setGain

public void setGain(int inputIndex,
                    int outputIndex,
                    double gain)
             throws SynthException
Specify the amount of the indexed input that is added to the indexed output.

Throws:
SynthException - If index or partNum are out of range.

setGain

public void setGain(int time,
                    int inputIndex,
                    int outputIndex,
                    double gain)
             throws SynthException
Specify the amount of the indexed input that is added to the indexed output at the specified time.

Throws:
SynthException - If index or partNum are out of range.