com.softsynth.jsyn
Class PitchDetector
java.lang.Object
java.util.Observable
com.softsynth.jsyn.SynthObject
com.softsynth.jsyn.SynthSound
com.softsynth.jsyn.SynthUnit
com.softsynth.jsyn.PitchDetector
public class PitchDetector
- extends SynthUnit
PitchDetector unit.
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.
- Version:
- JSyn Version 005
- Author:
- (C) 1997 Phil Burk, SoftSynth.com, All Rights Reserved
- See Also:
Synth
,
SynthChannelData
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
period
public SynthOutput period
- Period of the waveform in frames.
confidence
public SynthOutput confidence
PitchDetector
public PitchDetector(SynthContext synthContext,
int calculationRate)
throws SynthException
- Throws:
SynthException
PitchDetector
public PitchDetector(SynthContext synthContext)
throws SynthException
- Create a PitchDetector that runs at Synth.RATE_AUDIO.
- Throws:
SynthException
- If out of memory.
PitchDetector
public PitchDetector()
throws SynthException
- Throws:
SynthException