de.sciss.jcollider
Class Buffer

java.lang.Object
  extended by de.sciss.jcollider.Buffer
All Implemented Interfaces:
Constants

public class Buffer
extends java.lang.Object
implements Constants

Mimics SCLang's Buffer class, that is, it's a client side representation of an audio buffer

Version:
0.32, 25-Feb-08
Author:
Hanns Holger Rutz
Todo:
custom fill commands (sine1 etc.)
Warning:
this is a quick direct translation from SClang which is largely untested. before all methods have been thoroughly verified, excepted some of them to be wrong or behave different than expected. what certainly works is alloc-, read-, free-, zero- and close-messages

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

Buffer

public Buffer(Server server,
              int numFrames,
              int numChannels)
Creates a new Buffer with given number of frames and channels. This method uses the Server's allocators but does not send an allocMsg to the server.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
See Also:
alloc()
Warning:
when the allocators are exhausted, the bufNum of the returned Buffer instance is -1. The caller is responsible for dealing with this possible failure.

Buffer

public Buffer(Server server,
              int numFrames,
              int numChannels,
              int bufNum)
Creates a new Buffer with given number of frames and channels. This method requires an explicit buffer index and does not use the Server's allocators. This method does not send an allocMsg to the server.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
bufNum - the index of the buffer
Method Detail

getServer

public Server getServer()
Queries the server at which the buffer resides

Returns:
the buffer's Server

getSampleRate

public double getSampleRate()
Queries the buffer data's sample rate. This rate is updated when an asynchronous read command is completed and buffer info has been received from the server.

Returns:
the buffer content's sample rate

setSampleRate

protected void setSampleRate(double sampleRate)

getBufNum

public int getBufNum()
Queries the buffer's index.

Returns:
the buffer index

getNumFrames

public int getNumFrames()
Queries the buffer data's number of frames (samples per channel). In ansynchronous allocation by read this value is filled in when the read is completed and buffer info has been received from the server.

Returns:
the number of frames in the buffer

setNumFrames

protected void setNumFrames(int numFrames)

getNumChannels

public int getNumChannels()
Queries the buffer's number of channels. In ansynchronous allocation by read this value is filled in when the read is completed and buffer info has been received from the server.

Returns:
the number of channels in the buffer

setNumChannels

protected void setNumChannels(int numChannels)

getPath

public java.lang.String getPath()
Queries the buffer's sound file path. In ansynchronous allocation by read this value is instantely filled in.

Returns:
the sound file path of the buffer or null

getDuration

public double getDuration()
Queries the buffer's duration in seconds. This is only valid after the buffer info (such as sampleRate) has been retrieved.

Returns:
the total duration of the buffer (when played back at normal rate) in seconds

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

alloc

public static Buffer alloc(Server server,
                           int numFrames)
                    throws java.io.IOException
Allocates and returns a new mono Buffer with given number of frames.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message

alloc

public static Buffer alloc(Server server,
                           int numFrames,
                           int numChannels)
                    throws java.io.IOException
Allocates and returns a new Buffer with given number of channels and frames.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message

alloc

public static Buffer alloc(Server server,
                           int numFrames,
                           int numChannels,
                           Buffer.CompletionFunction completionFunc)
                    throws java.io.IOException
Allocates and returns a new Buffer with given number of channels and frames.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
completionFunc - a function that returns an OSCMessage which is processed by the server when the reading is complete. can be null.
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message

alloc

public static Buffer alloc(Server server,
                           int numFrames,
                           int numChannels,
                           Buffer.CompletionFunction completionFunc,
                           int bufNum)
                    throws java.io.IOException
Allocates and returns a new Buffer with given number of channels and frames. This uses an explicitly provided buffer index and not the server's allocator.

Parameters:
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
completionFunc - 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
Returns:
the newly created Buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message

allocConsecutive

public static Buffer[] allocConsecutive(int numBufs,
                                        Server server,
                                        int numFrames)
                                 throws java.io.IOException
Allocates and returns an array of neighbouring single channel Buffer objects with given number of frames. Neighbouring means, that buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.

Parameters:
numBufs - the number of buffers to allocate
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
Returns:
the newly created Buffers
Throws:
java.io.IOException - if an error occurs while sending the OSC message

allocConsecutive

