|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.data.Buffer
public class Buffer
A Buffer stores a one-dimensional buffer of floats for use as a wavetable or a window. Buffer does not perform any interpolation in this version, you should just make sure your buffer is high-res enough for what you need. Could add interpolation easily if needed.
BufferFactory
,
Serialized FormField Summary | |
---|---|
float[] |
buf
The buffer data. |
static Buffer |
NOISE
|
static Buffer |
SAW
|
static Buffer |
SINE
|
static Buffer |
SQUARE
|
static java.util.Hashtable<java.lang.String,Buffer> |
staticBufs
A static storage area for common buffers, such as a sine wave. |
static Buffer |
TRIANGLE
|
Constructor Summary | |
---|---|
Buffer(int size)
Instantiates a new buffer. |
Method Summary | |
---|---|
float |
getValueFraction(float fraction)
Returns the value of the buffer at the given fraction along its length (0 = start, 1 = end). |
float |
getValueIndex(int index)
Returns the value of the buffer at a specific index. |
java.lang.String |
toString()
Returns the contents of the buffer as a String over one line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.util.Hashtable<java.lang.String,Buffer> staticBufs
BufferFactory
to keep track of common buffers.
public static final Buffer SINE
public static final Buffer SAW
public static final Buffer SQUARE
public static final Buffer TRIANGLE
public static final Buffer NOISE
public final float[] buf
Constructor Detail |
---|
public Buffer(int size)
size
- the size of the buffer.Method Detail |
---|
public float getValueFraction(float fraction)
fraction
- the point along the buffer to inspect.
public float getValueIndex(int index)
index
- the index to inspect.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |