helpfiles made: FluidBufToKr and FluidKrToBuf

nix
Ted Moore 4 years ago
parent 0f2ddd85d0
commit 3b5df16274

@ -0,0 +1,39 @@
TITLE:: FluidBufToKr
summary:: Helper pseudo UGen for reading data out of a buffer to a Kr stream
categories:: Libraries>FluidCorpusManipulation
related:: Classes/FluidKrToBuf
DESCRIPTION::
Helper pseudo UGen for reading data out of a buffer to a Kr stream. It only reads one-channel buffers, converting them to a Kr stream with as many channels as the number of frames that the buffer is long.
CLASSMETHODS::
METHOD:: kr
Initialize an instance of this pseudo UGen
ARGUMENT:: buffer
The link::Classes/Buffer:: that this pseudo UGen will read out of. Must be a one-channel buffer.
returns:: a Kr stream that has the same number of channels as frames in the link::Classes/Buffer::.
INSTANCEMETHODS::
EXAMPLES::
code::
(
// FluidBufToKr
s.waitForBoot{
Routine{
var buf = Buffer.loadCollection(s,[0,1,2,3,4,7]);
s.sync;
{
var sig = FluidBufToKr.kr(buf);
sig.poll;
}.play;
}.play;
}
)
::

@ -0,0 +1,48 @@
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. The number of frames in the link::Classes/Buffer:: must be the same as the number of channels in the Kr stream.
CLASSMETHODS::
METHOD:: kr
Create a new instance of this pseudo UGen.
ARGUMENT:: krStream
The Kr stream to write into the buffer.
ARGUMENT:: buffer
The link::Classes/Buffer:: to write the Kr stream into.
returns:: Nothing.
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;
}
)
::

@ -11,7 +11,7 @@ s.waitForBoot{
FluidKrToBuf.kr(sig,buf); FluidKrToBuf.kr(sig,buf);
}.play; }.play;
3.wait; 1.wait;
defer{buf.plot}; defer{buf.plot};
}.play; }.play;
@ -98,7 +98,7 @@ s.waitForBoot{
/// 1000 is fine /// 1000 is fine
s.waitForBoot{ s.waitForBoot{
Routine{ Routine{
var buf = Buffer.loadCollection(s,Array.fill(1000,{arg i; i})); var buf = Buffer.loadCollection(s,Array.fill(1001,{arg i; i}));
s.sync; s.sync;

Loading…
Cancel
Save