Message: 6
Date: Tue, 30 Dec 2003 15:14:45 +0100
From: Fredrik Olofsson <f@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [sc-users] More dumb stream questions
To: SuperCollider users mailing list <sc-users@xxxxxxxxxxxxxxx>
Message-ID: <84CFB76B-3AD2-11D8-A448-000A9568446C@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=US-ASCII; format=flowed
I'm making some progress with my little In C Xmas project, but
questions keep popping up.
I want to iterate over an array of patterns, but I can't figure out
how to construct a do loop that's doesn't make everyrhing happen at
once:
the Ptpar class would suit you i think. sadly no helpfile yet but it
takes an array of offsets in seconds and what pbinds to play. note
that it stops when any pbind returns nil so just make sure your
patterns are infinitely long e.g. Pseq([Pseq(pattern), Pseq(pause)],
inf)
good luck /f0
(
var inC;
inC= Array.newClear(3);
inC[0] = Pbind( // pattern1
\instrument, "fmgen_a_" ++ 35.rand,
[\midinote,\dur], Pseq([Pseq([[60, 0.1],[64, 0.4]], 3), Pseq([[\, 2]],
1)], 30) //repeat this 30 times then stop
);
inC[1] = Pbind( // pattern2
\instrument, "fmgen_a_" ++ 35.rand,
[\midinote,\dur], Pseq([Pseq([[60, 0.05],[64, 0.245], [65, 0.25], [64,
0.5]])], inf) //repeat inf
);
inC[2]= Pbind(
\instrument, "fmgen_a_" ++ 35.rand,
[\midinote,\dur], Pseq([Pseq([[\, 0.25],[64, 0.25], [65, 0.25], [64,
0.25]])], inf) //repeat inf
); // any symbol is a rest, like \ or whatever
Ptpar([0, inC[0], 5, inC[1], 10, inC[2]]).play; //offset, pbind,
offset, pbind etc
)