public static Buffer[] allocConsecutive(int numBufs,
                                        Server server,
                                        int numFrames,
                                        int numChannels)
                                 throws java.io.IOException
Allocates and returns an array of neighbouring Buffer objects with given number of channels and frames. Neighbouring means, that buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.

Parameters:
numBufs - the number of buffers to allocate
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
Returns:
the newly created Buffers
Throws:
java.io.IOException - if an error occurs while sending the OSC message

allocConsecutive

public static Buffer[] allocConsecutive(int numBufs,
                                        Server server,
                                        int numFrames,
                                        int numChannels,
                                        Buffer.CompletionFunction completionFunc)
                                 throws java.io.IOException
Allocates and returns an array of neighbouring Buffer objects with given number of channels and frames. Neighbouring means, that buf[ n ].getBufNum() == buf[ n-1 ].getBufNum() + 1.

Parameters:
numBufs - the number of buffers to allocate
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
completionFunc - a function that returns an OSCMessage which is processed by the server when the reading is complete. can be null.
Returns:
the newly created Buffers
Throws:
java.io.IOException - if an error occurs while sending the OSC message

allocConsecutive

public static Buffer[] allocConsecutive(int numBufs,
                                        Server server,
                                        int numFrames,
                                        int numChannels,
                                        Buffer.CompletionFunction completionFunc,
                                        int bufNum)
                                 throws java.io.IOException
Allocates and returns an array of neighbouring 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.

Parameters:
numBufs - the number of buffers to allocate
server - the server to which the buffer belongs
numFrames - the number of frames (samples per channel) that buffer occupies
numChannels - the number of channels the buffer occupies
completionFunc - 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)
Returns:
the newly created Buffers
Throws:
java.io.IOException - if an error occurs while sending the OSC message

alloc

public void alloc()
           throws java.io.IOException
Allocates the buffer created with the basic new constructor.

Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )

alloc

public void alloc(de.sciss.net.OSCMessage completionMsg)
           throws java.io.IOException
Allocates the buffer created with the basic new constructor.

Parameters:
completionMsg - an OSCMessage which is processed by the server when the allocation is complete. can be null.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )

allocMsg

public de.sciss.net.OSCMessage allocMsg()
                                 throws java.io.IOException
Creates an OSC /b_alloc message to allocate the buffer created with the basic new constructor.

Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )

allocMsg

public de.sciss.net.OSCMessage allocMsg(de.sciss.net.OSCMessage completionMsg)
                                 throws java.io.IOException
Creates an OSC /b_alloc message to allocate the buffer created with the basic new constructor.

Parameters:
completionMsg - an OSCMessage which is processed by the server when the allocation is complete. can be null.
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )

allocRead

public void allocRead(java.lang.String path)
               throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )

allocRead

public void allocRead(java.lang.String path,
                      long startFrame)
               throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocRead

public void allocRead(java.lang.String path,
                      long startFrame,
                      int numFrames)
               throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocRead

public void allocRead(java.lang.String path,
                      long startFrame,
                      int numFrames,
                      de.sciss.net.OSCMessage completionMsg)
               throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
completionMsg - an OSCMessage which is processed by the server when the allocation and reading is complete. can be null.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadChannel

public void allocReadChannel(java.lang.String path,
                             long startFrame,
                             int numFrames,
                             int[] channels)
                      throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in selected channels of a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
channels - an array of channel indices to read (starting from 0)
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadChannel

public void allocReadChannel(java.lang.String path,
                             long startFrame,
                             int numFrames,
                             int[] channels,
                             de.sciss.net.OSCMessage completionMsg)
                      throws java.io.IOException
Allocates the buffer created with the basic new constructor, by reading in selected channels of a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
channels - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadMsg

public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path)
                                     throws java.io.IOException
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )

allocReadMsg

public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
                                            long startFrame)
                                     throws java.io.IOException
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadMsg

public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
                                            long startFrame,
                                            int numFrames)
                                     throws java.io.IOException
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadMsg

public de.sciss.net.OSCMessage allocReadMsg(java.lang.String path,
                                            long startFrame,
                                            int numFrames,
                                            de.sciss.net.OSCMessage completionMsg)
                                     throws java.io.IOException
