You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB
Plaintext

TITLE:: FluidKrToBuf
summary:: Helper pseudo UGen for writing data into a buffer from a Kr stream
categories:: Libraries>FluidCorpusManipulation
related:: Classes/FluidBufToKr
DESCRIPTION::
Helper pseudo UGen for writing data into a buffer from a Kr stream. It only works with one-channel buffers.
CLASSMETHODS::
METHOD:: kr
Create a new instance of this pseudo UGen.
ARGUMENT:: krStream
The Kr stream to write into the buffer.
ARGUMENT:: buffer
The buffer to write the Kr stream into. Can be either a link::Classes/Buffer:: object, or an index poiting to a buffer.
ARGUMENT:: krStartChan
The channel in the code::krStream:: to begin the reading from. The default is 0.
ARGUMENT:: krNumChans
The number of channels in the code::krStream:: to read from starting at code::krStartChan:: The default of -1 will read from code::krStartChan:: to the max number of channels in the code::krStream::.
ARGUMENT:: destStartFrame
The frame in the code::buffer:: to begin writing into. The default is 0.
returns:: This class.
INSTANCEMETHODS::
EXAMPLES::
code::
(
// FluidKrToBuf test
s.waitForBoot{
Routine{
var buf = Buffer.alloc(s,5);
s.sync;
{
var sig = SinOsc.kr(rrand(1.0.dup(buf.numFrames),4.0));
FluidKrToBuf.kr(sig,buf);
}.play;
1.wait;
defer{buf.plot};
}.play;
}
)
::