|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.waveform.EmptyWaveForm
This WaveForm implementaion represents an empty WaveForm that has no data to display
| Constructor Summary | |
|---|---|
EmptyWaveForm()
|
|
| 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 |
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. |
byte |
getMax(int channel)
Get the maximum value at the current read position in the given channel |
byte |
getMin(int channel)
Get the minimum value at the current read position in the given channel |
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 |
setChannel(int channel)
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmptyWaveForm()
| 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.subWaveForm(int, int, int)public int getChannels()
WaveForm
getChannels in interface WaveFormpublic byte[] getData()
WaveForm
getData in interface WaveFormpublic int getDisplayableLength()
WaveForm
getDisplayableLength in interface WaveFormpublic int getIntervallSize()
WaveForm
getIntervallSize in interface WaveFormpublic byte getMax(int channel)
WaveForm
getMax in interface WaveFormchannel - the zero-based index of the channel
public byte getMin(int channel)
WaveForm
getMin in interface WaveFormchannel - the zero-based index of the channel
public int getPosition()
WaveForm
getPosition in interface WaveFormpublic int getRealLength()
WaveForm
getRealLength in interface WaveFormpublic int getRealPosition()
WaveForm
getRealPosition in interface WaveFormpublic double getZoomFactor()
WaveForm
getZoomFactor in interface WaveFormgetRealLength() / (double)getDisplayableLength()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());public void rewind()
WaveForm
rewind in interface WaveFormpublic void setChannel(int channel)
public void setPosition(int pos)
WaveForm
setPosition in interface WaveFormpos - The new read positionpublic void setRealPosition(int pos)
WaveForm
setRealPosition in interface WaveFormpos - The new position in the original sample
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||