Creates an OSC /b_allocRead message to allocate the buffer created with the basic new constructor, by reading in a sound file.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
completionMsg - an OSCMessage which is processed by the server when the allocation and reading is complete. can be null.
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadChannelMsg

public de.sciss.net.OSCMessage allocReadChannelMsg(java.lang.String path,
                                                   long startFrame,
                                                   int numFrames,
                                                   int[] channels)
                                            throws java.io.IOException
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.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
channels - an array of channel indices to read (starting from 0)
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

allocReadChannelMsg

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
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.

Parameters:
path - the path to the sound file
startFrame - starting frame in the sound file
numFrames - the number of frames to read, which equals the number of frames allocated for the buffer
channels - 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.
Returns:
the message to be sent to the server
Throws:
java.io.IOException
See Also:
Buffer( Server, int, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

read

public static Buffer read(Server server,
                          java.lang.String path)
                   throws java.io.IOException
Reads a whole file into memory for PlayBuf etc. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message

read

public static Buffer read(Server server,
                          java.lang.String path,
                          long startFrame)
                   throws java.io.IOException
Reads a whole file into memory for PlayBuf etc., starting at a given frame. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

read

public static Buffer read(Server server,
                          java.lang.String path,
                          long startFrame,
                          int numFrames)
                   throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

read

public static Buffer read(Server server,
                          java.lang.String path,
                          long startFrame,
                          int numFrames,
                          Buffer.CompletionAction action)
                   throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
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
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

read

public static Buffer read(Server server,
                          java.lang.String path,
                          long startFrame,
                          int numFrames,
                          Buffer.CompletionAction action,
                          int bufNum)
                   throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. adds a query as a completion message. An explicit buffer index is provided.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
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
bufNum - the index to use for the buffer
Returns:
the newly created buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readChannel

public static Buffer readChannel(Server server,
                                 java.lang.String path,
                                 long startFrame,
                                 int numFrames,
                                 int[] channels)
                          throws java.io.IOException
Reads a section of a given set of channels from a file into memory for PlayBuf etc. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - 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)
Returns:
the newly created buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readChannel

public static Buffer readChannel(Server server,
                                 java.lang.String path,
                                 long startFrame,
                                 int numFrames,
                                 int[] channels,
                                 Buffer.CompletionAction action)
                          throws java.io.IOException
Reads a section of a given set of channels from a file into memory for PlayBuf etc. adds a query as a completion message.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
channels - 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
Returns:
the newly created buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readChannel

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
Reads a section of a given set of channels from a file into memory for PlayBuf etc. adds a query as a completion message. An explicit buffer index is provided.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
channels - 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
bufNum - the index to use for the buffer
Returns:
the newly created buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

read

public void read(java.lang.String path)
          throws java.io.IOException
Reads in as many frames from a sound file as fit into the buffer, starting at the beginning of the file. Closes the file after reading.

Parameters:
path - the path to the sound file
Throws:
java.io.IOException - if an error occurs while sending the OSC message

read

public void read(java.lang.String path,
                 long fileStartFrame)
          throws java.io.IOException
Reads in as many frames from a sound file as fit into the buffer, starting at a given frame in the file. Closes the file after reading.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

read

public void read(java.lang.String path,
                 long fileStartFrame,
                 int numFrames)
          throws java.io.IOException
Reads in frames from a sound file into the buffer. Closes the file after reading.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

read

public void read(java.lang.String path,
                 long fileStartFrame,
                 int numFrames,
                 int bufStartFrame)
          throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. Closes the file after reading.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

read

public void read(java.lang.String path,
                 long fileStartFrame,
                 int numFrames,
                 int bufStartFrame,
                 boolean leaveOpen)
          throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

read

public void read(java.lang.String path,
                 long fileStartFrame,
                 int numFrames,
                 int bufStartFrame,
                 boolean leaveOpen,
                 Buffer.CompletionAction action)
          throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readChannel

public void readChannel(java.lang.String path,
                        long fileStartFrame,
                        int numFrames,
                        int bufStartFrame,
                        boolean leaveOpen,
                        int[] channels,
                        Buffer.CompletionAction action)
                 throws java.io.IOException
Reads in frames from selected channels of a sound file into the buffer, beginning a given offset in the buffer.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readMsg

public 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.

