|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttapeutils.impl.SineWaveIdentifier
This class provides an identifier for sine waves within a sampled sound.
Constructor Summary | |
---|---|
SineWaveIdentifier(Sample sample,
SampleAnalyzer analyzer,
int noiseThreshold,
int maxWaveLength,
WaveProcessor processor)
Construct the processor from a sample. |
Method Summary | |
---|---|
void |
cleanUp()
Clean up the state of the wave identifier. |
void |
completeProcessing()
Complete processing of the last wave, if necessary. |
int |
getActualMaxWaveLength()
Get the actual maximum wave width. |
int |
getActualMinWaveLength()
Get the actual minimum wave width. |
int |
getAverageWaveLength()
Get the actual average wave width. |
int |
getFitValue(int index)
Get the fit value at the given position in the sample. |
int |
getNoiseThreshold()
Get the noise threshold. |
int |
getWaveValue(int index)
Get the wave value at the given position in the sample. |
int |
identifyNextWave(int pos,
int sampleValue)
Identify the next wave in the sample. |
void |
initialize()
Initialize this object ready for processing a sample. |
boolean |
processingDropOut()
Return an indicator of whether we are currently processing a drop out of the signal. |
void |
startProcessingDropOut(int restoreIndex)
Start processing a drop-out in the signal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SineWaveIdentifier(Sample sample, SampleAnalyzer analyzer, int noiseThreshold, int maxWaveLength, WaveProcessor processor)
sample
- The sample.analyzer
- The sample analyzer.noiseThreshold
- The noise threshold for processing.maxWaveLength
- The maximum wave length.processor
- The wave processor.Method Detail |
public void initialize()
initialize
in interface WaveIdentifier
public int identifyNextWave(int pos, int sampleValue)
identifyNextWave
in interface WaveIdentifier
pos
- The current position in the sample.sampleValue
- The current sample value.
public void completeProcessing()
completeProcessing
in interface WaveIdentifier
public boolean processingDropOut()
processingDropOut
in interface WaveIdentifier
public void startProcessingDropOut(int restoreIndex)
startProcessingDropOut
in interface WaveIdentifier
restoreIndex
- The index of the sample to restore normal processing.public int getActualMinWaveLength()
getActualMinWaveLength
in interface WaveIdentifier
public int getActualMaxWaveLength()
getActualMaxWaveLength
in interface WaveIdentifier
public int getAverageWaveLength()
getAverageWaveLength
in interface WaveIdentifier
public int getNoiseThreshold()
getNoiseThreshold
in interface WaveIdentifier
public int getWaveValue(int index)
getWaveValue
in interface WaveIdentifier
index
- The index of the sample.
public int getFitValue(int index)
getFitValue
in interface WaveIdentifier
index
- The index of the sample.
public void cleanUp()
cleanUp
in interface WaveIdentifier
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |