public abstract class UnitOscillator extends UnitGenerator implements UnitVoice
| Modifier and Type | Field and Description |
|---|---|
UnitInputPort |
amplitude |
static double |
DEFAULT_AMPLITUDE |
static double |
DEFAULT_FREQUENCY |
UnitInputPort |
frequency
Frequency in Hertz.
|
UnitOutputPort |
output |
UnitVariablePort |
phase |
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 |
|---|
UnitOscillator() |
| Modifier and Type | Method and Description |
|---|---|
double |
convertFrequencyToPhaseIncrement(double freq)
Convert a frequency in Hertz to a phaseIncrement in the range -1.0 to +1.0
|
UnitOutputPort |
getOutput() |
void |
noteOff() |
void |
noteOff(TimeStamp timeStamp) |
void |
noteOn(double freq,
double ampl) |
void |
noteOn(double freq,
double ampl,
TimeStamp timeStamp)
Play whatever you consider to be a note on this voice.
|
void |
usePreset(int presetIndex) |
addPort, addPort, autoStop, convertHalfLifeToMultiplier, convertTimeToRate, flattenOutputs, generate, generate, getCircuit, getFramePeriod, getFrameRate, getId, getPortByName, getPorts, getSynthesisEngine, getSynthesizer, getTopUnit, getUnitGenerator, incrementWrapPhase, isEnabled, isStartRequired, printConnections, printConnections, printConnections, pullData, setCircuit, setEnabled, setFrameRate, setPort, setSynthesisEngine, start, start, start, stop, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUnitGenerator, setPortpublic UnitInputPort frequency
public UnitInputPort amplitude
public UnitVariablePort phase
public UnitOutputPort output
public static final double DEFAULT_FREQUENCY
public static final double DEFAULT_AMPLITUDE
public double convertFrequencyToPhaseIncrement(double freq)
public UnitOutputPort getOutput()
getOutput in interface UnitSourcepublic void noteOn(double freq,
double ampl)
public void noteOff()
public void noteOn(double freq,
double ampl,
TimeStamp timeStamp)
UnitVoice