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, TRUE| 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, convertHalfLifeToMultiplier, flattenOutputs, generate, generate, getCircuit, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, getSynthesizer, getTopUnit, getUnitGenerator, isEnabled, pullData, setCircuit, setEnabled, setFrameRate, setPort, setSynthesisEngine, start, start, stop, stopequals, 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