public class UnitInputPort extends UnitBlockPort implements ConnectableInput, SettablePort
Constructor and Description |
---|
UnitInputPort(int numParts,
java.lang.String name) |
UnitInputPort(int numParts,
java.lang.String name,
double defaultValue) |
UnitInputPort(java.lang.String name) |
UnitInputPort(java.lang.String name,
double defaultValue) |
Modifier and Type | Method and Description |
---|---|
void |
connect(ConnectableOutput other) |
void |
connect(int thisPartNum,
UnitOutputPort otherPort,
int otherPartNum)
Connect an input to an output port.
|
void |
connect(int thisPartNum,
UnitOutputPort otherPort,
int otherPartNum,
TimeStamp timeStamp) |
void |
connect(UnitOutputPort otherPort) |
void |
disconnect(ConnectableOutput other) |
void |
disconnect(int thisPartNum,
UnitOutputPort otherPort,
int otherPartNum) |
double |
get(int partNum)
Value of a port based on the set() calls.
|
ConnectableInput |
getConnectablePart(int i) |
double |
getDefault() |
double |
getMaximum() |
double |
getMinimum() |
PortBlockPart |
getPortBlockPart()
This is used internally by PortBlockPart to make a connection between specific parts of a
port.
|
boolean |
isValueAdded() |
protected void |
makeParts(int numParts,
double defaultValue) |
void |
printConnections(java.io.PrintStream out,
int level) |
void |
pullData(long frameCount,
int start,
int limit)
This is used internally by the SynthesisEngine to execute units based on their connections.
|
void |
set(double value) |
void |
set(double value,
double time) |
void |
set(double value,
TimeStamp time) |
void |
set(int partNum,
double value) |
void |
set(int partNum,
double value,
double time) |
void |
set(int partNum,
double value,
TimeStamp timeStamp) |
void |
setDefault(double defaultValue) |
void |
setMaximum(double maximum)
The minimum and maximum are only used when setting up knobs or other control systems.
|
void |
setMinimum(double minimum) |
void |
setup(double minimum,
double value,
double maximum)
Convenience function for setting limits on a port.
|
void |
setup(UnitInputPort other) |
void |
setValueAdded(boolean valueAdded)
If set false then the set() value will be ignored when other ports are connected to this port.
|
protected void |
setValueInternal(int partNum,
double value)
Only for use in the audio thread when implementing UnitGenerators.
|
disconnectAll, disconnectAll, get, getNumParts, getValue, getValue, getValues, getValues, isConnected, isConnected, setValueInternal
getName, getUnitGenerator, queueCommand, scheduleCommand, setName, setUnitGenerator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNumParts, getUnitGenerator, getValue
public UnitInputPort(int numParts, java.lang.String name, double defaultValue)
numParts
- typically 1, use 2 for stereo portsname
- name that may be used in GUIsdefaultValue
- public UnitInputPort(java.lang.String name, double defaultValue)
public UnitInputPort(java.lang.String name)
public UnitInputPort(int numParts, java.lang.String name)
protected void makeParts(int numParts, double defaultValue)
makeParts
in class UnitBlockPort
public void pullData(long frameCount, int start, int limit)
pullData
in interface ConnectableInput
frameCount
- start
- limit
- protected void setValueInternal(int partNum, double value)
UnitBlockPort
setValueInternal
in class UnitBlockPort
public void set(double value)
public void set(int partNum, double value)
public void set(double value, TimeStamp time)
public void set(double value, double time)
public void set(int partNum, double value, double time)
public void set(int partNum, double value, TimeStamp timeStamp)
set
in interface SettablePort
public double get(int partNum)
get
in class UnitBlockPort
partNum
- public double getMaximum()
public void setMaximum(double maximum)
maximum
- public double getMinimum()
public void setMinimum(double minimum)
public double getDefault()
public void setDefault(double defaultValue)
public void setup(double minimum, double value, double maximum)
minimum
- value
- default value, will be clipped to min/maxmaximum
- public void setup(UnitInputPort other)
public boolean isValueAdded()
public void setValueAdded(boolean valueAdded)
valueAdded
- public void connect(int thisPartNum, UnitOutputPort otherPort, int otherPartNum, TimeStamp timeStamp)
public void connect(int thisPartNum, UnitOutputPort otherPort, int otherPartNum)
public void connect(UnitOutputPort otherPort)
public void connect(ConnectableOutput other)
connect
in interface ConnectableInput
public void disconnect(int thisPartNum, UnitOutputPort otherPort, int otherPartNum)
public PortBlockPart getPortBlockPart()
ConnectableInput
getPortBlockPart
in interface ConnectableInput
public ConnectableInput getConnectablePart(int i)
public void disconnect(ConnectableOutput other)
disconnect
in interface ConnectableInput
public void printConnections(java.io.PrintStream out, int level)