|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.waveform.AbstractWaveForm
An abstract superclass for implementation of IWaveForm
| Field Summary | |
|---|---|
protected int |
channels
Total displayable width of this WaveForm |
protected int |
displayWidth
Total displayable width of this WaveForm |
protected int |
intervallSize
The intervall size. |
protected static WaveForm |
nullWave
An empty WaveForm to be reused when needed |
protected int |
position
Total displayable width of this WaveForm |
protected int |
realLength
Total displayable width of this WaveForm |
| Constructor Summary | |
|---|---|
AbstractWaveForm()
|
|
| Method Summary | |
|---|---|
boolean |
canProvide(int begin,
int length,
int width)
Tells if this WaveForm sees itself capable of providing a SubWaveForm with the given parameters |
protected java.lang.String |
getAdditionalToString()
Get an additional String describing this WaveForm. |
int |
getChannels()
Get the number of channels in this WaveForm |
byte[] |
getData()
Get the whole Peak data as array. |
int |
getDisplayableLength()
Get the total displayable length of this WaveForm. |
int |
getIntervallSize()
Get the number of samples of the original Sample which are represented by one step of this WaveForm. |
int |
getPosition()
Get the read position of this WaveForm |
int |
getRealLength()
Get the Length of the original sample which this WaveForm represents |
int |
getRealPosition()
Get the position inside the sample represented by this WaveForm corresponding to the actual read position of this WaveForm. |
double |
getZoomFactor()
Get the ratio between the length of the represented Sample and and the displayable length of this WaveForm. |
boolean |
next()
Tells the WaveForm to increase its position by one |
void |
rewind()
Sets the current read position to the beginning of this WaveForm |
void |
setPosition(int pos)
Set the read position of this WaveForm |
void |
setRealPosition(int pos)
Set the read position of this WaveForm to the value corresponding to the given real position of the represented sample. |
WaveForm |
subWaveForm(int begin,
int length,
int width)
Get a WaveForm Object that represents the part of this WaveForm specified by begin and
length and displays this part in the
specified width |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.groovemanager.sampled.waveform.WaveForm |
|---|
getMax, getMin |
| Field Detail |
|---|
protected int channels
protected int displayWidth
protected int intervallSize
getRealLength() and
getDisplayableLength().
protected static WaveForm nullWave
protected int position
protected int realLength
| Constructor Detail |
|---|
public AbstractWaveForm()
| Method Detail |
|---|
public boolean canProvide(int begin,
int length,
int width)
WaveForm
canProvide in interface WaveFormbegin - The offset to the beginning of this
WaveForm. May also be negative.length - The length in steps of this WaveForm
that should be represented by the returned WaveForm.width - The new width in which the part should
be displayed.
WaveForm.canProvide(int, int, int)protected java.lang.String getAdditionalToString()
toString()
public int getChannels()
WaveForm
getChannels in interface WaveFormWaveForm.getChannels()public byte[] getData()
WaveForm
getData in interface WaveFormWaveForm.getData()public int getDisplayableLength()
WaveForm
getDisplayableLength in interface WaveFormWaveForm.getDisplayableLength()public int getIntervallSize()
WaveForm
getIntervallSize in interface WaveFormWaveForm.getIntervallSize()public int getPosition()
WaveForm
getPosition in interface WaveFormWaveForm.getPosition()public int getRealLength()
WaveForm
getRealLength in interface WaveFormWaveForm.getRealLength()public int getRealPosition()
WaveForm
getRealPosition in interface WaveFormWaveForm.getRealPosition()public double getZoomFactor()
WaveForm
getZoomFactor in interface WaveFormgetRealLength() / (double)getDisplayableLength()WaveForm.getZoomFactor()public boolean next()
WaveForm
next in interface WaveForm
IWaveForm w = ...;
int channel = ...;
w.rewind();
do{
byte min = w.getMin(channel);
byte max = w.getMax(channel);
// ...(do something with those values)
} while(w.next());WaveForm.next()public void rewind()
WaveForm
rewind in interface WaveFormWaveForm.rewind()public void setPosition(int pos)
WaveForm
setPosition in interface WaveFormpos - The new read positionWaveForm.setPosition(int)public void setRealPosition(int pos)
WaveForm
setRealPosition in interface WaveFormpos - The new position in the original sampleWaveForm.setRealPosition(int)
public WaveForm subWaveForm(int begin,
int length,
int width)
WaveFormbegin and
length and displays this part in the
specified width
subWaveForm in interface WaveFormbegin - The offset to the beginning of this
WaveForm. May also be negative.length - The length in steps of this WaveForm
that should be represented by the returned WaveForm.width - The new width in which the part should
be displayed.
WaveForm.subWaveForm(int, int, int)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||