Friday, August 29, 2008

CC3 Week 5 - FFT I


This week I created a GUI on some code that was generating FFT on white noise. Using the examples we went through in class, I used a slider to control the X-Y co-ordinates instead of the mouse.

I was exploring the GUI examples more thoroughly and found a slider that controlled the window colour. I used the same concept and made the slider change the colour of the slider itself.




Click here for an audio example of my patch. [1.7MB]




b = Buffer.alloc(s,2048,1);

(

SynthDef("help-rectcomb2", { arg out=0, bufnum=0, x=0, y=0;
var in, chain;
in = WhiteNoise.ar(0.2);
chain = FFT(bufnum, in);
chain = PV_RectComb(chain, x, y, 0.2);
Out.ar(out, IFFT(chain).dup);
}).send(s);
x = Synth("help-rectcomb2");


w = SCWindow("Filter", Rect(100, 500, 400, 400))
.front;
w.view.background_(Color.black);
w.alpha = 0.8;


p = SC2DSlider(w, Rect(20, 20,350, 350))
.x_(0.5) // initial location of x
.y_(1) // initial location of y
.action_({p.background = (Color.new(p.x, p.y, 200, 1));
x.set(\x, p.x*32);
x.set(\y, p.y);
// [\sliderX, p.x, \sliderY, p.y].postln;
});
//w.front;

);




[1] Christian Haines. "Creative Computing: Semester 2 - Week 5 - FFT I". Lecture presented at the Electronic Music Unit, University of Adelaide, South Australia, 28th August 2008

Week 4 Forum - Practical Composition Workshop IA

I wrote my entire blog entry for this week and then my computer had a fit and I lost it. I cannot be stuffed writing it up again and since no one reads my blog I'm not going to.


[1] Stephen Whitting & David Harris, "Music Technology Forum: Semester 2 - Week 4 – Practical Composition Workshop". Lecture presented at the Electronic Music Unit, EMU Space, University of Adelaide, South Australia, 21st August 2008