Parameters:
path - the path to the sound file
Returns:
the message to be sent to the server

readMsg

public 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.

Parameters:
path - the path to the sound file
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readMsg

public 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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readMsg

public 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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readMsg

public 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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readMsg

public 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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readChannelMsg

public 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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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)
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readChannelMsg

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)
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.

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Returns:
the message to be sent to the server
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

write

public void write(java.lang.String path)
           throws java.io.IOException
Writes the buffer contents to a sound file, using AIFF integer 24 bit format.

Parameters:
path - the path name of the file to write to
Throws:
java.io.IOException - if an error occurs while sending the OSC message

write

public void write(java.lang.String path,
                  java.lang.String headerFormat,
                  java.lang.String sampleFormat)
           throws java.io.IOException
Writes the buffer contents to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

write

public void write(java.lang.String path,
                  java.lang.String headerFormat,
                  java.lang.String sampleFormat,
                  int numFrames)
           throws java.io.IOException
Writes the buffer contents to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

write

public void write(java.lang.String path,
                  java.lang.String headerFormat,
                  java.lang.String sampleFormat,
                  int numFrames,
                  int bufStartFrame)
           throws java.io.IOException
Writes a section of the buffer to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

write

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
Writes a section of the buffer to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

write

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
Writes a section of the buffer to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

writeMsg

public 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.

Parameters:
path - the path name of the file to write to
Returns:
the message to send to the server

writeMsg

public 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.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
Returns:
the message to send to the server
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

writeMsg

public 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.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
Returns:
the message to send to the server
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

writeMsg

public 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.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
Returns:
the message to send to the server
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

writeMsg

public 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.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
leaveOpen - 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.
Returns:
the message to send to the server
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

writeMsg

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)
Creates an OSC /b_write message to write a section of the buffer to a sound file.

Parameters:
path - the path name of the file to write to
headerFormat - one of kHeaderAIFF etc.
sampleFormat - one of kSampleInt24 etc.
numFrames - to number of frames to write, or -1 to write the whole buffer
bufStartFrame - the start frame in the buffer from which to write
leaveOpen - 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.
Returns:
the message to send to the server
See Also:
Constants.kHeaderAIFF, Constants.kSampleInt24

readNoUpdate

public static Buffer readNoUpdate(Server server,
                                  java.lang.String path)
                           throws java.io.IOException
