|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cycling74.msp.MSPBuffer
public class MSPBuffer
Provides static methods that get and set buffer data. created on 9-April-2004
Method Summary | |
---|---|
static int |
getChannels(java.lang.String name)
Gets the number of channels. |
static long |
getFrames(java.lang.String name)
Gets the number of frames (samples) in a buffer. |
static double |
getLength(java.lang.String name)
Gets the length of a buffer in milliseconds. |
static long |
getSize(java.lang.String name)
Gets the size (frames*channels) of a buffer. |
static float[] |
peek(java.lang.String name)
Get the data from an entire buffer with the channels interleaved. |
static float[] |
peek(java.lang.String name,
int channel)
Get an entire channel from a buffer. |
static float |
peek(java.lang.String name,
int channel,
long index)
Get a single value from a buffer. |
static float[] |
peek(java.lang.String name,
int channel,
long start,
long length)
Get a range of values from a buffer. |
static void |
poke(java.lang.String name,
float[] val)
Set all the data in a buffer in interleaved format. |
static void |
poke(java.lang.String name,
int channel,
float[] val)
Set a channels worth of data in a buffer. |
static void |
poke(java.lang.String name,
int channel,
long index,
float val)
Set one data point in a buffer. |
static void |
poke(java.lang.String name,
int channel,
long start,
float[] val)
Set a range of data in a buffer. |
static void |
setFrames(java.lang.String name,
int numchannels,
long size)
Sets the number of frames (samples) in a buffer, and the number of channels. |
static void |
setLength(java.lang.String name,
int numchannels,
double millis)
Sets the length of a buffer in milliseconds, and the number of channels. |
static void |
setSize(java.lang.String name,
int numchannels,
long size)
Sets the size (frames*channels) of a buffer, and the number of channels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getChannels(java.lang.String name)
name
- the name of the buffer
public static void setLength(java.lang.String name, int numchannels, double millis)
name
- the name of the buffernumchannels
- the number of channels for the buffer to havemillis
- the length, in millisecondspublic static double getLength(java.lang.String name)
name
- the name of the buffer
public static long getFrames(java.lang.String name)
name
- the name of the buffer
public static void setFrames(java.lang.String name, int numchannels, long size)
name
- the name of the buffernumchannels
- the number of channels for the buffer to havesize
- the length of the buffer, in framespublic static long getSize(java.lang.String name)
name
- the name of the buffer
public static void setSize(java.lang.String name, int numchannels, long size)
name
- the name of the buffernumchannels
- the number of channels for the buffer to havesize
- the new size of the buffer, in samples, to be distributed
amongst all the channelspublic static float peek(java.lang.String name, int channel, long index)
name
- the name of the bufferchannel
- the channel of interestindex
- the index within the channel to get
public static float[] peek(java.lang.String name, int channel, long start, long length)
name
- the name of the bufferchannel
- the channel of intereststart
- the first index of interestlength
- the number of samples to return
public static float[] peek(java.lang.String name, int channel)
name
- the name of the bufferchannel
- the channel of interest
public static float[] peek(java.lang.String name)
name
- the name of the buffer
public static void poke(java.lang.String name, int channel, long index, float val)
name
- the name of the bufferchannel
- the channel of interestindex
- the index to setval
- the new value at the given channel and indexpublic static void poke(java.lang.String name, int channel, long start, float[] val)
name
- the name of the bufferchannel
- the channel of intereststart
- the first index in the rangeval
- the data to write into the bufferpublic static void poke(java.lang.String name, int channel, float[] val)
name
- the name of the bufferchannel
- the channel of interestval
- the data write into the buffer in the channel of interestpublic static void poke(java.lang.String name, float[] val)
name
- the name of the bufferval
- the data to write into the buffer, with the channels interleaved.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |