com.softsynth.jsyn
Class PeakFollower
java.lang.Object
java.util.Observable
com.softsynth.jsyn.SynthObject
com.softsynth.jsyn.SynthSound
com.softsynth.jsyn.SynthUnit
com.softsynth.jsyn.PeakFollower
public class PeakFollower
- extends SynthUnit
Tracks the peaks of an input signal.
This can be used to monitor the overall amplitude of a signal.
The output can be used to drive color organs, vocoders,
VUmeters, etc.
Output drops exponentially when the input drops below the current output level.
The output approaches zero based on the value on the halfLife port.
- Version:
- JSyn Version 013
- 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_RAW_SIGNED
halfLife
public SynthVariable halfLife
- Controls rate at which to approach input.
If the input is zero, then the output will go from its current value halfway to zero in
the time specified using this port. 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 forcing the current value
to a number above zero.
output
public SynthOutput output
PeakFollower
public PeakFollower(SynthContext synthContext,
int calculationRate)
throws SynthException
- Throws:
SynthException
PeakFollower
public PeakFollower(SynthContext synthContext)
throws SynthException
- Create a PeakFollower that runs at Synth.RATE_AUDIO.
- Throws:
SynthException
- If out of memory.
PeakFollower
public PeakFollower()
throws SynthException
- Throws:
SynthException