com.softsynth.jsyn.circuits
Class FMOperator

java.lang.Object
  extended by java.util.Observable
      extended by com.softsynth.jsyn.SynthObject
          extended by com.softsynth.jsyn.SynthSound
              extended by com.softsynth.jsyn.SynthCircuit
                  extended by com.softsynth.jsyn.SynthNote
                      extended by 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;
 


Field Summary
 SynthOutput actualFrequency
           
 SynthInput depth
          Used to scale the modulating input.
 SynthEnvelope envelope
           
 SynthEnvelopeQueue envelopePort
           
 SynthInput index
          Controls the amount of modulation output.
 SynthInput input
          Modulating input signal, typically the output of another FMOperator.
 SynthInput scale
          This controls the modulator:carrier frequency ratio.
 
Fields inherited from class com.softsynth.jsyn.SynthNote
amplitude, frequency
 
Fields inherited from class com.softsynth.jsyn.SynthCircuit
output
 
Constructor Summary
FMOperator()
           
FMOperator(SynthContext synthContext)
           
 
Method Summary
 void addAllPorts()
           
 void makeCircuit(SynthContext synthContext)
           
 void setEnvelope(SynthEnvelope env)
          Set envelope to control amplitude.
 void setStage(int time, int stage)
          Define a behavior for setStage().
 
Methods inherited from class com.softsynth.jsyn.SynthNote
note, noteOff, noteOn, noteOnFor
 
Methods inherited from class com.softsynth.jsyn.SynthCircuit
add, compile, delete, getPeer, loadByName
 
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 com.softsynth.jsyn.SynthObject
deleteAll, enableDeletionByGarbageCollector, enableTracking, getSynthContext, isTrackingEnabled, toString, track
 
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
 

Field Detail

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
Constructor Detail

FMOperator

public FMOperator()

FMOperator

public FMOperator(SynthContext synthContext)
Method Detail

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.