com.softsynth.jsyn
Class SynthNote
java.lang.Object
java.util.Observable
com.softsynth.jsyn.SynthObject
com.softsynth.jsyn.SynthSound
com.softsynth.jsyn.SynthCircuit
com.softsynth.jsyn.SynthNote
- Direct Known Subclasses:
- AnalogSnare, CrossSVFilter, FilteredSawtoothBL, FMOperator, FMPair, LagAmpNoise, LagFilteredNoise, NoiseModSwoop, ParabolicGrain, PluckedString, RingModBell, Swarm, TunedPluckedString, WaveShapingOscillator
public class SynthNote
- extends SynthCircuit
SynthCircuit that can play "notes" with frequency and amplitude specified.
This class has its own frequency, amplitude and output ports,
So do not declare new ones in your sub-classes.
Please note that SynthNote is an incomplete class that is only intended
for use as a superclass for circuits. It cannot be used by itself directly.
Specifically, it has an "output" port that can be used to connect to other
units. But a bare SynthNote does not define any units and therefore has
a null output port. If you try to connect a SynthNote output to something
it will throw a NullPointerException.
You will need to put some real units in your SynthNote subclass and then do something like this:
addPort( output = osc.output );
- Version:
- JSyn Version 008
- Author:
- (C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
- See Also:
VoiceAllocator
Method Summary |
void |
note(int time,
int duration,
double frequency,
double amplitude)
|
void |
noteOff(int time)
|
void |
noteOn(int time,
double frequency,
double amplitude)
|
void |
noteOnFor(int time,
int duration,
double frequency,
double amplitude)
Calls noteOn then schedules a noteOff at time+duration. |
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 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 |
frequency
public SynthInput frequency
amplitude
public SynthInput amplitude
SynthNote
public SynthNote()
throws SynthException
- Throws:
SynthException
SynthNote
public SynthNote(SynthContext synthContext)
throws SynthException
- Throws:
SynthException
noteOn
public void noteOn(int time,
double frequency,
double amplitude)
noteOff
public void noteOff(int time)
noteOnFor
public void noteOnFor(int time,
int duration,
double frequency,
double amplitude)
- Calls noteOn then schedules a noteOff at time+duration.
note
public void note(int time,
int duration,
double frequency,
double amplitude)