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

[sc-dev] another version on the SWIKI



Hi all,

 I just put up a new version of my library on the SWIKI as "rk extensions"
on the Developing SC page. I have not yet integrated JMcc's PauseRoutine.
Right now, NodeControl, ControlEnvironment, Display and ControlValue can
control groups, synths, patterns, etc.  It may
be that this is not such a good idea (perhaps Display  and
ControlEnvironment should always refer to a group).

 Another addition is addEvent, which is used by patterns to schedule
synths on the server.


Please take a look and offer advice.


RJK

PS
 Here is an example of what it looks like to use:

Default.init;	// must be done or everything breaks

a = Display.make({arg disp, i, j,k, f,r, theIndex;
	f		.spec_(\freq,600);
	r		.spec_([0,10,'lin',0,1]);
	theIndex	.spec_([0,10,'lin',0,1]);
	i		.spec_(\freq,20);
	j		.spec_(\freq,20);

	disp		.add("SimplePM", [f,r,theIndex]);
	// SimplePM will run whenever disp does.
	// It gets three ControlValue objects which
	// it converts to name, value pairs
	// when it is started: r, f, and theIndex

	j		.add(Pbind(\dur,0.2,\freq, j));
	j		.add({  loop({ yield(2).postln; })  });
	j		.add("bubbles");
	// the above will run whenever the control
	// is not at its minimum value

	k		.add(ServerSynth("bubbles"));
	k		.add(Pbind(\dur,1.2,\freq,i));
});
b = a.show;

)


And here are the probably familiarsynthdefs:

SynthDef("SimplePM", { arg f =100,a=0.1,
	theIndex= 2,r=2;
	Out.ar(0,SinOsc.ar(f,SinOsc.ar(f*r,0,theIndex),a))
}).writeAndSend;

SynthDef("bubbles", {
	var f, zout;
	f = LFSaw.kr(0.4, 0, 24, LFSaw.kr([8,7.23], 0, 3, 80)).midicps;
	zout = CombN.ar(SinOsc.ar(f, 0, 0.04), 0.2, 0.2, 4);
	Out.ar(0, zout.postln);
}).writeAndSend;