com.jsyn.unitgen
Class SchmidtTrigger
java.lang.Object
com.jsyn.unitgen.UnitGenerator
com.jsyn.unitgen.UnitFilter
com.jsyn.unitgen.SchmidtTrigger
- All Implemented Interfaces:
- UnitSink, UnitSource
public class SchmidtTrigger
- extends UnitFilter
SchmidtTrigger unit.
Output logic level value with hysteresis. Transition high when input exceeds
setLevel. Only go low when input is below resetLevel. This can be used to
reject low level noise on the input signal.
The default values for setLevel and resetLevel are both 0.0. Setting setLevel
to 0.1 and resetLevel to -0.1 will give some hysteresis.
The outputPulse is a single sample wide pulse set when the output transitions
from low to high.
if( output == 0.0 )
output = (input > setLevel) ? 1.0 : 0.0;
else if( output > 0.0 )
output = (input <= resetLevel) ? 0.0 : 1.0;
else
output = previous_output;
- See Also:
Compare
Method Summary |
void |
generate(int start,
int limit)
Perform essential synthesis function. |
Methods inherited from class com.jsyn.unitgen.UnitGenerator |
addPort, convertHalfLifeToMultiplier, flattenOutputs, generate, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, isEnabled, pullData, setCircuit, setFrameRate, setSynthesisEngine, start, stop |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setLevel
public UnitInputPort setLevel
resetLevel
public UnitInputPort resetLevel
outputPulse
public UnitOutputPort outputPulse
SchmidtTrigger
public SchmidtTrigger()
generate
public void generate(int start,
int limit)
- Description copied from class:
UnitGenerator
- Perform essential synthesis function.
- Specified by:
generate
in class UnitGenerator
- Parameters:
start
- offset into port bufferslimit
- limit offset into port buffers for loop