|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.sciss.jcollider.Buffer
public class Buffer
Mimics SCLang's Buffer class, that is, it's a client side representation of an audio buffer
| Nested Class Summary | |
|---|---|
static interface |
Buffer.CompletionAction
Interface describing an action to take place after an asynchronous buffer command is completed. |
static interface |
Buffer.CompletionFunction
Interface describing an function that creates an OSC message used as a completion message in asynchronous buffer commands. |
| Field Summary |
|---|
| Fields inherited from interface de.sciss.jcollider.Constants |
|---|
kAddAfter, kAddBefore, kAddReplace, kAddToHead, kAddToTail, kAudioRate, kControlRate, kDemandRate, kDoneFree, kDoneFreeAll, kDoneFreeAllPred, kDoneFreeAllSucc, kDoneFreeGroup, kDoneFreePausePred, kDoneFreePauseSucc, kDoneFreePred, kDoneFreePredGroup, kDoneFreePredGroupDeep, kDoneFreeSucc, kDoneFreeSuccGroup, kDoneFreeSuccGroupDeep, kDoneNothing, kDonePause, kDumpBoth, kDumpHex, kDumpOff, kDumpText, kHeaderAIFF, kHeaderIRCAM, kHeaderNeXT, kHeaderRaw, kHeaderWAVE, kSampleALaw, kSampleDouble, kSampleFloat, kSampleInt16, kSampleInt24, kSampleInt32, kSampleInt8, kSampleMuLaw, kScalarRate |
| Constructor Summary | |
|---|---|
Buffer(Server server,
int numFrames,
int numChannels)
Creates a new Buffer with given number of frames and channels. |
|
Buffer(Server server,
int numFrames,
int numChannels,
int bufNum)
Creates a new Buffer with given number of frames and channels. |
|
| Method Summary | |
|---|---|
void |
alloc()
Allocates the buffer created with the basic new constructor. |
void |
alloc(de.sciss.net.OSCMessage completionMsg)
Allocates the buffer created with the basic new constructor. |
static Buffer |
alloc(Server server,
int numFrames)
Allocates and returns a new mono Buffer with given number of frames. |
static Buffer |
alloc(Server server,
int numFrames,
int numChannels)
Allocates and returns a new Buffer with given number of channels and frames. |
static Buffer |
alloc(Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc)
Allocates and returns a new Buffer with given number of channels and frames. |
static Buffer |
alloc(Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc,
int bufNum)
Allocates and returns a new Buffer with given number of channels and frames. |
static Buffer[] |
allocConsecutive(int numBufs,
Server server,
int numFrames)
Allocates and returns an array of neighbouring single channel Buffer objects
with given number of frames. |
static Buffer[] |
allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels)
Allocates and returns an array of neighbouring Buffer objects with given number
of channels and frames. |
static Buffer[] |
allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc)
Allocates and returns an array of neighbouring Buffer objects with given number
of channels and frames. |
static Buffer[] |
allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc,
int bufNum)
Allocates and returns an array of neighbouring Buffer objects with given number
of channels and frames. |
de.sciss.net.OSCMessage |
allocMsg()
Creates an OSC /b_alloc message to allocate the buffer created with the basic new constructor. |
de.sciss.net.OSCMessage |
allocMsg(de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_alloc message to allocate the buffer created with the basic new constructor. |
void |
allocRead(java.lang.String path)
Allocates the buffer created with the basic new constructor,
by reading in a sound file. |
void |
allocRead(java.lang.String path,
long startFrame)
Allocates the buffer created with the basic new constructor,
by reading in a sound file. |
void |
allocRead(java.lang.String path,
long startFrame,
int numFrames)
Allocates the buffer created with the basic new constructor,
by reading in a sound file. |
void |
allocRead(java.lang.String path,
long startFrame,
int numFrames,
de.sciss.net.OSCMessage completionMsg)
Allocates the buffer created with the basic new constructor,
by reading in a sound file. |
void |
allocReadChannel(java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
Allocates the buffer created with the basic new constructor,
by reading in selected channels of a sound file. |
void |
allocReadChannel(java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
Allocates the buffer created with the basic new constructor,
by reading in selected channels of a sound file. |
de.sciss.net.OSCMessage |
allocReadChannelMsg(java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
Creates an OSC /b_allocReadChannel message to allocate the buffer created with the basic new constructor,
by reading in selected channels from a sound file. |
de.sciss.net.OSCMessage |
allocReadChannelMsg(java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_allocReadChannel message to allocate the buffer created with the basic new constructor,
by reading in selected channels from a sound file. |
de.sciss.net.OSCMessage |
allocReadMsg(java.lang.String path)
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file. |
de.sciss.net.OSCMessage |
allocReadMsg(java.lang.String path,
long startFrame)
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file. |
de.sciss.net.OSCMessage |
allocReadMsg(java.lang.String path,
long startFrame,
int numFrames)
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file. |
de.sciss.net.OSCMessage |
allocReadMsg(java.lang.String path,
long startFrame,
int numFrames,
de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file. |
void |
close()
|
void |
close(de.sciss.net.OSCMessage completionMsg)
|
de.sciss.net.OSCMessage |
closeMsg()
|
de.sciss.net.OSCMessage |
closeMsg(de.sciss.net.OSCMessage completionMsg)
|
static Buffer |
cueSoundFile(Server server,
java.lang.String path)
|
static Buffer |
cueSoundFile(Server server,
java.lang.String path,
long startFrame)
|
static Buffer |
cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels)
|
static Buffer |
cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels,
int bufferSize)
|
static Buffer |
cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels,
int bufferSize,
Buffer.CompletionFunction completionFunc)
|
void |
cueSoundFile(java.lang.String path)
|
void |
cueSoundFile(java.lang.String path,
long startFrame)
|
void |
cueSoundFile(java.lang.String path,
long startFrame,
de.sciss.net.OSCMessage completionMsg)
|
de.sciss.net.OSCMessage |
cueSoundFileMsg(java.lang.String path,
long startFrame,
de.sciss.net.OSCMessage completionMsg)
|
void |
fill(int[] startAt,
int[] numSamples,
float[] value)
|
void |
fill(int startAt,
int numSamples,
float value)
|
de.sciss.net.OSCMessage |
fillMsg(int[] startAt,
int[] numSamples,
float[] value)
|
de.sciss.net.OSCMessage |
fillMsg(int startAt,
int numSamples,
float value)
|
void |
free()
|
void |
free(de.sciss.net.OSCMessage completionMsg)
|
static void |
freeAll(Server server)
Frees all known buffers on a server. |
de.sciss.net.OSCMessage |
freeMsg()
|
de.sciss.net.OSCMessage |
freeMsg(de.sciss.net.OSCMessage completionMsg)
|
int |
getBufNum()
Queries the buffer's index. |
double |
getDuration()
Queries the buffer's duration in seconds. |
int |
getNumChannels()
Queries the buffer's number of channels. |
int |
getNumFrames()
Queries the buffer data's number of frames (samples per channel). |
java.lang.String |
getPath()
Queries the buffer's sound file path. |
double |
getSampleRate()
Queries the buffer data's sample rate. |
Server |
getServer()
Queries the server at which the buffer resides |
Synth |
play()
Plays the buffer contents (oneshot) beginning on the first audio output. |
Synth |
play(boolean loop)
Plays the buffer contents beginning on the first audio output. |
Synth |
play(boolean loop,
float amp)
Plays the buffer contents beginning on the first audio output. |
Synth |
play(boolean loop,
float amp,
int outBus)
Plays the buffer contents. |
Synth |
play(boolean loop,
float amp,
int outBus,
float fadeTime)
Plays the buffer contents. |
Synth |
play(boolean loop,
float amp,
int outBus,
float fadeTime,
Node target,
int addAction)
Plays the buffer contents. |
void |
printOn(java.io.PrintStream stream)
|
void |
query()
A debugging method for querying the current buffer parameters and printing them into the console. |
protected void |
queryDone()
Called from Server when b_info is received. |
de.sciss.net.OSCMessage |
queryMsg()
Constructs an OSC message /b_query for querying the
buffer's parameters. |
static Buffer |
read(Server server,
java.lang.String path)
Reads a whole file into memory for PlayBuf etc. |
static Buffer |
read(Server server,
java.lang.String path,
long startFrame)
Reads a whole file into memory for PlayBuf etc., starting at a given frame. |
static Buffer |
read(Server server,
java.lang.String path,
long startFrame,
int numFrames)
Reads a section of a file into memory for PlayBuf etc. |
static Buffer |
read(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionAction action)
Reads a section of a file into memory for PlayBuf etc. |
static Buffer |
read(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionAction action,
int bufNum)
Reads a section of a file into memory for PlayBuf etc. |
void |
read(java.lang.String path)
Reads in as many frames from a sound file as fit into the buffer, starting at the beginning of the file. |
void |
read(java.lang.String path,
long fileStartFrame)
Reads in as many frames from a sound file as fit into the buffer, starting at a given frame in the file. |
void |
read(java.lang.String path,
long fileStartFrame,
int numFrames)
Reads in frames from a sound file into the buffer. |
void |
read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
void |
read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
void |
read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
Buffer.CompletionAction action)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
static Buffer |
readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
Reads a section of a given set of channels from a file into memory for PlayBuf etc. |
static Buffer |
readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
Buffer.CompletionAction action)
Reads a section of a given set of channels from a file into memory for PlayBuf etc. |
static Buffer |
readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
Buffer.CompletionAction action,
int bufNum)
Reads a section of a given set of channels from a file into memory for PlayBuf etc. |
void |
readChannel(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels,
Buffer.CompletionAction action)
Reads in frames from selected channels of a sound file into the buffer, beginning a given offset in the buffer. |
de.sciss.net.OSCMessage |
readChannelMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels)
Creates an OSC /b_read message to read in frames from selected channels of
a sound file into the buffer, beginning a
given offset in the buffer. |
de.sciss.net.OSCMessage |
readChannelMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_read message to read in frames from selected channels of
a sound file into the buffer, beginning a
given offset in the buffer. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path)
Creates an OSC /b_read message to read in as many frames from a sound file as fit into the buffer,
starting at the beginning of the file,
closing the file after reading. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path,
long fileStartFrame)
Creates an OSC /b_read message to read in as many frames from a sound file as fit into the buffer,
starting at a given frame in the file,
closing the file after reading. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path,
long fileStartFrame,
int numFrames)
Creates an OSC /b_read message to read in frames from a sound file into the buffer,
closing the file after reading. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
Creates an OSC /b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer, closing the file after reading. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Creates an OSC /b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer. |
de.sciss.net.OSCMessage |
readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer. |
static Buffer |
readNoUpdate(Server server,
java.lang.String path)
Reads a whole file into memory for PlayBuf etc. |
static Buffer |
readNoUpdate(Server server,
java.lang.String path,
long startFrame)
Reads a whole file into memory for PlayBuf etc. |
static Buffer |
readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames)
Reads a section of a file into memory for PlayBuf etc. |
static Buffer |
readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionFunction completionFunc)
Reads a section of a file into memory for PlayBuf etc. |
static Buffer |
readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionFunction completionFunc,
int bufNum)
Reads a section of a file into memory for PlayBuf etc. |
void |
readNoUpdate(java.lang.String path)
Reads in as many frames from a sound file as fit into the buffer, starting at the beginning of the file. |
void |
readNoUpdate(java.lang.String path,
long fileStartFrame)
Reads in as many frames from a sound file as fit into the buffer, starting at a given frame in the file. |
void |
readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames)
Reads in frames from a sound file into the buffer. |
void |
readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
void |
readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
void |
readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. |
protected void |
setNumChannels(int numChannels)
|
protected void |
setNumFrames(int numFrames)
|
protected void |
setSampleRate(double sampleRate)
|
java.lang.String |
toString()
|
void |
updateInfo(Buffer.CompletionAction action)
Asynchronously updates the buffer parameters (such as number of frames or sample rate). |
void |
write(java.lang.String path)
Writes the buffer contents to a sound file, using AIFF integer 24 bit format. |
void |
write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat)
Writes the buffer contents to a sound file. |
void |
write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames)
Writes the buffer contents to a sound file. |
void |
write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame)
Writes a section of the buffer to a sound file. |
void |
write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Writes a section of the buffer to a sound file. |
void |
write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
Writes a section of the buffer to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path)
Creates an OSC /b_write message to write the buffer contents to a sound file, using AIFF integer 24 bit format. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat)
Creates an OSC /b_write message to write the buffer contents to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames)
Creates an OSC /b_write message to write the buffer contents to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame)
Creates an OSC /b_write message to write a section of the buffer to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Creates an OSC /b_write message to write a section of the buffer to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
Creates an OSC /b_write message to write a section of the buffer to a sound file. |
void |
zero()
|
void |
zero(de.sciss.net.OSCMessage completionMsg)
|
de.sciss.net.OSCMessage |
zeroMsg()
|
de.sciss.net.OSCMessage |
zeroMsg(de.sciss.net.OSCMessage completionMsg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Buffer(Server server,
int numFrames,
int numChannels)
allocMsg to the server.
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiesalloc()bufNum of the
returned Buffer instance is -1. The caller
is responsible for dealing with this possible failure.
public Buffer(Server server,
int numFrames,
int numChannels,
int bufNum)
allocMsg to the server.
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiesbufNum - the index of the buffer| Method Detail |
|---|
public Server getServer()
Serverpublic double getSampleRate()
protected void setSampleRate(double sampleRate)
public int getBufNum()
public int getNumFrames()
protected void setNumFrames(int numFrames)
public int getNumChannels()
protected void setNumChannels(int numChannels)
public java.lang.String getPath()
nullpublic double getDuration()
public java.lang.String toString()
toString in class java.lang.Object
public static Buffer alloc(Server server,
int numFrames)
throws java.io.IOException
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupies
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer alloc(Server server,
int numFrames,
int numChannels)
throws java.io.IOException
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupies
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer alloc(Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc)
throws java.io.IOException
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiescompletionFunc - a function that returns an OSCMessage which is processed by the server
when the reading is complete. can be null.
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer alloc(Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc,
int bufNum)
throws java.io.IOException
server - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiescompletionFunc - a function that returns an OSCMessage which is processed by the server
when the reading is complete. can be null.bufNum - the index by which the buffer is known on the server
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer[] allocConsecutive(int numBufs,
Server server,
int numFrames)
throws java.io.IOException
Buffer objects
with given number of frames. Neighbouring means, that
buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.
numBufs - the number of buffers to allocateserver - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupies
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer[] allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels)
throws java.io.IOException
Buffer objects with given number
of channels and frames. Neighbouring means, that
buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.
numBufs - the number of buffers to allocateserver - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupies
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer[] allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc)
throws java.io.IOException
Buffer objects with given number
of channels and frames. Neighbouring means, that
buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.
numBufs - the number of buffers to allocateserver - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiescompletionFunc - a function that returns an OSCMessage which is processed by the server
when the reading is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer[] allocConsecutive(int numBufs,
Server server,
int numFrames,
int numChannels,
Buffer.CompletionFunction completionFunc,
int bufNum)
throws java.io.IOException
Buffer objects with given number
of channels and frames. This uses an explicitly provided buffer index and not the server's
allocator. The first element of the returned array has a buffer index equal to the provided
bufNum, the next element has a buffer index of bufNum + 1,
the next element an index of bufNum + 2 etc.
numBufs - the number of buffers to allocateserver - the server to which the buffer belongsnumFrames - the number of frames (samples per channel) that buffer occupiesnumChannels - the number of channels the buffer occupiescompletionFunc - a function that returns an OSCMessage which is processed by the server
when the reading is complete. can be null.bufNum - the index by which the first buffer is known on the server.
the consecutive buffers have indices of bufNum + (1...numBufs-1)
java.io.IOException - if an error occurs while sending the OSC message
public void alloc()
throws java.io.IOException
new constructor.
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void alloc(de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
new constructor.
completionMsg - an OSCMessage which is processed by the server
when the allocation is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )
public de.sciss.net.OSCMessage allocMsg()
throws java.io.IOException
/b_alloc message to allocate the buffer created with the basic new constructor.
java.io.IOExceptionBuffer( Server, int, int )
public de.sciss.net.OSCMessage allocMsg(de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
/b_alloc message to allocate the buffer created with the basic new constructor.
completionMsg - an OSCMessage which is processed by the server
when the allocation is complete. can be null.
java.io.IOExceptionBuffer( Server, int, int )
public void allocRead(java.lang.String path)
throws java.io.IOException
new constructor,
by reading in a sound file.
path - the path to the sound file
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void allocRead(java.lang.String path,
long startFrame)
throws java.io.IOException
new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound file
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public void allocRead(java.lang.String path,
long startFrame,
int numFrames)
throws java.io.IOException
new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the buffer
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public void allocRead(java.lang.String path,
long startFrame,
int numFrames,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the buffercompletionMsg - an OSCMessage which is processed by the server
when the allocation and reading is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC messageBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public void allocReadChannel(java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
throws java.io.IOException
new constructor,
by reading in selected channels of a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public void allocReadChannel(java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
new constructor,
by reading in selected channels of a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)completionMsg - an OSCMessage which is processed by the server
when the allocation and reading is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path)
throws java.io.IOException
/b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file.
path - the path to the sound file
java.io.IOExceptionBuffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
long startFrame)
throws java.io.IOException
/b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound file
java.io.IOExceptionBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
long startFrame,
int numFrames)
throws java.io.IOException
/b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the buffer
java.io.IOExceptionBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
long startFrame,
int numFrames,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
/b_allocRead message to allocate the buffer created with the basic new constructor,
by reading in a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the buffercompletionMsg - an OSCMessage which is processed by the server
when the allocation and reading is complete. can be null.
java.io.IOExceptionBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage allocReadChannelMsg(java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
throws java.io.IOException
/b_allocReadChannel message to allocate the buffer created with the basic new constructor,
by reading in selected channels from a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)
java.io.IOExceptionBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage allocReadChannelMsg(java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
/b_allocReadChannel message to allocate the buffer created with the basic new constructor,
by reading in selected channels from a sound file.
path - the path to the sound filestartFrame - starting frame in the sound filenumFrames - the number of frames to read, which equals the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)completionMsg - an OSCMessage which is processed by the server
when the allocation and reading is complete. can be null.
java.io.IOExceptionBuffer( Server, int, int )long startFrame is truncated to 32bit by OSCMessage for now
public static Buffer read(Server server,
java.lang.String path)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound file
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC message
public static Buffer read(Server server,
java.lang.String path,
long startFrame)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading from
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer read(Server server,
java.lang.String path,
long startFrame,
int numFrames)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the buffer
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer read(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionAction action)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the bufferaction - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be null
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer read(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionAction action,
int bufNum)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the bufferaction - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be nullbufNum - the index to use for the buffer
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the buffer. Use -1 to read the whole file.channels - an array of channel indices to read (starting from 0)
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
Buffer.CompletionAction action)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)action - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be null
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readChannel(Server server,
java.lang.String path,
long startFrame,
int numFrames,
int[] channels,
Buffer.CompletionAction action,
int bufNum)
throws java.io.IOException
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the bufferchannels - an array of channel indices to read (starting from 0)action - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be nullbufNum - the index to use for the buffer
java.io.IOException - if an error occurs while sending the OSC messagelong startFrame is truncated to 32bit by OSCMessage for now
public void read(java.lang.String path)
throws java.io.IOException
path - the path to the sound file
java.io.IOException - if an error occurs while sending the OSC message
public void read(java.lang.String path,
long fileStartFrame)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading from
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void read(java.lang.String path,
long fileStartFrame,
int numFrames)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be read
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling begins
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void read(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
Buffer.CompletionAction action)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.action - an action to be executed when the /b_info comes back from the server.
at this moment, the read operation is completed.
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void readChannel(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels,
Buffer.CompletionAction action)
throws java.io.IOException
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.channels - an array of channel indices to read (starting from 0)action - an action to be executed when the /b_info comes back from the server.
at this moment, the read operation is completed.
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for nowpublic de.sciss.net.OSCMessage readMsg(java.lang.String path)
/b_read message to read in as many frames from a sound file as fit into the buffer,
starting at the beginning of the file,
closing the file after reading.
path - the path to the sound file
public de.sciss.net.OSCMessage readMsg(java.lang.String path,
long fileStartFrame)
/b_read message to read in as many frames from a sound file as fit into the buffer,
starting at a given frame in the file,
closing the file after reading.
path - the path to the sound file
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readMsg(java.lang.String path,
long fileStartFrame,
int numFrames)
/b_read message to read in frames from a sound file into the buffer,
closing the file after reading.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be read
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
/b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer, closing the file after reading.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling begins
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
/b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
/b_read message to read in frames from a sound file into the buffer, beginning a
given offset in the buffer.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.completionMsg - an OSCMessage which is processed by the server
when the reading is complete. can be null.
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readChannelMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels)
/b_read message to read in frames from selected channels of
a sound file into the buffer, beginning a
given offset in the buffer.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.channels - an array of channel indices to read (starting from 0)
long fileStartFrame is truncated to 32bit by OSCMessage for now
public de.sciss.net.OSCMessage readChannelMsg(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
int[] channels,
de.sciss.net.OSCMessage completionMsg)
/b_read message to read in frames from selected channels of
a sound file into the buffer, beginning a
given offset in the buffer.
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.channels - an array of channel indices to read (starting from 0)completionMsg - an OSCMessage which is processed by the server
when the reading is complete. can be null.
long fileStartFrame is truncated to 32bit by OSCMessage for now
public void write(java.lang.String path)
throws java.io.IOException
path - the path name of the file to write to
java.io.IOException - if an error occurs while sending the OSC message
public void write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat)
throws java.io.IOException
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.
java.io.IOException - if an error occurs while sending the OSC messageConstants.kHeaderAIFF,
Constants.kSampleInt24
public void write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames)
throws java.io.IOException
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole buffer
java.io.IOException - if an error occurs while sending the OSC messageConstants.kHeaderAIFF,
Constants.kSampleInt24
public void write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame)
throws java.io.IOException
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to write
java.io.IOException - if an error occurs while sending the OSC messageConstants.kHeaderAIFF,
Constants.kSampleInt24
public void write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
throws java.io.IOException
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to writeleaveOpen - false to close the sound file after writing, true to
leave it open (as required for a DiskOut UGen). If you leave the file
open, don't forget to call close on the buffer eventually.
java.io.IOException - if an error occurs while sending the OSC messageConstants.kHeaderAIFF,
Constants.kSampleInt24
public void write(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to writeleaveOpen - false to close the sound file after writing, true to
leave it open (as required for a DiskOut UGen). If you leave the file
open, don't forget to call close on the buffer eventually.completionMsg - an OSCMessage which is processed by the server
when the writing is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC messageConstants.kHeaderAIFF,
Constants.kSampleInt24public de.sciss.net.OSCMessage writeMsg(java.lang.String path)
/b_write message to write the buffer contents to a sound file, using AIFF integer 24 bit format.
path - the path name of the file to write to
public de.sciss.net.OSCMessage writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat)
/b_write message to write the buffer contents to a sound file.
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.
Constants.kHeaderAIFF,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames)
/b_write message to write the buffer contents to a sound file.
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole buffer
Constants.kHeaderAIFF,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame)
/b_write message to write a section of the buffer to a sound file.
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to write
Constants.kHeaderAIFF,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
/b_write message to write a section of the buffer to a sound file.
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to writeleaveOpen - false to close the sound file after writing, true to
leave it open (as required for a DiskOut UGen). If you leave the file
open, don't forget to call close on the buffer eventually.
Constants.kHeaderAIFF,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(java.lang.String path,
java.lang.String headerFormat,
java.lang.String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
/b_write message to write a section of the buffer to a sound file.
path - the path name of the file to write toheaderFormat - one of kHeaderAIFF etc.sampleFormat - one of kSampleInt24 etc.numFrames - to number of frames to write, or -1 to write the whole bufferbufStartFrame - the start frame in the buffer from which to writeleaveOpen - false to close the sound file after writing, true to
leave it open (as required for a DiskOut UGen). If you leave the file
open, don't forget to call close on the buffer eventually.completionMsg - an OSCMessage which is processed by the server
when the writing is complete. can be null.
Constants.kHeaderAIFF,
Constants.kSampleInt24
public static Buffer readNoUpdate(Server server,
java.lang.String path)
throws java.io.IOException
read( Server, String ) but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query()
server - the server on which the buffer is allocatedpath - the path to the sound file
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messageread( Server, String )
public static Buffer readNoUpdate(Server server,
java.lang.String path,
long startFrame)
throws java.io.IOException
read( Server, String, long ) but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query()
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading from
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messageread( Server, String, long )long startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames)
throws java.io.IOException
read( Server, String, long, int ) but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query()
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the buffer
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messageread( Server, String, long, int )long startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionFunction completionFunc)
throws java.io.IOException
read( Server, String, long, int, CompletionFunction )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the buffercompletionFunc - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be null
null if the server's buffer allocator
is exhausted
java.io.IOException - if an error occurs while sending the OSC messageread( Server, String, long, int, CompletionAction )long startFrame is truncated to 32bit by OSCMessage for now
public static Buffer readNoUpdate(Server server,
java.lang.String path,
long startFrame,
int numFrames,
Buffer.CompletionFunction completionFunc,
int bufNum)
throws java.io.IOException
read( Server, String, long, int, CompletionFunction, int )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
An explicit buffer index is provided.
server - the server on which the buffer is allocatedpath - the path to the sound filestartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read. this is equal to the number of frames
allocated for the buffercompletionFunc - an action to be executed when the /b_info message comes
back from the server. at this time the buffer has been allocated and filled.
action can be nullbufNum - the index to use for the buffer
java.io.IOException - if an error occurs while sending the OSC messageread( Server, String, long, int, CompletionAction, int )long startFrame is truncated to 32bit by OSCMessage for now
public void readNoUpdate(java.lang.String path)
throws java.io.IOException
read( String )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound file
java.io.IOException - if an error occurs while sending the OSC message
public void readNoUpdate(java.lang.String path,
long fileStartFrame)
throws java.io.IOException
read( String, long )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading from
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames)
throws java.io.IOException
read( String, long, int )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be read
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame)
throws java.io.IOException
read( String, long, int, int )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling begins
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
throws java.io.IOException
read( String, long, int, int, boolean )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public void readNoUpdate(java.lang.String path,
long fileStartFrame,
int numFrames,
int bufStartFrame,
boolean leaveOpen,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
read( String, long, int, int, boolean, CompletionAction )
but without sending
a /b_query. Hence, the internal fields are not updated
unless you explicitly call query().
path - the path to the sound filefileStartFrame - the frame index in the sound file to start reading fromnumFrames - the number of frames to read
a value of -1 indicates that as many frames as fit into the buffer
should be readbufStartFrame - the offset (in frames) in the buffer at which the filling beginsleaveOpen - false to close the sound file after reading, true to
leave it open (as required for a DiskIn UGen). If you leave the file
open, don't forget to call close on the buffer eventually.completionMsg - an OSCMessage which is processed by the server
when the reading is complete. can be null.
java.io.IOException - if an error occurs while sending the OSC messagelong fileStartFrame is truncated to 32bit by OSCMessage for now
public static Buffer cueSoundFile(Server server,
java.lang.String path)
throws java.io.IOException
java.io.IOException
public static Buffer cueSoundFile(Server server,
java.lang.String path,
long startFrame)
throws java.io.IOException
java.io.IOException
public static Buffer cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels)
throws java.io.IOException
java.io.IOException
public static Buffer cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels,
int bufferSize)
throws java.io.IOException
java.io.IOException
public static Buffer cueSoundFile(Server server,
java.lang.String path,
long startFrame,
int numChannels,
int bufferSize,
Buffer.CompletionFunction completionFunc)
throws java.io.IOException
java.io.IOException
public void cueSoundFile(java.lang.String path)
throws java.io.IOException
java.io.IOException
public void cueSoundFile(java.lang.String path,
long startFrame)
throws java.io.IOException
java.io.IOException
public void cueSoundFile(java.lang.String path,
long startFrame,
de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
java.io.IOException
public de.sciss.net.OSCMessage cueSoundFileMsg(java.lang.String path,
long startFrame,
de.sciss.net.OSCMessage completionMsg)
protected void queryDone()
public void fill(int startAt,
int numSamples,
float value)
throws java.io.IOException
java.io.IOException
public de.sciss.net.OSCMessage fillMsg(int startAt,
int numSamples,
float value)
public void fill(int[] startAt,
int[] numSamples,
float[] value)
throws java.io.IOException
java.io.IOException
public de.sciss.net.OSCMessage fillMsg(int[] startAt,
int[] numSamples,
float[] value)
public void close()
throws java.io.IOException
java.io.IOException
public void close(de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
java.io.IOExceptionpublic de.sciss.net.OSCMessage closeMsg()
public de.sciss.net.OSCMessage closeMsg(de.sciss.net.OSCMessage completionMsg)
public void free()
throws java.io.IOException
java.io.IOException
public void free(de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
java.io.IOExceptionpublic de.sciss.net.OSCMessage freeMsg()
public de.sciss.net.OSCMessage freeMsg(de.sciss.net.OSCMessage completionMsg)
public void zero()
throws java.io.IOException
java.io.IOException
public void zero(de.sciss.net.OSCMessage completionMsg)
throws java.io.IOException
java.io.IOExceptionpublic de.sciss.net.OSCMessage zeroMsg()
public de.sciss.net.OSCMessage zeroMsg(de.sciss.net.OSCMessage completionMsg)
public static void freeAll(Server server)
throws java.io.IOException
server - the server whose buffers should be freed
java.io.IOException - if an error occurs in OSC bundle sending
public void query()
throws java.io.IOException
server.setPrintStream()).
java.io.IOException - if a networking error occurspublic de.sciss.net.OSCMessage queryMsg()
/b_query for querying the
buffer's parameters.
public void updateInfo(Buffer.CompletionAction action)
throws java.io.IOException
action - the action to be executed once the buffer info is updated
java.io.IOException - if a networking error occurspublic void printOn(java.io.PrintStream stream)
public Synth play()
throws java.io.IOException
java.io.IOException - if an error occurs in message sending
public Synth play(boolean loop)
throws java.io.IOException
loop - whether the playback should be looped or not.
java.io.IOException - if an error occurs in message sending
public Synth play(boolean loop,
float amp)
throws java.io.IOException
loop - whether the playback should be looped or not.amp - the amplitude scaling
java.io.IOException - if an error occurs in message sending
public Synth play(boolean loop,
float amp,
int outBus)
throws java.io.IOException
loop - whether the playback should be looped or not.amp - the amplitude scalingoutBus - the index of the first bus to play on
java.io.IOException - if an error occurs in message sending
public Synth play(boolean loop,
float amp,
int outBus,
float fadeTime)
throws java.io.IOException
loop - whether the playback should be looped or not.amp - the amplitude scalingoutBus - the index of the first bus to play onfadeTime - the time in seconds for the synth to fade in and out (upon release())
java.io.IOException - if an error occurs in message sending
public Synth play(boolean loop,
float amp,
int outBus,
float fadeTime,
Node target,
int addAction)
throws java.io.IOException
loop - whether the playback should be looped or not.amp - the amplitude scalingoutBus - the index of the first bus to play onfadeTime - the time in seconds for the synth to fade in and out (upon release())target - to node to add the new synth toaddAction - the add action to use when adding the synth
java.io.IOException - if an error occurs in message sending
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||