public class PolyphonicInstrument extends Circuit implements UnitSource, Instrument
Modifier and Type | Field and Description |
---|---|
UnitInputPort |
amplitude |
FALSE, PORT_NAME_AMPLITUDE, PORT_NAME_CUTOFF, PORT_NAME_FREQUENCY, PORT_NAME_FREQUENCY_SCALER, PORT_NAME_INPUT, PORT_NAME_OUTPUT, PORT_NAME_PAN, PORT_NAME_PHASE, PORT_NAME_PRESSURE, PORT_NAME_TIMBRE, PORT_NAME_TIME, synthesisEngine, TRUE, VERY_SMALL_FLOAT
Constructor and Description |
---|
PolyphonicInstrument(UnitVoice[] voices) |
Modifier and Type | Method and Description |
---|---|
void |
allNotesOff(TimeStamp timeStamp) |
void |
exportAllInputPorts()
Connect a PassThrough unit to the input ports of the voices so that they can be controlled
together using a single port.
|
void |
exportNamedInputPort(java.lang.String portName)
Create a UnitInputPort for the circuit that is connected to the named port on each voice
through a PassThrough unit.
|
UnitOutputPort |
getOutput() |
boolean |
isOn(int tag) |
void |
noteOff(int tag,
TimeStamp timeStamp) |
void |
noteOn(int tag,
double frequency,
double amplitude,
TimeStamp timeStamp) |
void |
setPort(int tag,
java.lang.String portName,
double value,
TimeStamp timeStamp) |
void |
usePreset(int presetIndex) |
void |
usePreset(int presetIndex,
TimeStamp timeStamp) |
add, addPortAlias, flattenOutputs, generate, getPortByName, setEnabled, setFrameRate, setSynthesisEngine
addPort, addPort, autoStop, convertHalfLifeToMultiplier, convertTimeToRate, generate, getCircuit, getFramePeriod, getFrameRate, getId, getPorts, getSynthesisEngine, getSynthesizer, getTopUnit, getUnitGenerator, incrementWrapPhase, isEnabled, isStartRequired, printConnections, printConnections, printConnections, pullData, setCircuit, setPort, start, start, start, stop, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUnitGenerator
public UnitInputPort amplitude
public PolyphonicInstrument(UnitVoice[] voices)
public void exportAllInputPorts()
public void exportNamedInputPort(java.lang.String portName)
portName
- exportAllInputPorts
public UnitOutputPort getOutput()
getOutput
in interface UnitSource
public void usePreset(int presetIndex, TimeStamp timeStamp)
usePreset
in interface Instrument
public void noteOn(int tag, double frequency, double amplitude, TimeStamp timeStamp)
noteOn
in interface Instrument
public void noteOff(int tag, TimeStamp timeStamp)
noteOff
in interface Instrument
public void setPort(int tag, java.lang.String portName, double value, TimeStamp timeStamp)
setPort
in interface Instrument
public void allNotesOff(TimeStamp timeStamp)
allNotesOff
in interface Instrument
public boolean isOn(int tag)