com.softsynth.jsyn
Class ExponentialLag
java.lang.Object
java.util.Observable
com.softsynth.jsyn.SynthObject
com.softsynth.jsyn.SynthSound
com.softsynth.jsyn.SynthUnit
com.softsynth.jsyn.ExponentialLag
public class ExponentialLag
- extends SynthUnit
Output approaches Input exponentially.
This unit provides a slowly changing value that approaches its Input value exponentially.
The equation is:
Output = Output + Rate*(Input - Output);
The Rate is calculated internally based on the value on the halfLife port.
Rate is generally just slightly less than 1.0.
- Version:
- JSyn Version 005
- Author:
- (C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
- See Also:
Synth
,
SynthUnit
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 |
input
public SynthInput input
- Signal to approach. SIGNAL_TYPE_FULL_RANGE
halfLife
public SynthVariable halfLife
- Controls rate at which to approach input.
The output will go from its current value halfway to its input value in
the time specified using this port. Note: not connectable. SIGNAL_TYPE_HALF_LIFE
current
public SynthVariable current
- Current internal value. This may be tweaked to force the output to a value immediately.
It can be used to generate an inexpensive decaying envelope by setting the Input to 0.0
and then setting Current to 1.0.
output
public SynthOutput output
ExponentialLag
public ExponentialLag(SynthContext synthContext,
int calculationRate)
throws SynthException
- Throws:
SynthException
ExponentialLag
public ExponentialLag(SynthContext synthContext)
throws SynthException
- Create a ExponentialLag that runs at Synth.RATE_AUDIO.
- Throws:
SynthException
- If out of memory.
ExponentialLag
public ExponentialLag()
throws SynthException
- Throws:
SynthException