|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.softsynth.jsyn.SynthPort
com.softsynth.jsyn.SynthScalarPort
com.softsynth.jsyn.SynthVariable
com.softsynth.jsyn.SynthInput
com.softsynth.jsyn.SynthDistributor
public class SynthDistributor
SynthDistributor class for Java Audio Synthesis A SynthDistributor acts as a single input port that maps to multiple ports inside a SynthCircuit. When building a circuit, connect the SynthDistributor to all of the internal inputs that you want to drive together. You can then set() a value for the SynthDistributor with a single call and it will be passed to all of the connected ports inside the circuit. You can also connect a SynthOutput to it and a connection will automatically be made to all of the connected internal ports. If you did not use a SynthDistributor, then you would need to use an AddUnit to provide the fan-out but this would add run-time overhead to the CPU. The SynthDistributor has no run-time overhead during synthesis.
| Constructor Summary | |
|---|---|
SynthDistributor(java.lang.String name)
Use null sound, and default signal type of Synth.SIGNAL_TYPE_FULL_RANGE |
|
SynthDistributor(java.lang.String name,
int signalType)
Use null sound for distributor that is not part of a circuit. |
|
SynthDistributor(SynthSound sound,
java.lang.String name)
Use default signal type of Synth.SIGNAL_TYPE_FULL_RANGE |
|
SynthDistributor(SynthSound sound,
java.lang.String name,
int signalType)
An example call is: |
|
| Method Summary | |
|---|---|
void |
connect(int partNum,
SynthInput inPort,
int inIndex)
This method is illegal for SynthInput but is legal for a subclass SynthDistributor. |
void |
connect(int inIndex,
SynthOutput outPort,
int outIndex)
Connect output port of another instrument to this input port. |
void |
connect(SynthInput inPort,
int inIndex)
Input port will be connected to any port that is driving this SynthDistributor. |
void |
connect(SynthOutput outPort,
int outIndex)
Connect output port of another instrument to this distributor. |
void |
disconnect()
Disconnects any SynthOutput connected to this distributor. |
void |
disconnect(int index)
Disconnects the connections made to this port. |
void |
disconnect(SynthInput inPort)
|
void |
disconnect(SynthInput inPort,
int inIndex)
Remove record for connection to this port from internal Vector. |
double |
get()
|
double |
get(int partIndex)
|
int |
getNumParts()
Get number of parts in a port. |
int |
getSignalType(int partIndex)
|
void |
set(double value,
int partIndex)
Set value of all connected SynthInputs. |
void |
set(int time,
double value,
int partIndex)
Set value of all connected SynthInputs at specified time. |
void |
setSignalType(int signalType,
int partIndex)
Set signalType of all connected SynthInputs. |
| Methods inherited from class com.softsynth.jsyn.SynthInput |
|---|
connect, connect, multiply |
| Methods inherited from class com.softsynth.jsyn.SynthVariable |
|---|
getCurrent, getCurrent, getMax, getMin, set, set, setAt, setAt, setMax, setMin, setup |
| Methods inherited from class com.softsynth.jsyn.SynthPort |
|---|
getAlias, getName, getSignalType, getSound, setAlias, setSignalType, setSignalType, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SynthDistributor(SynthSound sound,
java.lang.String name,
int signalType)
throws SynthException
frequency = new SynthDistributor( this, "frequency", Synth.SIGNAL_TYPE_OSC_FREQ );
SynthException - If sound or signalType is invalid.
public SynthDistributor(java.lang.String name,
int signalType)
throws SynthException
SynthException - If signalType is invalid.
public SynthDistributor(SynthSound sound,
java.lang.String name)
throws SynthException
SynthException - If sound is invalid.
public SynthDistributor(java.lang.String name)
throws SynthException
SynthException - Unlikely.| Method Detail |
|---|
public void connect(SynthInput inPort,
int inIndex)
throws SynthException
SynthException - If port name is not recognized, or index out of range.
public void connect(int partNum,
SynthInput inPort,
int inIndex)
throws SynthException
SynthInput
connect in class SynthInputSynthException - If used to connect two SynthInputs, or if port is not invalid, or index out of range.
public void connect(SynthOutput outPort,
int outIndex)
throws SynthException
SynthException - If port name is not recognized, or index out of range,
or destPort already connected.
public void connect(int inIndex,
SynthOutput outPort,
int outIndex)
throws SynthException
SynthInput
connect in class SynthInputSynthException - If port name is not recognized, or index out of range.
public void disconnect()
throws SynthException
disconnect in class SynthInputSynthException
public void disconnect(int index)
throws SynthException
SynthInput
disconnect in class SynthInputSynthException - If port name is not recognized, or index out of range.
public void disconnect(SynthInput inPort,
int inIndex)
throws SynthException
SynthException - If port is invalid, or index out of range.
public void disconnect(SynthInput inPort)
throws SynthException
SynthException
public void set(int time,
double value,
int partIndex)
throws SynthException
set in class SynthVariabletime - Time in ticks for setting to occur.value - Floating point value to set port. Must be in units that
correspond to signal type of port.partIndex - Index of part of multi-part port. Typically zero.
SynthException - If port is invalid, or index out of range.
public void set(double value,
int partIndex)
throws SynthException
set in class SynthVariableSynthException - If port is invalid, or index out of range.
public void setSignalType(int signalType,
int partIndex)
throws SynthException
setSignalType in class SynthVariablesignalType - Selects signal type. Legal values are:
SynthException - If port is invalid, or index out of range.
public int getSignalType(int partIndex)
throws SynthException
getSignalType in class SynthPortSynthException - If port is invalid, or index out of range.
public double get(int partIndex)
throws SynthException
get in class SynthVariableSynthException - If port name is not recognized, or index out of range.
public double get()
throws SynthException
get in class SynthScalarPortSynthException - If port name is not recognized, or index out of range.
public int getNumParts()
throws SynthException
getNumParts in class SynthPortSynthException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||