com.jsyn.unitgen
Class PeriodAnalyzer
java.lang.Object
com.jsyn.unitgen.UnitGenerator
com.jsyn.unitgen.PeriodAnalyzer
public class PeriodAnalyzer
- extends UnitGenerator
PitchDetector unit. UNDER_CONSTRUCTION - DO NOT USE
Analyses an input signal and outputs an estimated period in frames. The
frequency is frameRate/period. The confidence port tells you how accurate the
estimate is. When the confidence is low, you should ignore the period. You
can use a CompareUnit and a LatchUnit to hold values that you are confident
of.
Note that a stable monophonic signal is required for accurate pitch tracking.
Tracking can be improved by passing the signal through a lowPass filter. This
reduces the higher level harmonics which can confuse the detector.
Methods inherited from class com.jsyn.unitgen.UnitGenerator |
addPort, convertHalfLifeToMultiplier, flattenOutputs, generate, getCircuit, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, isEnabled, pullData, setCircuit, setFrameRate, start, stop |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
input
public UnitInputPort input
periodPort
public UnitOutputPort periodPort
confidencePort
public UnitOutputPort confidencePort
PeriodAnalyzer
public PeriodAnalyzer()
setSynthesisEngine
public void setSynthesisEngine(SynthesisEngine synthesisEngine)
- Overrides:
setSynthesisEngine
in class UnitGenerator
- Parameters:
synthesisEngine
- the synthesisEngine to set
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