com.softsynth.jmsl.jsyn.circuits
Class FMSynthNote

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.jmsl.jsyn.circuits.FMSynthNote
Direct Known Subclasses:
BrassSynthNote

public class FMSynthNote
extends com.softsynth.jsyn.SynthNote

A FM pair SynthNote with envelopes for car amplitude and mod amplitude.
Uses Andrew Gram's FMCircuit
MOD 6/05 added SynthContext to constructor

Author:
Nick Didkovsky, 2/27/2000

Field Summary
 
Fields inherited from class com.softsynth.jsyn.SynthNote
amplitude, frequency
 
Fields inherited from class com.softsynth.jsyn.SynthCircuit
output
 
Constructor Summary
FMSynthNote()
           
FMSynthNote(double numer, double denom, double index)
          Construct a SynthNote that maintains numer/denom Fc:Fm ratio, with specified Modulation index
FMSynthNote(com.softsynth.jsyn.SynthContext synthContext)
           
FMSynthNote(com.softsynth.jsyn.SynthContext synthContext, double numer, double denom, double index)
          Construct a SynthNote that maintains numer/denom Fc:Fm ratio, with specified Modulation index
 
Method Summary
 double getModIndex()
           
static void main(java.lang.String[] args)
           
 void noteOff(int time)
          Bang the circuit to shut down the sound
 void noteOn(int time, double frq, double ampl)
          Bang the circuit to make a sound
 void setEnvelopes(double[] ampEnvData, double[] freqEnvData)
           
 void setModFreq(int time, double freq)
           
 void setModIndex(double index)
           
 void setRatioAndIndex(double numer, double denom, double index)
          Set numer/denom Fc:Fm ratio, and specified Modulation index
 
Methods inherited from class com.softsynth.jsyn.SynthNote
note, 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, 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
 

Constructor Detail

FMSynthNote

public FMSynthNote()

FMSynthNote

public FMSynthNote(com.softsynth.jsyn.SynthContext synthContext)

FMSynthNote

public FMSynthNote(double numer,
                   double denom,
                   double index)
            throws com.softsynth.jsyn.SynthException
Construct a SynthNote that maintains numer/denom Fc:Fm ratio, with specified Modulation index

Throws:
com.softsynth.jsyn.SynthException

FMSynthNote

public FMSynthNote(com.softsynth.jsyn.SynthContext synthContext,
                   double numer,
                   double denom,
                   double index)
            throws com.softsynth.jsyn.SynthException
Construct a SynthNote that maintains numer/denom Fc:Fm ratio, with specified Modulation index

Throws:
com.softsynth.jsyn.SynthException
Method Detail

setRatioAndIndex

public void setRatioAndIndex(double numer,
                             double denom,
                             double index)
Set numer/denom Fc:Fm ratio, and specified Modulation index


setEnvelopes

public void setEnvelopes(double[] ampEnvData,
                         double[] freqEnvData)
                  throws com.softsynth.jsyn.SynthException
Throws:
com.softsynth.jsyn.SynthException

noteOn

public void noteOn(int time,
                   double frq,
                   double ampl)
Bang the circuit to make a sound

Overrides:
noteOn in class com.softsynth.jsyn.SynthNote

noteOff

public void noteOff(int time)
Bang the circuit to shut down the sound

Overrides:
noteOff in class com.softsynth.jsyn.SynthNote

setModFreq

public void setModFreq(int time,
                       double freq)
                throws com.softsynth.jsyn.SynthException
Throws:
com.softsynth.jsyn.SynthException

setModIndex

public void setModIndex(double index)

getModIndex

public double getModIndex()

main

public static void main(java.lang.String[] args)