now first macro (concat) working
parent
8de096977a
commit
bc12dc2d10
@ -1,28 +1,42 @@
|
|||||||
// + FluidBufCompose {
|
// (re)set the source buffers
|
||||||
|
(
|
||||||
~concat = {
|
~low = Buffer.sendCollection(s, (Signal.sineFill(4410, Array.fill(3,0) ++ 1)));
|
||||||
arg x;
|
~mid = Buffer.sendCollection(s, (Signal.sineFill(4410, Array.fill(12,0) ++ 1)));
|
||||||
x.postln;
|
~high = Buffer.sendCollection(s, (Signal.sineFill(4410, Array.fill(48,0) ++ 1)));
|
||||||
}
|
~piano = Buffer.read(s,File.realpath(FluidBufCompose.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Tremblay-SA-UprightPianoPedalWide.wav",0,4410);
|
||||||
// }
|
)
|
||||||
|
|
||||||
~concat.value("ilove 10")
|
// draw the buffers to see what happened
|
||||||
|
(
|
||||||
|
~low.plot;
|
||||||
|
~mid.plot;
|
||||||
~concat = {
|
~high.plot;
|
||||||
arg x;
|
~piano.plot;
|
||||||
if(x.class != Array, {"Error".postln;}, {
|
)
|
||||||
for (0,x.size - 1, {arg i;
|
|
||||||
x[i].postln;
|
// define the concatenation macro
|
||||||
});
|
(
|
||||||
});
|
~concat = {
|
||||||
}
|
arg x;
|
||||||
// }
|
if(x.class != Array,
|
||||||
|
{
|
||||||
~concat.value("ilove 10")
|
"Error - Needs an array as argument".postln;
|
||||||
|
}, {
|
||||||
~concat.value(b)
|
Routine{
|
||||||
|
for (1,x.size - 1, {
|
||||||
|
arg i;
|
||||||
/////
|
FluidBufCompose.process(s,x[i],destination:x[0], destStartFrame:x[0].numFrames);
|
||||||
|
});
|
||||||
|
"Done!".postln;
|
||||||
|
}.play;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
//test various combinations of concat
|
||||||
|
~concat.value([~low,~mid])
|
||||||
|
~concat.value([~mid,~low,~high])
|
||||||
|
~concat.value([~mid,~piano,~low])
|
||||||
|
~concat.value([~mid,~piano])
|
||||||
|
|
||||||
|
~mid.query
|
||||||
Loading…
Reference in New Issue