|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttapeutils.impl.zx81.ZX81WaveProcessor
This class provides a processor for wave information that is specific to a ZX81 sound sample.
The timings for waves, groups, and gaps is set it this class, along with the fact that '0' is four waves and '1' is nine waves.
Constructor Summary | |
---|---|
ZX81WaveProcessor(Sample sample,
SampleAnalyzer analyzer,
int minGap,
int maxGap,
BitProcessor processor)
Construct the wave processor, given the sample to be processed, the object controlling analysis, and the bit processor. |
Method Summary | |
---|---|
int |
checkGroupGap(int lastEnd,
int nextStart)
Check the gap between the given groups. |
int |
getActualMaxGroupGap()
Get the actual maximum group gap. |
int |
getActualMaxOneLength()
Get the actual maximum one length. |
int |
getActualMaxZeroLength()
Get the actual maximum zero length. |
int |
getActualMinGroupGap()
Get the actual minimum group gap. |
int |
getActualMinOneLength()
Get the actual minimum one length. |
int |
getActualMinZeroLength()
Get the actual minimum zero length. |
void |
initialize()
Initialize this object ready for processing a sample. |
int |
processWave(int waveStart,
int waveEnd,
int amplitude,
int minLength,
int maxLength,
int currentPos)
Process a wave within the sample. |
void |
setWaveIdentifier(WaveIdentifier identifier)
Set the object to be used to identify waves. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZX81WaveProcessor(Sample sample, SampleAnalyzer analyzer, int minGap, int maxGap, BitProcessor processor)
sample
- The sample.analyzer
- The sample analyzer.minGap
- The minimum gap between bits.maxGap
- The maximum gap between bits.processor
- The bit processor.Method Detail |
public void setWaveIdentifier(WaveIdentifier identifier)
setWaveIdentifier
in interface WaveProcessor
identifier
- The wave identifier.public void initialize()
initialize
in interface WaveProcessor
public int processWave(int waveStart, int waveEnd, int amplitude, int minLength, int maxLength, int currentPos)
processWave
in interface WaveProcessor
waveStart
- The start of the wave.waveEnd
- The end of the wave.amplitude
- The amplitude of the wave.minLength
- The minimum allowed wavelength.maxLength
- The maximum allowed wavelength.currentPos
- The current sample position.
public int checkGroupGap(int lastEnd, int nextStart)
checkGroupGap
in interface WaveProcessor
lastEnd
- The last group end.nextStart
- The next group start.
public int getActualMinGroupGap()
getActualMinGroupGap
in interface WaveProcessor
public int getActualMaxGroupGap()
getActualMaxGroupGap
in interface WaveProcessor
public int getActualMinZeroLength()
getActualMinZeroLength
in interface WaveProcessor
public int getActualMaxZeroLength()
getActualMaxZeroLength
in interface WaveProcessor
public int getActualMinOneLength()
getActualMinOneLength
in interface WaveProcessor
public int getActualMaxOneLength()
getActualMaxOneLength
in interface WaveProcessor
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |