Thursday, February 26, 2009

Auto Gui

Hidden away in the GUI Overview help file this little gem,





Automatic GUI

You can get a quick simple automatic interface for a Synth with SynthDesc : makeWindow.

(
s.waitForBoot({
SynthDef("test", { arg out, freq=330, amp=0.6;
Out.ar(out, SinOsc.ar(freq,0,amp))
}).store;


SynthDescLib.global.at(\test).makeWindow;
});
)


An auto GUI creator.
I haven't really read around it much yet, but it seems to work pretty well.

I decided to mate it with the wonderful Atari2600 Ugen from Fredrik Olofsson.

(
SynthDef(\atari2600, {|out= 0, gate= 1, tone0= 5, tone1= 8, freq0= 10, freq1= 20, rate= 1, amp= 1, pan= 0|
var e, z;
e= EnvGen.kr(Env.asr(0.01, amp, 0.05), gate, doneAction:2);
z= Atari2600.ar(tone0, tone1, freq0, freq1, 15, 15, rate);
Out.ar(out, Pan2.ar(z*e, pan));
}).store
)

SynthDescLib.global.at(\atari2600).makeWindow;






And I got a handy widget for exploring a new Ugen.

No comments:

Post a Comment