[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] demand rate
James McCartney wrote:
> On Feb 20, 2006, at 8:17 AM, Julian Rohrhuber wrote:
> > I, too, miss the simplicity of having one high level language for
> > all processes. The relation between continuous and discrete is much
> > more discrete now..
>
> I agree with this. Things like Spawn, TSpawn and Sequencer were not
> good to lose.
> I never intended the current state to be the end. I always intended
> on making a fat server that included the language as a plugin that
> supported Sequencer and TSpawn.
Yeah, life is a big game of wack-a-mole.
Spawn was very cool, but in SC2 there were many things that could only
be done with the Spawn sledgehammer when a lighterweight solution
would have have been more than adaquate. Though having Spawn for the
cases when it was the right way to get the job done would, of course,
be great.
For old times sake, Blip example 1:
(
// 001
#{{
var out;
out = OverlapTexture.ar({
if(0.8.coin, {
Pan2.ar(
Blip.ar(
XLine.kr(exprand(0.25,400),exprand(0.25,400),4),
XLine.kr(exprand(2,100),exprand(2,100),4)
)
* Blip.ar(
XLine.kr(exprand(0.25,400),exprand(0.25,400),4),
XLine.kr(exprand(2,100),exprand(2,100),4)
),
Line.kr(1.0.rand2, 1.0.rand2, 4),
0.3
);
});
}, 2, 1, 12, 2);
out = out.distort;
6.do({ out = AllpassN.ar(out, 0.05, [0.05.rand, 0.05.rand], 4) });
out;
}.play;
}.send;
)
(
// Synth Defs
SynthDef("blips_001", {arg outbuf = 0, sustainTime = 4.0, transitionTime = 4.0;
var out, env;
env = Env.new(#[0.0, 1.0, 1.0, 0.0], [transitionTime, sustainTime, transitionTime], 'welch');
out =
Blip.ar(
XLine.kr(ExpRand(0.25,400), ExpRand(0.25,400), 4),
XLine.kr(ExpRand(2,100), ExpRand(2,100), 4)
)
* Blip.ar(
XLine.kr(ExpRand(0.25,400), ExpRand(0.25,400), 4),
XLine.kr(ExpRand(2,100), ExpRand(2,100), 4)
);
out = EnvGen.kr(env, doneAction: 2) * out;
out = Pan2.ar(out, Line.kr(Rand(-1.0, 1.0), Rand(-1.0, 1.0), 4), 0.3);
Out.ar(outbuf, out);
}).send(s);
SynthDef("blips_001_fx", {arg inbuf = 0, outbuf = 0;
var in, out;
in = In.ar(inbuf, 2);
out = in.distort;
6.do({ out = AllpassN.ar(out, 0.05, [Rand(0.05), Rand(0.05)], 4) });
ReplaceOut.ar(outbuf, out);
}).send(s);
)
(
// 001
var sustainTime, transitionTime, density;
var period;
sustainTime = 2.0;
transitionTime = 1.0;
density = 12.0;
period = (2 * transitionTime + sustainTime) / density;
s.sendMsg("/s_new", "blips_001_fx", 1001, 1, 0);
Task({
inf.do({ arg i;
if(0.8.coin, {
s.sendMsg("/s_new", "blips_001", -1, 0, 0,
\sustainTime, sustainTime,
\transitionTime, transitionTime);
});
period.wait;
});
}).play;
)
--
C. Ramakrishnan cramakrishnan@xxxxxxx