Modifier and Type | Class and Description |
---|---|
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.
|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(String path)
Allocates the buffer created with the basic
new constructor,
by reading in a sound file. |
void |
allocRead(String path,
long startFrame)
Allocates the buffer created with the basic
new constructor,
by reading in a sound file. |
void |
allocRead(String path,
long startFrame,
int numFrames)
Allocates the buffer created with the basic
new constructor,
by reading in a sound file. |
void |
allocRead(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(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(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(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(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(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(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(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(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,
String path) |
static Buffer |
cueSoundFile(Server server,
String path,
long startFrame) |
static Buffer |
cueSoundFile(Server server,
String path,
long startFrame,
int numChannels) |
static Buffer |
cueSoundFile(Server server,
String path,
long startFrame,
int numChannels,
int bufferSize) |
static Buffer |
cueSoundFile(Server server,
String path,
long startFrame,
int numChannels,
int bufferSize,
Buffer.CompletionFunction completionFunc) |
void |
cueSoundFile(String path) |
void |
cueSoundFile(String path,
long startFrame) |
void |
cueSoundFile(String path,
long startFrame,
de.sciss.net.OSCMessage completionMsg) |
de.sciss.net.OSCMessage |
cueSoundFileMsg(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).
|
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(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,
String path)
Reads a whole file into memory for PlayBuf etc.
|
static Buffer |
read(Server server,
String path,
long startFrame)
Reads a whole file into memory for PlayBuf etc., starting at a given frame.
|
static Buffer |
read(Server server,
String path,
long startFrame,
int numFrames)
Reads a section of a file into memory for PlayBuf etc.
|
static Buffer |
read(Server server,
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,
String path,
long startFrame,
int numFrames,
Buffer.CompletionAction action,
int bufNum)
Reads a section of a file into memory for PlayBuf etc.
|
void |
read(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(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(String path,
long fileStartFrame,
int numFrames)
Reads in frames from a sound file into the buffer.
|
void |
read(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(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(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,
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,
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,
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(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(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(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(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(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(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(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(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(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,
String path)
Reads a whole file into memory for PlayBuf etc.
|
static Buffer |
readNoUpdate(Server server,
String path,
long startFrame)
Reads a whole file into memory for PlayBuf etc.
|
static Buffer |
readNoUpdate(Server server,
String path,
long startFrame,
int numFrames)
Reads a section of a file into memory for PlayBuf etc.
|
static Buffer |
readNoUpdate(Server server,
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,
String path,
long startFrame,
int numFrames,
Buffer.CompletionFunction completionFunc,
int bufNum)
Reads a section of a file into memory for PlayBuf etc.
|
void |
readNoUpdate(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(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(String path,
long fileStartFrame,
int numFrames)
Reads in frames from a sound file into the buffer.
|
void |
readNoUpdate(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(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(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) |
String |
toString() |
void |
updateInfo(Buffer.CompletionAction action)
Asynchronously updates the buffer parameters
(such as number of frames or sample rate).
|
void |
write(String path)
Writes the buffer contents to a sound file, using AIFF integer 24 bit format.
|
void |
write(String path,
String headerFormat,
String sampleFormat)
Writes the buffer contents to a sound file.
|
void |
write(String path,
String headerFormat,
String sampleFormat,
int numFrames)
Writes the buffer contents to a sound file.
|
void |
write(String path,
String headerFormat,
String sampleFormat,
int numFrames,
int bufStartFrame)
Writes a section of the buffer to a sound file.
|
void |
write(String path,
String headerFormat,
String sampleFormat,
int numFrames,
int bufStartFrame,
boolean leaveOpen)
Writes a section of the buffer to a sound file.
|
void |
write(String path,
String headerFormat,
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(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(String path,
String headerFormat,
String sampleFormat)
Creates an OSC
/b_write message to write the buffer contents to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(String path,
String headerFormat,
String sampleFormat,
int numFrames)
Creates an OSC
/b_write message to write the buffer contents to a sound file. |
de.sciss.net.OSCMessage |
writeMsg(String path,
String headerFormat,
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(String path,
String headerFormat,
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(String path,
String headerFormat,
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) |
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()
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 bufferpublic Server getServer()
Server
public 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 String getPath()
null
public double getDuration()
public static Buffer alloc(Server server, int numFrames) throws IOException
server
- the server to which the buffer belongsnumFrames
- the number of frames (samples per channel) that buffer occupiesnull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer alloc(Server server, int numFrames, int numChannels) throws 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 occupiesnull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer alloc(Server server, int numFrames, int numChannels, Buffer.CompletionFunction completionFunc) throws 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 exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer alloc(Server server, int numFrames, int numChannels, Buffer.CompletionFunction completionFunc, int bufNum) throws 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 serverIOException
- if an error occurs while sending the OSC messagepublic static Buffer[] allocConsecutive(int numBufs, Server server, int numFrames) throws 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 occupiesIOException
- if an error occurs while sending the OSC messagepublic static Buffer[] allocConsecutive(int numBufs, Server server, int numFrames, int numChannels) throws 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 occupiesIOException
- if an error occurs while sending the OSC messagepublic static Buffer[] allocConsecutive(int numBufs, Server server, int numFrames, int numChannels, Buffer.CompletionFunction completionFunc) throws 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
.IOException
- if an error occurs while sending the OSC messagepublic static Buffer[] allocConsecutive(int numBufs, Server server, int numFrames, int numChannels, Buffer.CompletionFunction completionFunc, int bufNum) throws 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)
IOException
- if an error occurs while sending the OSC messagepublic void alloc() throws IOException
new
constructor.IOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void alloc(de.sciss.net.OSCMessage completionMsg) throws IOException
new
constructor.completionMsg
- an OSCMessage
which is processed by the server
when the allocation is complete. can be null
.IOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public de.sciss.net.OSCMessage allocMsg() throws IOException
/b_alloc
message to allocate the buffer created with the basic new
constructor.IOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocMsg(de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
Buffer( Server, int, int )
public void allocRead(String path) throws IOException
new
constructor,
by reading in a sound file.path
- the path to the sound fileIOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void allocRead(String path, long startFrame) throws IOException
new
constructor,
by reading in a sound file.path
- the path to the sound filestartFrame
- starting frame in the sound fileIOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void allocRead(String path, long startFrame, int numFrames) throws 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 bufferIOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void allocRead(String path, long startFrame, int numFrames, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
- if an error occurs while sending the OSC messageBuffer( Server, int, int )
public void allocReadChannel(String path, long startFrame, int numFrames, int[] channels) throws 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
)IOException
- if an error occurs while sending the OSC messagepublic void allocReadChannel(String path, long startFrame, int numFrames, int[] channels, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
- if an error occurs while sending the OSC messagepublic de.sciss.net.OSCMessage allocReadMsg(String path) throws 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 fileIOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadMsg(String path, long startFrame) throws 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 fileIOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadMsg(String path, long startFrame, int numFrames) throws 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 bufferIOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadMsg(String path, long startFrame, int numFrames, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadChannelMsg(String path, long startFrame, int numFrames, int[] channels) throws 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
)IOException
Buffer( Server, int, int )
public de.sciss.net.OSCMessage allocReadChannelMsg(String path, long startFrame, int numFrames, int[] channels, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
Buffer( Server, int, int )
public static Buffer read(Server server, String path) throws IOException
server
- the server on which the buffer is allocatedpath
- the path to the sound filenull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer read(Server server, String path, long startFrame) throws 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 fromnull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer read(Server server, String path, long startFrame, int numFrames) throws 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 buffernull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer read(Server server, String path, long startFrame, int numFrames, Buffer.CompletionAction action) throws 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 exhaustedIOException
- if an error occurs while sending the OSC messagepublic static Buffer read(Server server, String path, long startFrame, int numFrames, Buffer.CompletionAction action, int bufNum) throws 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
bufNum
- the index to use for the bufferIOException
- if an error occurs while sending the OSC messagepublic static Buffer readChannel(Server server, String path, long startFrame, int numFrames, int[] channels) throws 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
)IOException
- if an error occurs while sending the OSC messagepublic static Buffer readChannel(Server server, String path, long startFrame, int numFrames, int[] channels, Buffer.CompletionAction action) throws 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
IOException
- if an error occurs while sending the OSC messagepublic static Buffer readChannel(Server server, String path, long startFrame, int numFrames, int[] channels, Buffer.CompletionAction action, int bufNum) throws 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
bufNum
- the index to use for the bufferIOException
- if an error occurs while sending the OSC messagepublic void read(String path) throws IOException
path
- the path to the sound fileIOException
- if an error occurs while sending the OSC messagepublic void read(String path, long fileStartFrame) throws IOException
path
- the path to the sound filefileStartFrame
- the frame index in the sound file to start reading fromIOException
- if an error occurs while sending the OSC messagepublic void read(String path, long fileStartFrame, int numFrames) throws 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 readIOException
- if an error occurs while sending the OSC messagepublic void read(String path, long fileStartFrame, int numFrames, int bufStartFrame) throws 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 beginsIOException
- if an error occurs while sending the OSC messagepublic void read(String path, long fileStartFrame, int numFrames, int bufStartFrame, boolean leaveOpen) throws 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.IOException
- if an error occurs while sending the OSC messagepublic void read(String path, long fileStartFrame, int numFrames, int bufStartFrame, boolean leaveOpen, Buffer.CompletionAction action) throws 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.IOException
- if an error occurs while sending the OSC messagepublic void readChannel(String path, long fileStartFrame, int numFrames, int bufStartFrame, boolean leaveOpen, int[] channels, Buffer.CompletionAction action) throws 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.IOException
- if an error occurs while sending the OSC messagepublic de.sciss.net.OSCMessage readMsg(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 filepublic de.sciss.net.OSCMessage readMsg(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 filepublic de.sciss.net.OSCMessage readMsg(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 readpublic de.sciss.net.OSCMessage readMsg(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 beginspublic de.sciss.net.OSCMessage readMsg(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.public de.sciss.net.OSCMessage readMsg(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
.public de.sciss.net.OSCMessage readChannelMsg(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
)public de.sciss.net.OSCMessage readChannelMsg(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
.public void write(String path) throws IOException
path
- the path name of the file to write toIOException
- if an error occurs while sending the OSC messagepublic void write(String path, String headerFormat, String sampleFormat) throws IOException
path
- the path name of the file to write toheaderFormat
- one of kHeaderAIFF
etc.sampleFormat
- one of kSampleInt24
etc.IOException
- if an error occurs while sending the OSC messageConstants.kHeaderAIFF
,
Constants.kSampleInt24
public void write(String path, String headerFormat, String sampleFormat, int numFrames) throws 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 bufferIOException
- if an error occurs while sending the OSC messageConstants.kHeaderAIFF
,
Constants.kSampleInt24
public void write(String path, String headerFormat, String sampleFormat, int numFrames, int bufStartFrame) throws 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 writeIOException
- if an error occurs while sending the OSC messageConstants.kHeaderAIFF
,
Constants.kSampleInt24
public void write(String path, String headerFormat, String sampleFormat, int numFrames, int bufStartFrame, boolean leaveOpen) throws 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.IOException
- if an error occurs while sending the OSC messageConstants.kHeaderAIFF
,
Constants.kSampleInt24
public void write(String path, String headerFormat, String sampleFormat, int numFrames, int bufStartFrame, boolean leaveOpen, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
- if an error occurs while sending the OSC messageConstants.kHeaderAIFF
,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(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 topublic de.sciss.net.OSCMessage writeMsg(String path, String headerFormat, 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(String path, String headerFormat, 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 bufferConstants.kHeaderAIFF
,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(String path, String headerFormat, 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 writeConstants.kHeaderAIFF
,
Constants.kSampleInt24
public de.sciss.net.OSCMessage writeMsg(String path, String headerFormat, 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(String path, String headerFormat, 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, String path) throws 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 filenull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messageread( Server, String )
public static Buffer readNoUpdate(Server server, String path, long startFrame) throws 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 fromnull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messageread( Server, String, long )
public static Buffer readNoUpdate(Server server, String path, long startFrame, int numFrames) throws 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 buffernull
if the server's buffer allocator
is exhaustedIOException
- if an error occurs while sending the OSC messageread( Server, String, long, int )
public static Buffer readNoUpdate(Server server, String path, long startFrame, int numFrames, Buffer.CompletionFunction completionFunc) throws 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 exhaustedIOException
- if an error occurs while sending the OSC messageread( Server, String, long, int, CompletionAction )
public static Buffer readNoUpdate(Server server, String path, long startFrame, int numFrames, Buffer.CompletionFunction completionFunc, int bufNum) throws 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 null
bufNum
- the index to use for the bufferIOException
- if an error occurs while sending the OSC messageread( Server, String, long, int, CompletionAction, int )
public void readNoUpdate(String path) throws 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 fileIOException
- if an error occurs while sending the OSC messagepublic void readNoUpdate(String path, long fileStartFrame) throws 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 fromIOException
- if an error occurs while sending the OSC messagepublic void readNoUpdate(String path, long fileStartFrame, int numFrames) throws 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 readIOException
- if an error occurs while sending the OSC messagepublic void readNoUpdate(String path, long fileStartFrame, int numFrames, int bufStartFrame) throws 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 beginsIOException
- if an error occurs while sending the OSC messagepublic void readNoUpdate(String path, long fileStartFrame, int numFrames, int bufStartFrame, boolean leaveOpen) throws 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.IOException
- if an error occurs while sending the OSC messagepublic void readNoUpdate(String path, long fileStartFrame, int numFrames, int bufStartFrame, boolean leaveOpen, de.sciss.net.OSCMessage completionMsg) throws 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
.IOException
- if an error occurs while sending the OSC messagepublic static Buffer cueSoundFile(Server server, String path) throws IOException
IOException
public static Buffer cueSoundFile(Server server, String path, long startFrame) throws IOException
IOException
public static Buffer cueSoundFile(Server server, String path, long startFrame, int numChannels) throws IOException
IOException
public static Buffer cueSoundFile(Server server, String path, long startFrame, int numChannels, int bufferSize) throws IOException
IOException
public static Buffer cueSoundFile(Server server, String path, long startFrame, int numChannels, int bufferSize, Buffer.CompletionFunction completionFunc) throws IOException
IOException
public void cueSoundFile(String path) throws IOException
IOException
public void cueSoundFile(String path, long startFrame) throws IOException
IOException
public void cueSoundFile(String path, long startFrame, de.sciss.net.OSCMessage completionMsg) throws IOException
IOException
public de.sciss.net.OSCMessage cueSoundFileMsg(String path, long startFrame, de.sciss.net.OSCMessage completionMsg)
protected void queryDone()
public void fill(int startAt, int numSamples, float value) throws IOException
IOException
public de.sciss.net.OSCMessage fillMsg(int startAt, int numSamples, float value)
public void fill(int[] startAt, int[] numSamples, float[] value) throws IOException
IOException
public de.sciss.net.OSCMessage fillMsg(int[] startAt, int[] numSamples, float[] value)
public void close() throws IOException
IOException
public void close(de.sciss.net.OSCMessage completionMsg) throws IOException
IOException
public de.sciss.net.OSCMessage closeMsg()
public de.sciss.net.OSCMessage closeMsg(de.sciss.net.OSCMessage completionMsg)
public void free() throws IOException
IOException
public void free(de.sciss.net.OSCMessage completionMsg) throws IOException
IOException
public de.sciss.net.OSCMessage freeMsg()
public de.sciss.net.OSCMessage freeMsg(de.sciss.net.OSCMessage completionMsg)
public void zero() throws IOException
IOException
public void zero(de.sciss.net.OSCMessage completionMsg) throws IOException
IOException
public de.sciss.net.OSCMessage zeroMsg()
public de.sciss.net.OSCMessage zeroMsg(de.sciss.net.OSCMessage completionMsg)
public static void freeAll(Server server) throws IOException
server
- the server whose buffers should be freedIOException
- if an error occurs in OSC bundle sendingpublic void query() throws IOException
server.setPrintStream()
).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 IOException
action
- the action to be executed once the buffer info is updatedIOException
- if a networking error occurspublic void printOn(PrintStream stream)
public Synth play() throws IOException
IOException
- if an error occurs in message sendingpublic Synth play(boolean loop) throws IOException
loop
- whether the playback should be looped or not.IOException
- if an error occurs in message sendingpublic Synth play(boolean loop, float amp) throws IOException
loop
- whether the playback should be looped or not.amp
- the amplitude scalingIOException
- if an error occurs in message sendingpublic Synth play(boolean loop, float amp, int outBus) throws IOException
loop
- whether the playback should be looped or not.amp
- the amplitude scalingoutBus
- the index of the first bus to play onIOException
- if an error occurs in message sendingpublic Synth play(boolean loop, float amp, int outBus, float fadeTime) throws 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())IOException
- if an error occurs in message sendingpublic Synth play(boolean loop, float amp, int outBus, float fadeTime, Node target, int addAction) throws 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 synthIOException
- if an error occurs in message sendingCopyright © 2015–2022 SciJava. All rights reserved.