[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] changing the rate of Routine



yeah. 

also when playing with TempoClock.default, changing the global tempo affects running routines:

(
var a, amp, pAmp, nextAmp;
a= Pseq(#[20, 40, 50, 70, 80, 90, 100, 110], inf).asStream;
Routine({
inf.do({
Synth("sawosc",
[ \freq, a.next.midicps, \filt, exprand(200, 1000),
\pan, [-1, 0, 1].wchoose([0.1, 0.7, 0.4]) ]
);
((120/60)/8).wait
});
}).play(TempoClock.default);
)


TempoClock.default.tempo = 2

and you can use an environment var. for wait time:

~wait = ((120/60)/8)

(
var a, amp, pAmp, nextAmp;
a= Pseq(#[20, 40, 50, 70, 80, 90, 100, 110], inf).asStream;
Routine({
inf.do({
Synth.new("sin",
[ \freq, a.next.midicps, \filt, exprand(200, 1000),
\pan, [-1, 0, 1].wchoose([0.1, 0.7, 0.4]) ]
);
~wait.value.wait
})
}).play(TempoClock.default);
)

~wait = ((120/60)/8);
~wait = {[((120/60)/8), ((120/60)/16)].choose};

TempoClock.default = 2;
TempoClock.default = 0.5;

grtz,
tom

On 29 Dec 2005, at 16:40, James Harkins wrote:

Try using Pseg. It produces interpolated line segments, either linear
or with a curve given by the user.

r = Task({
var durStream = Pseg(Pseq([2.0, 0.1], inf), 10).asStream;
loop {
"!@#$%".scramble.postln;
durStream.next.wait;
}
}).play;

hjh

On 12/29/05, Chan <MultoChan@xxxxxxxxxxx> wrote:
Hi List.
I can't find any documentation on how to change the rate of
a routine in realtime.
For example if
I have a routine with 1.wait...play(SystemClock)..as below,
how could I change this code so that the rate
increases or decreases gradually - As XLine would do in
the synthesis side.

--
James Harkins /// dewdrop world

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-users mailing list

..................................
..................................