Reads a whole file into memory for PlayBuf etc. Just like read( Server, String ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query()

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
read( Server, String )

readNoUpdate

public static Buffer readNoUpdate(Server server,
                                  java.lang.String path,
                                  long startFrame)
                           throws java.io.IOException
Reads a whole file into memory for PlayBuf etc. Just like read( Server, String, long ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query()

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
read( Server, String, long )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public static Buffer readNoUpdate(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numFrames)
                           throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. Just like read( Server, String, long, int ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query()

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
read( Server, String, long, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public static Buffer readNoUpdate(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numFrames,
                                  Buffer.CompletionFunction completionFunc)
                           throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. Just like read( Server, String, long, int, CompletionFunction ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
completionFunc - 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
Returns:
the newly created Buffer or null if the server's buffer allocator is exhausted
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
read( Server, String, long, int, CompletionAction )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public static Buffer readNoUpdate(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numFrames,
                                  Buffer.CompletionFunction completionFunc,
                                  int bufNum)
                           throws java.io.IOException
Reads a section of a file into memory for PlayBuf etc. Just like 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.

Parameters:
server - the server on which the buffer is allocated
path - the path to the sound file
startFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read. this is equal to the number of frames allocated for the buffer
completionFunc - 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
bufNum - the index to use for the buffer
Returns:
the newly created buffer
Throws:
java.io.IOException - if an error occurs while sending the OSC message
See Also:
read( Server, String, long, int, CompletionAction, int )
Warning:
long startFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public void readNoUpdate(java.lang.String path)
                  throws java.io.IOException
Reads in as many frames from a sound file as fit into the buffer, starting at the beginning of the file. Closes the file after reading. Just like read( String ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
path - the path to the sound file
Throws:
java.io.IOException - if an error occurs while sending the OSC message

readNoUpdate

public void readNoUpdate(java.lang.String path,
                         long fileStartFrame)
                  throws java.io.IOException
Reads in as many frames from a sound file as fit into the buffer, starting at a given frame in the file. Closes the file after reading. Just like read( String, long ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public void readNoUpdate(java.lang.String path,
                         long fileStartFrame,
                         int numFrames)
                  throws java.io.IOException
Reads in frames from a sound file into the buffer. Closes the file after reading. Just like read( String, long, int ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public void readNoUpdate(java.lang.String path,
                         long fileStartFrame,
                         int numFrames,
                         int bufStartFrame)
                  throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. Closes the file after reading. Just like read( String, long, int, int ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public void readNoUpdate(java.lang.String path,
                         long fileStartFrame,
                         int numFrames,
                         int bufStartFrame,
                         boolean leaveOpen)
                  throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. Just like read( String, long, int, int, boolean ) but without sending a /b_query. Hence, the internal fields are not updated unless you explicitly call query().

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

readNoUpdate

public void readNoUpdate(java.lang.String path,
                         long fileStartFrame,
                         int numFrames,
                         int bufStartFrame,
                         boolean leaveOpen,
                         de.sciss.net.OSCMessage completionMsg)
                  throws java.io.IOException
Reads in frames from a sound file into the buffer, beginning a given offset in the buffer. Just like 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().

Parameters:
path - the path to the sound file
fileStartFrame - the frame index in the sound file to start reading from
numFrames - the number of frames to read a value of -1 indicates that as many frames as fit into the buffer should be read
bufStartFrame - the offset (in frames) in the buffer at which the filling begins
leaveOpen - 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.
Throws:
java.io.IOException - if an error occurs while sending the OSC message
Warning:
long fileStartFrame is truncated to 32bit by OSCMessage for now

cueSoundFile

public static Buffer cueSoundFile(Server server,
                                  java.lang.String path)
                           throws java.io.IOException
Throws:
java.io.IOException
Warning:
numChannels defaults to 1 (not 2 as in sclang) !!

cueSoundFile

public static Buffer cueSoundFile(Server server,
                                  java.lang.String path,
                                  long startFrame)
                           throws java.io.IOException
Throws:
java.io.IOException
Warning:
numChannels defaults to 1 (not 2 as in sclang) !!

cueSoundFile

public static Buffer cueSoundFile(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numChannels)
                           throws java.io.IOException
Throws:
java.io.IOException

cueSoundFile

public static Buffer cueSoundFile(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numChannels,
                                  int bufferSize)
                           throws java.io.IOException
Throws:
java.io.IOException

cueSoundFile

public static Buffer cueSoundFile(Server server,
                                  java.lang.String path,
                                  long startFrame,
                                  int numChannels,
                                  int bufferSize,
                                  Buffer.CompletionFunction completionFunc)
                           throws java.io.IOException
Throws:
java.io.IOException

cueSoundFile

public void cueSoundFile(java.lang.String path)
                  throws java.io.IOException
Throws:
java.io.IOException

cueSoundFile

public void cueSoundFile(java.lang.String path,
                         long startFrame)
                  throws java.io.IOException
Throws:
java.io.IOException

cueSoundFile

public void cueSoundFile(java.lang.String path,
                         long startFrame,
                         de.sciss.net.OSCMessage completionMsg)
                  throws java.io.IOException
Throws:
java.io.IOException

cueSoundFileMsg

public de.sciss.net.OSCMessage cueSoundFileMsg(java.lang.String path,
                                               long startFrame,
                                               de.sciss.net.OSCMessage completionMsg)

queryDone

protected void queryDone()
Called from Server when b_info is received. Do not call this method directly


fill

public void fill(int startAt,
                 int numSamples,
                 float value)
          throws java.io.IOException
Throws:
java.io.IOException

fillMsg

public de.sciss.net.OSCMessage fillMsg(int startAt,
                                       int numSamples,
                                       float value)

fill

public void fill(int[] startAt,
                 int[] numSamples,
                 float[] value)
          throws java.io.IOException
Throws:
java.io.IOException

fillMsg

public de.sciss.net.OSCMessage fillMsg(int[] startAt,
                                       int[] numSamples,
                                       float[] value)

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close(de.sciss.net.OSCMessage completionMsg)
           throws java.io.IOException
Throws:
java.io.IOException

closeMsg

public de.sciss.net.OSCMessage closeMsg()

closeMsg

public de.sciss.net.OSCMessage closeMsg(de.sciss.net.OSCMessage completionMsg)

free

public void free()
          throws java.io.IOException
Throws:
java.io.IOException

free

public void free(de.sciss.net.OSCMessage completionMsg)
          throws java.io.IOException
Throws:
java.io.IOException

freeMsg

public de.sciss.net.OSCMessage freeMsg()

freeMsg

public de.sciss.net.OSCMessage freeMsg(de.sciss.net.OSCMessage completionMsg)

zero

public void zero()
          throws java.io.IOException
Throws:
java.io.IOException

zero

public void zero(de.sciss.net.OSCMessage completionMsg)
          throws java.io.IOException
Throws:
java.io.IOException

zeroMsg

public de.sciss.net.OSCMessage zeroMsg()

zeroMsg

public de.sciss.net.OSCMessage zeroMsg(de.sciss.net.OSCMessage completionMsg)

freeAll

public static void freeAll(Server server)
                    throws java.io.IOException
Frees all known buffers on a server. Known buffers are those which were allocated regularly using the server's buffer allocator.

Parameters:
server - the server whose buffers should be freed
Throws:
java.io.IOException - if an error occurs in OSC bundle sending

query

public void query()
           throws java.io.IOException
A debugging method for querying the current buffer parameters and printing them into the console. This sends a query message to the server and upon reply prints the current buffer parameters into the console (as defined by server.setPrintStream()).

Throws:
java.io.IOException - if a networking error occurs
Todo:
this simply waits for the next /b_info message to come in without checking the bufNum ; also there is no time out

queryMsg

public de.sciss.net.OSCMessage queryMsg()
Constructs an OSC message /b_query for querying the buffer's parameters.

Returns:
the OSC message, ready to be send to the server

updateInfo

public void updateInfo(Buffer.CompletionAction action)
                throws java.io.IOException
Asynchronously updates the buffer parameters (such as number of frames or sample rate). It sends a query message to the server and upon reply, executes a given completion action.

Parameters:
action - the action to be executed once the buffer info is updated
Throws:
java.io.IOException - if a networking error occurs

printOn

public void printOn(java.io.PrintStream stream)

play

public Synth play()
           throws java.io.IOException
Plays the buffer contents (oneshot) beginning on the first audio output.

Returns:
the buffer playing synth. the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions

play

public Synth play(boolean loop)
           throws java.io.IOException
Plays the buffer contents beginning on the first audio output.

Parameters:
loop - whether the playback should be looped or not.
Returns:
the buffer playing synth. when not looping, the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions

play

public Synth play(boolean loop,
                  float amp)
           throws java.io.IOException
Plays the buffer contents beginning on the first audio output.

Parameters:
loop - whether the playback should be looped or not.
amp - the amplitude scaling
Returns:
the buffer playing synth. when not looping, the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions

play

public Synth play(boolean loop,
                  float amp,
                  int outBus)
           throws java.io.IOException
Plays the buffer contents.

Parameters:
loop - whether the playback should be looped or not.
amp - the amplitude scaling
outBus - the index of the first bus to play on
Returns:
the buffer playing synth. when not looping, the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions

play

public Synth play(boolean loop,
                  float amp,
                  int outBus,
                  float fadeTime)
           throws java.io.IOException
Plays the buffer contents.

Parameters:
loop - whether the playback should be looped or not.
amp - the amplitude scaling
outBus - the index of the first bus to play on
fadeTime - the time in seconds for the synth to fade in and out (upon release())
Returns:
the buffer playing synth. when not looping, the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions

play

public Synth play(boolean loop,
                  float amp,
                  int outBus,
                  float fadeTime,
                  Node target,
                  int addAction)
           throws java.io.IOException
Plays the buffer contents.

Parameters:
loop - whether the playback should be looped or not.
amp - the amplitude scaling
outBus - the index of the first bus to play on
fadeTime - the time in seconds for the synth to fade in and out (upon release())
target - to node to add the new synth to
addAction - the add action to use when adding the synth
Returns:
the buffer playing synth. when not looping, the synth is automatically freed when the buffer playback is complete.
Throws:
java.io.IOException - if an error occurs in message sending
Warning:
requires prior UGenInfo.readDefinitions