com.softsynth.jsyn.circuits
Class FMOperator
java.lang.Object
java.util.Observable
com.softsynth.jsyn.SynthObject
com.softsynth.jsyn.SynthSound
com.softsynth.jsyn.SynthCircuit
com.softsynth.jsyn.SynthNote
com.softsynth.jsyn.circuits.FMOperator
public class FMOperator
- extends SynthNote
FM Operator
Sine wave oscillator with amplitude envelope and control mixers.
actualFrequency = (frequency * scale) + (input * depth);
actualAmplitude = (frequency * scale * index) + amplitude;
Methods inherited from class com.softsynth.jsyn.SynthSound |
addPort, addPort, findNamedPort, getName, getNumPorts, getPortAt, getPriority, setPriority, setStage, start, start, stop, stop |
Methods inherited from class java.util.Observable |
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
scale
public SynthInput scale
- This controls the modulator:carrier frequency ratio.
It determines the frequency of the harmonics produced.
Generally, rational values like 1.5 or 3.0 produce harmonic partials.
While irrational values like sqrt(2) produce enharmonic values.
depth
public SynthInput depth
- Used to scale the modulating input.
index
public SynthInput index
- Controls the amount of modulation output. Higher numbers produce more complex spectra.
input
public SynthInput input
- Modulating input signal, typically the output of another FMOperator.
actualFrequency
public SynthOutput actualFrequency
envelopePort
public SynthEnvelopeQueue envelopePort
envelope
public SynthEnvelope envelope
FMOperator
public FMOperator()
FMOperator
public FMOperator(SynthContext synthContext)
makeCircuit
public void makeCircuit(SynthContext synthContext)
setEnvelope
public void setEnvelope(SynthEnvelope env)
- Set envelope to control amplitude.
addAllPorts
public void addAllPorts()
setStage
public void setStage(int time,
int stage)
throws SynthException
- Define a behavior for setStage(). This is a flexible way to do something like ON/OFF
control of a circuit.
- Overrides:
setStage
in class SynthSound
- Throws:
SynthException
- If an error occurs.